A terminal-based chat application built in Go. Share a chat room with friends over your Tailscale network - they connect via netcat or telnet, no client installation needed.
- Tailscale Integration - Share your chat server securely with anyone on your Tailnet
- Zero Client Setup - Users connect with just
ncortelnet - Colorful UI - Each user gets a unique color, styled messages with ANSI colors
- Message History - New users can see recent chat history (optional)
- Chat Commands -
/who,/me,/help,/quit - Rate Limiting - Built-in protection against spam
# Build make build # Run locally ./chat-server # Run with Tailscale (share with your network) export TS_AUTHKEY=tskey-auth-xxxxx ./chat-server --tailscale --hostname mychat --historyConnect from any machine:
nc mychat.your-tailnet.ts.net 2323git clone https://github.com/bscott/chat-tails.git cd chat-tails make build# Build docker build -t chat-tails . # Run locally docker run -p 2323:2323 chat-tails # Run with Tailscale docker run -e TS_AUTHKEY=tskey-auth-xxxxx chat-tails --tailscale --hostname mychat| Flag | Short | Default | Description |
|---|---|---|---|
--port | -p | 2323 | TCP port to listen on |
--room-name | -r | "Chat Room" | Name displayed in the chat |
--max-users | -m | 10 | Maximum concurrent users |
--tailscale | -t | false | Enable Tailscale mode |
--hostname | -H | "chatroom" | Tailscale hostname (requires --tailscale) |
--history | false | Enable message history for new users | |
--history-size | 50 | Number of messages to keep in history |
- Get an auth key from Tailscale Admin Console
- Set the environment variable:
export TS_AUTHKEY=tskey-auth-xxxxx - Run with Tailscale enabled:
./chat-server --tailscale --hostname mychat
- Share with others on your Tailnet - they connect with:
nc mychat.your-tailnet.ts.net 2323
If you see "Authkey is set; but state is NoState":
# Option 1: Force new login export TSNET_FORCE_LOGIN=1 # Option 2: Clear existing state rm -rf ~/Library/Application\ Support/tsnet-chat-server/ # macOS rm -rf ~/.local/share/tsnet-chat-server/ # Linux| Command | Description |
|---|---|
/who | List all users in the room |
/me <action> | Send an action (e.g., /me waves → * Brian waves) |
/help | Show available commands |
/quit | Disconnect from chat |
# Build make build # Run tests make test # Run a single test go test -v -run TestName ./internal/chat/ # Cross-compile for all platforms make build-all├── cmd/chat-tails/ # Application entry point ├── internal/ │ ├── chat/ # Room and client handling │ ├── server/ # Server lifecycle, Tailscale integration │ └── ui/ # Terminal styling (lipgloss) └── Makefile MIT