2025-12-01 09:46:26 +05:30
2025-07-30 13:17:00 +05:30
2025-03-18 22:01:30 +05:30
2025-07-07 18:33:29 +05:30
2025-12-01 09:46:05 +05:30
2025-07-07 18:32:11 +05:30
2025-07-07 18:32:11 +05:30
2025-05-10 07:22:22 +05:30

publicly

Authenticate publicly, chat privately.

Publicly is a lean, invite only chat server over SSH connections.

Quickstart

Install publicly either by downloading a release or building from source.

cargo install --git https://github.com/lavafroth/publicly

Generate a keypair for the administrator.

ssh-keygen -f op -C "op:admin" -t ed25519 -N ""
mv op.pub Authfile

Deploy.

publicly

This binds to port 2222 on all interfaces. Members with the respective private keys can join like so:

ssh 0.0.0.0 -p 2222 -oStrictHostKeyChecking=No -i op

Here, the private key file is named op.

Roadmap

  • SSH authentication and authorization
  • Emacs-like shortcuts for textarea
  • multiline support with Alt Return
  • Adjustable parameters:
    • history size
    • Authfile path
    • Listening port number
  • /add command to add new keys
  • /reload command to reload the Authfile
  • /rename command
  • /commit command to commit in-memory changes to Authfile
  • #mention tags

Authfile

The Authfile is the source of truth.

Keys can be added via the chat interface with the /add command but they won't persist over multiple runs of the server unless they are committed using the /commit command.

Consider the keys in the example Authfile

ssh-ed25519 AAAA... bob@work
ssh-ed25519 AAAA... h@cafe:admin

The Authfile intentionally uses the same format as the ~/.ssh/authorized_keys file, with the only difference being that it parses the last field, the comment, to assign usernames.

For example, the first key has a comment bob@work which will be the username assigned to anyone joining with the respective key. Further, bob@work can join only with normal privileges.

h@cafe, whose comment is tagged as :admin will be able to join the chat with admin privileges.

Note

Usernames may only contain ASCII alphanumeric characters and the symbols @-_.. All other characters will be stripped.

Description
Authenticate publicly, chat privately.
Readme 232 KiB
Languages
Rust 97.8%
Nix 2.2%