Configuration
Homelander is configured only with environment variables. There is no config file: on Docker they come from .env next to compose.yaml, on Railway from the service's Variables, locally from .env (read by make run).
The full, commented list is .env.example in the repository (each release ships it as env.example). A test keeps that file in step with the code, so it is always complete. Everything else (the community name, houses, modules, backup schedule, notifications) is set in the admin panel and kept in the database.
Secrets
APP_SECRET, TELEGRAM_BOT_TOKEN, TELEGRAM_WEBHOOK_SECRET, the BACKUP_S3_* keys and BACKUP_AGE_IDENTITY are secrets. Never commit them, paste them into a chat or an issue, or put them into a file in the repository.
Required
| Variable | What it is |
|---|---|
APP_SECRET | HMAC key for login codes and tokens, at least 32 bytes. Generate it with openssl rand -hex 32. Changing it later breaks links already sent and moves the Telegram webhook path. |
PUBLIC_URL | The base address people open, e.g. https://homes.example.com. Must be https; plain http is allowed only for localhost. On Railway it follows the generated domain. No domain of your own? See Without your own domain. |
TELEGRAM_BOT_TOKEN | The bot token from @BotFather. Use a separate bot for development. |
The first admin
| Variable | Default | What it is |
|---|---|---|
BOOTSTRAP_ADMIN_PHONE | — | Your phone in international format (+380…). The person who shares this number with the bot becomes the first admin. Used only while no admin exists; you can remove it afterwards. |
Telegram
| Variable | Default | What it is |
|---|---|---|
TELEGRAM_UPDATES | polling | How the bot receives updates. polling needs no inbound connection (home servers, development). webhook is what Railway uses. |
TELEGRAM_WEBHOOK_SECRET | — | Required with webhook. Telegram sends it back with every update. Only A-Z a-z 0-9 _ -; openssl rand -hex 32 fits. |
Network
| Variable | Default | What it is |
|---|---|---|
HTTP_ADDR | :8080 | Listen address. Leave it unset on Railway: the app then listens on $PORT. |
PORT | — | Set by the platform (Railway), not by you. |
TRUST_PROXY | false | true when a reverse proxy or tunnel sits in front (Caddy, Cloudflare Tunnel, Railway): the client IP is taken from X-Forwarded-For. Without it every visitor looks like the proxy, and rate limits are shared by everyone. |
Storage and backups
| Variable | Default | What it is |
|---|---|---|
DATABASE_PATH | ./data/homelander.db | The SQLite file; its folder is created on start. The Docker image sets /data/homelander.db (the volume), so leave it unset there. |
BACKUP_DIR | backups/ next to the database | Local folder for backups. |
BACKUP_DISABLED | false | true: no scheduled backups whatever the panel says (e.g. a staging copy of production data). Manual backups still work. |
BACKUP_S3_ENDPOINT, BACKUP_S3_BUCKET, BACKUP_S3_ACCESS_KEY_ID, BACKUP_S3_SECRET_ACCESS_KEY | — | An S3-compatible bucket every encrypted backup is copied to. All four are needed once any is set. |
BACKUP_S3_PREFIX | bucket root | Folder inside the bucket, such as homelander/. |
BACKUP_S3_REGION | asked from the storage | auto for Cloudflare R2. |
BACKUP_S3_PATH_STYLE | auto | path (https://host/bucket, MinIO) or virtual (https://bucket.host). |
BACKUP_AGE_IDENTITY | — | The backup private key, only while restoring on a host where you can set nothing but variables (Railway). Remove it right after. |
The schedule, history and encryption key are set in the panel. See Backups and restore.
People and sessions
| Variable | Default | What it is |
|---|---|---|
DEFAULT_LOCALE | uk | uk or en: the language used until an admin picks the site's default language in the panel (Site). Each person can switch. |
DEFAULT_PHONE_REGION | UA | Region used to read phone numbers typed without a country code. |
SESSION_IDLE_TTL | 12h | A session ends after this long without activity. |
SESSION_MAX_TTL | 168h | A session ends after this long whatever happens. |
AI agents and updates
| Variable | Default | What it is |
|---|---|---|
MCP_REDIRECT_URIS | Claude, ChatGPT and loopback | Comma-separated redirect URIs that AI agents may register. See AI agents (MCP). |
UPDATE_CHECK_DISABLED | false | true: never ask GitHub for a newer release. A release build checks once a day, anonymously, and shows "vX.Y.Z available" to admins. |
LOG_LEVEL | info | debug, info, warn or error. |
Command line
The same binary runs the service and a few maintenance commands. In the container they are /homelander <command> (docker compose run --rm homelander <command>).
| Command | What it does |
|---|---|
homelander | Runs the service. |
homelander backup | Takes one backup now with the stored settings. |
homelander backup keygen | Prints a new age key pair for backup encryption. |
homelander backup list | Lists backups in the local folder and in S3. |
homelander restore --from <file | s3:<name> | s3:latest> [--identity <key file>] --yes | Restores a backup. Stop the service first. |
The maintenance commands need only DATABASE_PATH, BACKUP_DIR and the BACKUP_S3_* variables.
Endpoints
| Path | What it is |
|---|---|
/ | The community's home page |
/login, /register | Sign in with a code from Telegram; apply to join |
/admin | The admin panel |
/my | The resident cabinet (installable as an app) |
/p/<slug> | Simple pages, such as the house rules |
/mcp | The MCP server for AI agents |
/healthz | Health check: {"status":"ok"} |