Install

Prerequisites: Go 1.26+ and PostgreSQL 16+. Optional for full functionality: any S3-compatible object store (attachments) and a self-hosted ntfy server (UnifiedPush for Android).

1. Build

From a checkout of gochathub-server:

go build -o gochathub-server ./cmd/chatserver

2. Migrate

Start-up never migrates implicitly — apply migrations first:

DATABASE_URL="postgres://user:pass@host:5432/gochathub" gochathub-server migrate

DATABASE_URL is the only required setting. LISTEN_ADDR defaults to :8080.

3. Create an admin user

gochathub-server user create alice   # or: user list | passwd | enable | disable | delete

Tokens print raw once — store them when you create them:

gochathub-server token create alice

4. Serve

gochathub-server serve

The server listens on :8080. Point the web client at that URL and log in.

5. Clients and API