Skip to content

Docker

The image ghcr.io/hytte-chat/hytte is built for linux/amd64 and linux/arm64. It contains only the static binary on distroless, runs as an unprivileged user (UID 65532), keeps its data in /data and listens on port 8000.

Tag What it is
latest The newest stable release
v0.1.0, … A specific release, including prereleases such as v0.1.0-rc.1
Terminal window
docker run -d --name hytte -p 127.0.0.1:8000:8000 -v hytte-data:/data ghcr.io/hytte-chat/hytte
docker exec hytte hytte -d /data -u ingrid # first account (admin), prints a setup link

Open http://localhost:8000 on the same machine. Any other address needs HTTPS, because the browser does the encryption and only allows it on a secure address.

Options go after the image name: they’re the same as hytte -h. The image already sets -d /data.

Terminal window
docker run … ghcr.io/hytte-chat/hytte -p 8000 -r --domain chat.example.com

This is the example from the repository (examples/compose.yaml), with an optional cloudflared sidecar for a stable URL through Cloudflare:

services:
hytte:
image: ghcr.io/hytte-chat/hytte:latest
restart: unless-stopped
# Any `hytte -h` option, e.g. "-r" for open sign-up or
# "--domain chat.example.com" with the tunnel below.
command: ["-p", "8000"]
environment:
- GIPHY_API_KEY=${GIPHY_API_KEY:-}
ports:
- "127.0.0.1:8000:8000"
volumes:
- hytte-data:/data
# Optional: publish hytte on your own domain through a named Cloudflare
# tunnel. In the Cloudflare dashboard, give the tunnel a public hostname
# (e.g. chat.example.com) pointing to http://hytte:8000, start hytte with
# "--domain chat.example.com", then:
# TUNNEL_TOKEN=... docker compose --profile tunnel up -d
cloudflared:
image: cloudflare/cloudflared:latest
profiles: ["tunnel"]
restart: unless-stopped
command: ["tunnel", "--no-autoupdate", "run"]
environment:
- TUNNEL_TOKEN=${TUNNEL_TOKEN:-}
depends_on:
- hytte
volumes:
hytte-data:
Terminal window
docker compose up -d
docker compose exec hytte hytte -d /data -u ingrid

Behind a reverse proxy on the same host, keep the port bound to 127.0.0.1 and point the proxy at it. See Behind a reverse proxy.

Terminal window
docker compose pull && docker compose up -d

Database migrations run automatically at startup. Back up the volume first: see Data and backups.