Files
rhema-together/deploy/helm/rhema-together
vhaudiquet 3b82719d56 feat: add account avatars and a deployable image
Accounts get a profile page with an uploaded picture, shown in the
sidebar, the room bar, and every human message. Pictures live in the
SQLite database and are served through an authenticated route.

Hardening from the security audit: preview hosts expire after 24 hours
and carry no-referrer; removing a member or archiving a room ends their
event feed, presence socket, and terminal within seconds; previews and
the terminal pin the SSH host key; invites are claimed atomically;
missing accounts spend the same argon2 time as wrong passwords;
registration is closed by default; WebSockets check the origin; and the
master key is created with mode 0600.

The Dockerfile builds one image with the static client and the server.
The Helm chart runs a single replica with a SQLite volume, a wildcard
preview ingress, and the proxy settings the event feed and uploads
need. It refuses more than one replica because state is in process.
2026-11-28 02:07:26 +01:00
..

Rhema Together Helm chart

This chart runs one rhema-together pod with a persistent volume for the SQLite database and the master key. The pod serves the API, the built client, the terminal WebSocket, the event stream, and the preview proxy.

Build the image

docker build -t registry.example.com/rhema-together:0.1.0 .
docker push registry.example.com/rhema-together:0.1.0

The Dockerfile clones the Rhema framework at v0.5.1 because this repository consumes its crates by path. Override the pin with --build-arg RHEMA_REF=<tag> if you move the framework.

Values

Copy values.yaml and change at least these fields:

image:
  repository: registry.example.com/rhema-together
  tag: "0.1.0"

app:
  publicUrl: "https://together.example.com"
  previewOrigin: "https://preview.together.example.com"
  allowRegistration: false

ingress:
  enabled: true
  className: nginx
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: "4m"
    nginx.ingress.kubernetes.io/proxy-buffering: "off"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
  hosts:
    - host: together.example.com
      paths:
        - path: /
          pathType: Prefix
    - host: "*.preview.together.example.com"
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: rhema-together-tls
      hosts:
        - together.example.com
        - "*.preview.together.example.com"

publicUrl and previewOrigin must match the hosts and scheme in the ingress. Cookies use Secure only when publicUrl starts with https://; if the browser reaches the app on a different origin, login fails or invite links point elsewhere.

The preview host is a wildcard because each preview gets a signed subdomain. Point *.preview.example.com at the ingress and issue a certificate for that wildcard. With cert-manager, that requires a DNS-01 solver for the zone; an HTTP-01 solver cannot issue wildcards.

The nginx annotations are not cosmetic. The event feed is server-sent events, so proxy buffering must be off. Avatar uploads are up to 2 MB, so the body size must exceed nginx's 1 MB default. The terminal and preview tunnels use WebSockets and long-lived connections, hence the timeouts.

Install

helm upgrade --install together deploy/helm/rhema-together \
  --namespace together --create-namespace \
  -f my-values.yaml

The first-run setup token is in the pod log:

kubectl logs deploy/together-rhema-together -n together | grep setup

Open the app, finish setup, add a provider and an SSH sandbox under Settings, then create a room.

Operational notes

  • Run one replica. The database is SQLite and preview tunnels and turn state live in the process. The chart refuses a higher replicaCount.
  • The chart uses Recreate, so an upgrade stops the old pod before the new one starts. A rolling update would put two writers on one SQLite file.
  • The data volume holds together.db, its WAL files, and secret.key. Losing secret.key makes the stored provider and SSH keys unreadable. Back up the volume, or snapshot the PVC, as one unit.
  • Registration is closed by default. Set app.allowRegistration: true only when any visitor should be able to make an account. Setup and invite links work with it closed.
  • A real account can add an SSH target, and the server then connects where that account says. Keep registration closed unless you trust everyone who can reach the signup page.
  • Preview hosts are signed capabilities that expire after 24 hours. Reloading the room mints a fresh address; a copied address works for that port until it expires.
  • The container runs as UID 10001 with a read-only root filesystem. /data and /tmp are writable. An existing PVC must be writable by GID 10001; the chart sets fsGroup for that.
  • Set app.previewOrigin: "" to disable previews. The ingress wildcard can then be removed.