Skip to content

Configuration reference

These variables go in the .env file next to docker-compose.yml. The setup script writes the essential ones for you; this page is for checking them, changing them, or running the Docker image without the bundle.

Defaults below are the bundle’s when it sets one, and the server’s own otherwise.

Variable When Description Example
COMMUNITY_PUBLIC_URL Always Public base URL of this server, with scheme and host and no path. Cloud servers register it with Tusile as the address apps connect to. It also builds the LiveKit URL and the absolute links to uploads and emoji, which is why Offgrid needs it too. Compose substitutes no default, so it must be in .env, and it must match the domain in the Caddyfile. https://community.example.com
SERVER_TOKEN Cloud The token from creating your server in the app. Registers the server and keeps its listing up to date. Ignored (forced empty) when OFFGRID_MODE=true. abc123...
LIVEKIT_API_KEY Always LiveKit key used to sign voice room tokens. The setup script generates it; by hand, run docker run --rm livekit/livekit-server generate-keys. No default: neither Compose nor the server starts without it. APIabcd1234wxyz
LIVEKIT_API_SECRET Always The secret paired with the key. Anyone holding it can sign a token for any voice room on your server, so treat it like a password and never reuse an example value. a long random string
DATABASE_URL Image only Postgres connection string. The bundle points it at its own postgres service, so you only set it when running the image without the bundle. postgres://user:pass@db:5432/tusile_community?sslmode=disable
Variable Default Description
OFFGRID_MODE empty (Cloud) true runs the server standalone: it mints its own signing key, issues its own accounts, and never contacts tusile.com. SERVER_TOKEN and CORE_SERVER_URL are forced empty. See Install.
CORE_SERVER_URL https://api.tusile.com The Tusile service a Cloud server registers with and fetches the sign-in key from. The default is the bundle’s; you only set it to point somewhere else. Required on Cloud when running the image on its own.
Variable Default Description
LIVEKIT_URL empty Explicit LiveKit WebSocket URL to hand to apps. When empty, it is built from the host of COMMUNITY_PUBLIC_URL and LIVEKIT_PORT, as wss://host:7880.
LIVEKIT_PORT 7880 Port used to build the LiveKit URL when LIVEKIT_URL is empty.
LIVEKIT_API_URL http://livekit:7880 LiveKit’s server API as reached from the community-server container. Drives server-side voice moderation (kick, server mute) and the repair loop that clears people LiveKit dropped from a channel’s list. Left empty, moderation is advisory only and the repair loop does not run. The default is the bundle’s; the server itself has none.
LIVEKIT_CONFIG livekit.prod.yaml LiveKit config file, relative to the bundle folder. Bundle only.
LIVEKIT_RTC_PORT 7881 Host port for LiveKit ICE/TCP. Bundle only.
LIVEKIT_TURN_UDP_PORT 3478 Host port for TURN/UDP. Bundle only.
LIVEKIT_TURN_TLS_PORT 5349 Host port for TURN/TLS. Bundle only.
LIVEKIT_RTP_PORT_START, LIVEKIT_RTP_PORT_END 50000, 50060 The published RTP media range. Must match rtc.port_range_start and rtc.port_range_end in livekit.prod.yaml, because LiveKit advertises those port numbers. About one port per simultaneous voice user, so widen both together (and your firewall rule) for a busy server. Bundle only.
TURN_DOMAIN host of COMMUNITY_PUBLIC_URL Domain whose certificate livekit-cert-sync copies to LiveKit for TURN/TLS. Set it only to use a different domain. Bundle only.

LiveKit’s own key pair is not set in livekit.prod.yaml: Compose passes LIVEKIT_API_KEY and LIVEKIT_API_SECRET to LiveKit as LIVEKIT_KEYS, which replaces the file’s keys: block.

