SupaKnock
Menu
Browse topics Your domain and HTTPS
← Developer reference

Install and maintain

Your domain and HTTPS

Put your installation behind HTTPS and configure its public address.

For example, https://support.example.com. Point that hostname’s DNS record at your server, then have your reverse proxy provide HTTPS and forward requests to SupaKnock on port 8000. Caddy, Nginx and Traefik can all do this.

  1. In the Compose service’s environment, change PUBLIC_BASE_URL to your exact HTTPS origin and COOKIE_SECURE to "true". Keep the database and volume settings.
  2. If your proxy runs directly on the same host, keep the localhost port binding and forward to 127.0.0.1:8000. If your proxy is another container, put both services on a shared Docker network and forward to supaknock:8000; remove SupaKnock’s ports block. Inside the proxy container, localhost refers to the proxy itself.
  3. Allow WebSocket upgrades on the same route for live chat. Set TRUSTED_PROXY_IPS to only your actual proxy addresses so connection history and rate limits use the client’s IP. Use a stable proxy address; do not set this to *.
  4. Run docker compose up -d supaknock to apply the settings. Open https://support.example.com/setup for a new installation, or /login for an existing one.
# Replace these two values in the existing environment block:
PUBLIC_BASE_URL: https://support.example.com
COOKIE_SECURE: "true"

Use your own hostname in place of support.example.com. The browser’s origin must match PUBLIC_BASE_URL, including any nonstandard port. A mismatch can cause sign-in or save requests to be rejected. Expose the HTTPS proxy publicly and keep the application port private.

This is your own installation. supaknock.com is the project website, and relay.supaknock.com is only the optional iPhone push relay. Neither is the server URL for your self-hosted data.

These docs describe the current source. Check your server’s /api/v1/openapi.json for the version you run.