Upgrade (Compose)
Change SYNOGRAM_VERSION in .env, then pull. Extracting a newer bundle alone does not upgrade, since it never touches .env. migrate runs first and applies only the migrations not yet recorded; re-running it is a no-op.
Self-host
One Docker image, your own Supabase project. Fill in your hostnames once and every command and URL on this page becomes yours.
Overview
Three containers from one image on your host. Your data lives in your Supabase: auth, database, files and realtime. Supabase is brought, not bundled.
| Service | What it does |
|---|---|
migrate | One-shot. Applies the migrations to your database, records each in public.synogram_migrations, then exits. |
web | The Next.js app. Starts after migrate exits 0. |
caddy | Serves the app hostname and the user-content hostname to web, with automatic TLS. |
All three run the same image: server, migrate and bundle are subcommands of its entrypoint. It is built for linux/amd64 and linux/arm64.
Requirements
Docker Compose
Create an A (or AAAA) record for synogram.example.com and one for usercontent.example.com. Caddy gets certificates for both on first start, so DNS must resolve and ports 80 and 443 must be reachable before step 5.
The image carries its own compose file, Caddy config and .env.example.
Creates ./synogram/ with compose.yml, Caddyfile, .env.example, VERSION and helm/ (the Kubernetes chart). It never writes .env, so extracting a newer bundle over an install leaves your configuration alone.
.envBuilt from your values. Paste it into synogram/.env, then fill the lines marked paste. .env.example documents every optional setting.
| Value | Where to find it |
|---|---|
NEXT_PUBLIC_SUPABASE_URL, …ANON_KEY, SUPABASE_SERVICE_ROLE_KEY | Supabase → Project Settings → API. |
SUPABASE_JWT_SECRET | Same page, JWT Secret. Without it the MCP endpoint answers 503. |
DATABASE_URL | Project Settings → Database. On supabase.com use the Session pooler string (port 5432, IPv4): the Direct connection is IPv6-only without the IPv4 add-on, and Docker usually has no IPv6. Self-hosted Supabase on the same host: use host.docker.internal as the host. Used only by migrate. |
NEXT_PUBLIC_SUPABASE_URL host | Must resolve from both the browser and the web container. With Supabase on the same machine, localhost breaks the server and host.docker.internal breaks the browser: use a name or IP both resolve. |
SITE_SCHEME | Trying it over plain HTTP? Set SITE_SCHEME=http://; the Site URL and redirect URLs in step 4 then start http://. |
ELEVENLABS_WEBHOOK_* | Leave empty for now; step 7. |
The public values (NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, APP_HOST, NEXT_PUBLIC_STORAGE_MAX_BYTES, NEXT_PUBLIC_CAPTCHA_SITE_KEY, NEXT_PUBLIC_EXAGRAM_ORIGIN) are written into the browser app at every start. Set them once. Browsers cache the app's scripts, so after changing one, every user must hard-reload or clear site data.
These settings live in Supabase, not in the image.
Sign-up gate. The first start installs public.before_user_created; installing it does not switch it on.
Authentication → Hooks → Before User Created → Postgres function public.before_user_created. Do this after step 5, once the function exists.
# GoTrue (auth) service environment GOTRUE_HOOK_BEFORE_USER_CREATED_ENABLED=true GOTRUE_HOOK_BEFORE_USER_CREATED_URI=pg-functions://postgres/public/before_user_created
The hook refuses a sign-up with no address or a malformed one. It does not limit who may sign up: anyone with a verified address may.
<SUPABASE_URL>/auth/v1/callback (shown on that provider page), to the Google OAuth client's authorized redirect URIs. Add https://synogram.example.com/auth/callback only under Authentication → URL Configuration → Redirect URLs.{{ .Token }} in both: Authentication → Email Templates on supabase.com; on self-hosted Supabase, the GoTrue mailer template settings, or [auth.email.template.*] in a local supabase/config.toml.NEXT_PUBLIC_STORAGE_MAX_BYTES, or leave both unset for 2 GB.NEXT_PUBLIC_CAPTCHA_SITE_KEY and restart. Check that the sign-in page shows the Turnstile check and that a code still arrives. Only then enable CAPTCHA under Authentication → Attack Protection with the secret key. Enabled first, it refuses every emailed code.cd synogram docker compose up -d docker compose logs migrate | tail -3
migrate applies every migration, then exits; web waits for it. Expect migrations: N applied, 0 already present. Now switch on the hook from step 4 if you're on supabase.com.
Open https://synogram.example.com and sign in, using the emailed code. Then, from the synogram directory, run this once with that address:
docker compose exec web synogram admin you@example.com
It says "is now the platform owner". Run it for an address that has not signed in yet and it tells you to sign in first. The owner console, /console, lists every account on the install and is where you raise somebody's monthly recording minutes above the default 120.
ElevenLabs → Settings → Webhooks → new webhook at https://synogram.example.com/api/webhooks/elevenlabs. Put its signing secret in ELEVENLABS_WEBHOOK_SECRET and its id in ELEVENLABS_WEBHOOK_ID, both of them, then restart.
docker compose up -d
Long recordings transcribe in the background through this webhook: the id switches that on, the secret verifies each delivery. With only one of them set, web refuses to start. The app receives the webhook itself; no Supabase Edge Function is involved.
Verify
Kubernetes
The bundle carries a chart, pinned to the image's version, as a second install path beside Compose. You still bring Supabase, an ingress controller and DNS for both hosts, and do steps 4, 6 and 7 above.
A starting my-values.yaml, built from your values. Rendering fails naming whatever required value is missing; the chart's values.yaml lists the rest.
.env.example (DATABASE_URL, SUPABASE_SERVICE_ROLE_KEY, SUPABASE_JWT_SECRET, ARTIFACT_BODY_SECRET, ELEVENLABS_API_KEY, OPENROUTER_API_KEY, …), and set existingSecret: <name>. The chart then renders no Secret of its own.migrate runs as an initContainer on every pod, with the same advisory lock and idempotence as the Compose service, so several replicas starting at once are safe. migrate.enabled: false turns it off; migrate.baseline is MIGRATE_BASELINE.X-Forwarded-Host with the real host; ingress-nginx does unless use-forwarded-headers is on.ingress.annotations.scheme defaults to https://, so the Ingress must serve TLS for both hosts: set ingress.tls (one secret covering both, or one entry each), or let cert-manager issue them with its issuer annotation under ingress.annotations plus ingress.tls entries naming the secret to create. The chart does not require it, since TLS may terminate in front of the ingress.existingSecret the chart cannot see the change, so restart them yourself:kubectl rollout restart deployment -l app.kubernetes.io/instance=synogram
Once you have signed in (step 6), make yourself the platform owner:
kubectl exec deploy/synogram -c web -- synogram admin you@example.com
Replace synogram with your release name. The chart refuses an appHost equal to ucHost.
Later
Change SYNOGRAM_VERSION in .env, then pull. Extracting a newer bundle alone does not upgrade, since it never touches .env. migrate runs first and applies only the migrations not yet recorded; re-running it is a no-op.
Extract the new image's bundle, then upgrade the release. The chart's appVersion is the image version, so the image tag follows.
Schema already pasted in by hand? Set MIGRATE_BASELINE to the last migration prefix applied, for example MIGRATE_BASELINE=0079, for the first run. Files up to it are recorded as applied without running; later ones run normally. Clear it afterwards.
Set CADDY_SCHEME=http:// and keep SITE_SCHEME=https://: Caddy serves plain HTTP on port 80 while every link the app builds stays https://. Pass the original Host through.
Running the image without Caddy, your proxy must overwrite X-Forwarded-Host rather than pass on what the client sent: the app reads it to tell the two hostnames apart, and a client-supplied value would reach the whole app on the user-content host.
Troubleshooting
{{ .Token }} (step 4).synogram admin again.Scope
Questions: hello@synogram.app.