Variable Default Description
STORAGE_BACKEND local Where uploaded files go: local or s3. Any other value stops the server at startup.
STORAGE_LOCAL_PATH /app/uploads Upload folder for local storage. The bundle keeps it on the community-uploads volume.
S3_BUCKET, S3_REGION, S3_ACCESS_KEY, S3_SECRET_KEY empty All four are required when STORAGE_BACKEND=s3; the server refuses to start with one missing.
S3_ENDPOINT empty Custom endpoint, for an S3-compatible provider.
S3_PUBLIC_URL empty Public base URL files are served from, when it differs from the bucket’s own.
S3_KEY_PREFIX empty Prefix for every object key, for a bucket shared with other servers. Empty is right for a bucket of your own. Not passed by the bundle.
UPLOAD_MAX_SIZE 52428800 (50 MB) Attachment size cap in bytes. It applies only on Tusile’s free hosting: a self-hosted server does not cap attachments, so this has no effect there. Server icons, banners and avatars keep their own fixed limits.
UPLOADS_COMPRESS_ENABLED off Set true (or 1, yes, on) to re-encode uploaded images and videos with ffmpeg. Off by default; thumbnails are made either way. Leave it off on small instances, where video encoding pegs the CPU. Not passed by the bundle.
UPLOADS_COMPRESS_CONCURRENCY 1 How many ffmpeg jobs run at once. Not passed by the bundle.
Variable Default Description
PORT 9090 In the bundle: the host port the community API is published on, next to Caddy; the container still listens on 9090. For the image on its own: the port the server listens on.
CORS_ALLOWED_HOSTS empty Extra browser origins allowed to call this API, as comma-separated hostnames. The host of COMMUNITY_PUBLIC_URL is always allowed.
UNFURL_IMAGE_SECRET random per start Key that signs link-preview image links. Unset, a new key is made at every start, so preview images loaded before a restart stop loading. Set any long random string to keep them. Not passed by the bundle.
INVITE_LANDING_PAGE off true makes a browser opening the server’s own address (/, /<code> or /invite/<code>) land on a small page that forwards to the web app’s join screen, instead of a bare 404. Never on Offgrid. Not passed by the bundle.
APP_BASE_URL https://app.tusile.com The web app the invite landing page forwards to. Not passed by the bundle.
Variable Default Description
DATA_DIR /app/data Holds the install ID, the Offgrid owner claim token and, on Offgrid, community_key, the signing key the server’s identity is derived from. The bundle keeps it on the community-data volume. It must be on a persisted volume and in your backups: losing it on Offgrid invalidates every session and changes the server ID.
COMPOSE_PROJECT_NAME written by setup Compose project name, which prefixes every volume. Setup writes community-<hash> for new installs (community-offgrid-<hash> on Offgrid). Without the line, Compose falls back to community-${SERVER_TOKEN} (or community-default with no token), which is what installs from before 30 July 2026 still use. Never change it on a running deployment: the stack would attach to new, empty volumes. Never write it empty; leave the line out instead.
MIGRATIONS_PATH ./migrations Folder of database migrations. The image ships them; you never need to set this.

The server also reads variables that only Tusile’s managed hosting uses: MULTI_TENANT_MODE, PROVISIONING_SECRET, COMMUNITY_BASE_URL, LIVEKIT_MINT_URL, LIVEKIT_PROXY_TOKEN, MANAGED_HOSTING_RECOMMENDED_MEMBERS, DELETED_TENANT_RETENTION_DAYS, STARTUP_MIGRATION_WORKERS, TENANT_DB_MAX_CONNS, LOAD_CPU_HIGH_PCT, LOAD_CPU_NORMAL_PCT, LOAD_SAMPLE_SECONDS and LOAD_HOST_NET_DIR. Leave them unset. OFFGRID_MODE and MULTI_TENANT_MODE cannot be combined.

OWNER_USER_ID has no effect either: a Cloud server takes its owner from Tusile when it registers, and an Offgrid server from the claimed owner account, and both overwrite it at startup. TEST_DATABASE_URL, TENANT_BOOT_BENCH_DSN, TENANT_BOOT_BENCH_N and TENANT_BOOT_BENCH_WORKERS are read only by the server’s own test suite.

Your backup plan always needs the database and the community-data volume. With local storage, also include the community-uploads volume; with S3, back up the bucket with your provider’s tools. See Backup and restore.