Skip to content

Conversation

@ovo-Tim
Copy link
Contributor

@ovo-Tim ovo-Tim commented Aug 25, 2025

What I've done

Test prebuild version yourself.

Global logging

  • Specify the global logfile.
  • Output all info from malai run through tracing, so that the logfile can gather all the logs.

malai run

  • Supported services: http, tcp
  • Details can be found at the malai.toml section below.
  • Specify the home directory or malai.toml or simply leave blank to use current directory.

malai identity

  • Create identities and store secret keys in system keyring.
  • Remove identities from system keyring by specify ID52/file.
  • No database or state file needed. (Thus, you can't name your identities or get a list of all the identities)

malai.toml

The section is basically a doc for malai.toml. Maybe you should add this to the malai.sh.

Here is an example that covered all the features we can handle now:

[malai] # Optional
log = "/tmp/malai.log" # Optional
[http.service1]
identity = "<id52>" # Optional
port = 3000
public = true
active = true

[tcp.service2]
secret_file = "Path" # Optional
port = 3002
public = true
active = true

log

The path of global rolling logfile. Since it's rolling logfile, your actual filename will be malai.log.<date> . You can also write things like /tmp(Same effect as /tmp/malai.log ), my-malai.log(Same effect as ./my-malai.log).

identity & secret_file

  • identity: Specify the identity and load secret key from system keyring.
  • secret_file: Specify the file that contains the secret key

You have to set one of them. If you set both, secret_file will be used.

@vercel
Copy link

vercel bot commented Aug 25, 2025

@ovo-Tim is attempting to deploy a commit to the fifthtry Team on Vercel.

A member of the Team first needs to authorize it.

@amitu
Copy link
Contributor

amitu commented Aug 26, 2025

Maybe you should add the to the malai.sh.

What do you mean by this?

@amitu
Copy link
Contributor

amitu commented Aug 26, 2025

[http.service1]
identity = "<id52>" # Optional

actually means

[http.service1] # Optional
identity = "<id52>" 

right? identity should not be optional. Also ensure each identity is unique, we must not allow identity re-use as it can lead to all sorts of network issues.

@ovo-Tim
Copy link
Contributor Author

ovo-Tim commented Aug 26, 2025

What do you mean by this?

Docs on https://malai.sh

And sorry for strange typo :P

@ovo-Tim
Copy link
Contributor Author

ovo-Tim commented Aug 26, 2025

[http.service1] # Optional

Nope. If you didn't fill identity, it will automatically read from env, .malai.secret-key file or .malai.id52 file. If you only have one service, this can be useful, I guess?

Also ensure each identity is unique, we must not allow identity re-use as it can lead to all sorts of network issues.

Ok, I will add this.

@ovo-Tim
Copy link
Contributor Author

ovo-Tim commented Aug 27, 2025

Nope. If you didn't fill identity, it will automatically read from env, .malai.secret-key file or .malai.id52 file. If you only have one service, this can be useful, I guess?

This behavior will be removed.

@amitu
Copy link
Contributor

amitu commented Aug 27, 2025

Nope. If you didn't fill identity, it will automatically read from env, .malai.secret-key file or .malai.id52 file. If you only have one service, this can be useful, I guess?

I am not too sure about this behaviour. Please remove as you mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants