Simple SSH-based secure chat room server for groups. It have auth system based on GitHub OAuth and works directly in SSH terminal. Supported the private messages. The server have not any message logging system at all.
WARNING!!! This project works without visible prolems but it's NOT FINISHED and WAS NOT TESTED WELL. Use with caution.
- SSH-Based: Secure, encrypted, and accessible from any standard SSH client.
- Passwordless: Uses GitHub OAuth for login.
- Cross-Platform: The server compiles and runs as a single binary on Linux, Windows, and FreeBSD.
- Slash Commands: Includes support for private messaging and user commands.
- Federation: Connect multiple SoftRoom servers together to create a chat network with synchronized usernames.
Just "cd" to the folder and run "go build". That's it. Run the executable file, it will create the config file with default settings. Change the settings in the config file and enjoy.
The server requires a GitHub OAuth App for user authentication.
- Navigate to your GitHub Settings -> Developer settings -> OAuth Apps.
- Click "New OAuth App".
- Fill the details:
- Application name: Name of your choice.
- Homepage URL: http://localhost
- Authorization callback URL: http://localhost (This is just a placeholder and is not used by the application).
- Activate the checkbox "Enable Device Flow".
- Click "Register application".
- On the next page, generate a new Client ID and copy it.
You DON'T NEED the "Client secret" at all. Just put the "Client ID" to the config file.
Connect to the server using any standard SSH client.
ssh <server_ip> -p <server_port> Use port from the config file of the server.
Right after connecting to the server, you will get a link to the GitHub OAuth page and the code what you should use at the provided link. As soon as you apply the code and grant the access for the application to get your username, you will be logged into the chat room.
Your SSH client must support pseudo-terminals (PTY), which is standard for most clients. Avoid to use Putty, it's prolematic and additional configuration is necessary.
- /h: Show the help message with all available commands.
- /u: List all users currently online in the chat (including users from connected servers).
- /w : Send a private message to a specific user.
- /s: List all connected federation servers.
SoftRoom supports server federation now, allowing multiple chat servers to connect in a network. Users can interact across all connected servers while maintaining unique usernames across the federation.
To set up federation, edit your softroom.ini file and add the servers you want to connect to under the [federation] section:
[federation]
# List of other SoftRoom servers to connect to
servers = server1.example.com:2222, server2.example.com:2222
known_hosts_path = ./federation_known_hosts
shared_secret = CHANGE_ME_TO_A_LONG_RANDOM_SECRETknown_hosts_path must point to an OpenSSH known_hosts file that contains host keys for all configured federation servers.
shared_secret must be the same strong random value on every server in the federation.
Each server in the federation must:
- Be accessible via SSH on the specified port
- Have federation enabled in their config
- Have unique hostnames/IPs to avoid conflicts
- Every servers in the federation should have each other in the config file
The federation system ensures:
- Usernames are unique across all connected servers
- Name changes are synchronized in real-time
- GitHub-authenticated users have priority for their GitHub usernames
- Private messages work seamlessly across servers
Use the /s command to see the list of currently connected federation servers and their status.
SoftRoom is released under the MIT License. This means you can:
- Use the software for commercial purposes
- Modify the software
- Distribute the software
- Use and modify the software privately
The only requirement is to include the original copyright and license notice in any copy of the software/source.