Synogram Cloud

Self-host

Run Synogram on your own servers.

One Docker image, your own Supabase project. Fill in your hostnames once and every command and URL on this page becomes yours.

Overview

What you're running

Three containers from one image on your host. Your data lives in your Supabase: auth, database, files and realtime. Supabase is brought, not bundled.

The browser connects to Caddy, which serves both hostnames to the web container; web and the one-shot migrate container talk to your Supabase; the browser also talks to Supabase directly. browser → Supabase directly (anon key; row-level security decides) Your Docker host Your Supabase Browser your users caddy TLS, :80 / :443 synogram.example.com usercontent.example.com web Next.js · :3000 → ElevenLabs, OpenRouter migrate runs once, exits 0 Auth + hook Postgres + RLS Storage Realtime https service key DATABASE_URL · applies new migrations, then web starts
ServiceWhat it does
migrateOne-shot. Applies the migrations to your database, records each in public.synogram_migrations, then exits.
webThe Next.js app. Starts after migrate exits 0.
caddyServes 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

Before you start

  • A Supabase project: supabase.com, or your own self-hosted Supabase. You need its URL, anon key, service-role key, JWT secret and Postgres connection string.
  • A host with Docker and Compose v2, ports 80 and 443 open to the internet. For Kubernetes, see Helm.
  • Two DNS names you control, pointing at that host: the app, and a second one for shared document bodies. The second origin is a security boundary, not a convenience.
  • Sign-up is open, and that is a decision to take knowingly. Anyone with a verified address can sign in and gets a private Personal workspace; a team is joined by invitation or by a domain the team claims. Spending is bounded by the monthly recording minutes and the per-account rate limits.
  • An ElevenLabs API key (transcription) and an OpenRouter API key (summaries, Ask).
  • SMTP credentials, for email sign-in codes.

Docker Compose

Install

  1. Point both hostnames at the host

    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.

  2. Unpack the install bundle

    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.

  3. Write .env

    Built from your values. Paste it into synogram/.env, then fill the lines marked paste. .env.example documents every optional setting.

    ValueWhere to find it
    NEXT_PUBLIC_SUPABASE_URL, …ANON_KEY, SUPABASE_SERVICE_ROLE_KEYSupabase → Project Settings → API.
    SUPABASE_JWT_SECRETSame page, JWT Secret. Without it the MCP endpoint answers 503.
    DATABASE_URLProject 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 hostMust 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_SCHEMETrying 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.

  4. Configure Supabase

    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.

    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.

    • Google sign-in. Authentication → Providers → Google. Add Supabase's own callback, <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.
    • Site URL. Authentication → URL Configuration → https://synogram.example.com.
    • Email. Configure SMTP and keep Confirm email on: with auto-confirm, anyone could register an address they don't own. Supabase's built-in mailer is rate-limited to a couple of emails an hour, for trying it out only.
    • Email templates. The default Confirm signup and Magic Link templates hold only a link, but the app asks for a code, so a first sign-in would get an email with no code. Put {{ .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.
    • Upload limit. Storage → Settings → Upload file size limit. Put the same byte count in NEXT_PUBLIC_STORAGE_MAX_BYTES, or leave both unset for 2 GB.
    • CAPTCHA (optional), in this order. Put a Cloudflare Turnstile site key in 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.
  5. Start it

    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.

  6. Make yourself the owner

    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.

  7. Connect the ElevenLabs webhook

    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

Check it works

Kubernetes

Install with Helm

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.

  • Secrets out of values files. Create a Secret yourself, keyed by the env var names in .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.
  • Migrations. 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.
  • Ingress. One Ingress routes both hosts to the one Service and replaces Caddy. The controller must overwrite X-Forwarded-Host with the real host; ingress-nginx does unless use-forwarded-headers is on.
  • Body size and streaming. The ElevenLabs callback for long audio is several MB, and Ask streams its answer. The default annotations raise ingress-nginx's body limit to 64m and turn off buffering; on another controller, set the equivalents under ingress.annotations.
  • TLS. 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.
  • Changing secrets. A change to the chart-rendered Secret rolls the pods. With 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

Upgrade and operate

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.

Upgrade (Helm)

Extract the new image's bundle, then upgrade the release. The chart's appVersion is the image version, so the image tag follows.

Existing Supabase project

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.

Behind your own TLS proxy

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

If something's off

Someone I don't know signed up
Sign-up is open by design. A new account sees only its own Personal workspace and what is shared with it. Ban an account under Authentication → Users in Supabase.
The sign-in email has a link but no code
The Confirm signup and Magic Link templates don't contain {{ .Token }} (step 4).
The admin command says someone hasn't finished signing in
That address has an account that never confirmed its email. Sign in with the emailed code, then run synogram admin again.
Sign-in loops back to the login page
Site URL or Redirect URLs in Supabase don't match https://synogram.example.com.
A recording stays "processing"
The webhook can't reach the app at https://synogram.example.com/api/webhooks/elevenlabs.
A changed public value doesn't show
Browsers cached the old scripts. Hard-reload, or clear the site's data.

Scope

Not supported

  • A bundled Postgres or Supabase.
  • Restricting sign-up to one email domain.
  • Storage backends other than Supabase Storage.
  • The Supabase Edge Function webhook.
  • Image signing, and a chart registry: the chart ships inside the image.
  • The Synogram Mac and iPhone apps: their Supabase project is compiled in. Use the browser.
  • Changing the public values without users hard-reloading.

Questions: hello@synogram.app.