remo · documentation
AI RU

Settings and environment variables

Server variables: database, keys, metrics, agents, webhook, and what happens when they are unset.

Status: available updated 2026-11-06

Main

Variable What it sets Without it
DATABASE_URL Postgres with rooms, IAM and the journal; connection as the application role remo_app the service refuses to start if a database is set but unreachable; without the variable disk mode works
REMO_MIGRATION_DATABASE_URL Postgres for schema and maintenance: migrations, db:check, db:orphans, db:rls; connection as the owner role the service uses DATABASE_URL for schema too; RLS needs two roles
PORT port of the sync service 1234
REMO_DATA_DIR directory for disk mode apps/sync/.data

The service connects as remo_app: DML only, no table ownership and no BYPASSRLS. Schema and maintenance use the owner role through REMO_MIGRATION_DATABASE_URL; the owner must be a superuser or have BYPASSRLS.

Example

# /srv/remo/.env, mode 600, owned by the service user
DATABASE_URL=postgres://remo_app:<app password>@127.0.0.1:5432/remo
REMO_MIGRATION_DATABASE_URL=postgres://remo:<owner password>@127.0.0.1:5432/remo
NODE_ENV=production
PORT=1234
REMO_APP_ORIGIN=https://boards.example.com
REMO_CORS_ORIGIN=https://boards.example.com
REMO_METRICS_TOKEN=<32 random bytes>
REMO_DATA_DIR=/var/lib/remo
REMO_KEK=<openssl rand -base64 32>
REMO_KEK_ID=v1

Security and keys

Variable What it sets
REMO_KEK wrapping key for secrets: 32 bytes in base64
REMO_KEK_ID key version, v1 by default
REMO_APP_ORIGIN application address for links in emails and invitations
REMO_CORS_ORIGIN allowed origin for the API; * by default

Without REMO_KEK a provider key cannot be added and a webhook cannot be set up: the server answers WEBHOOK_LOCKED or AI_CREDENTIALS_LOCKED. Secrets already stored are not decrypted if the key is lost.

Metrics

Variable What it sets
REMO_METRICS_DATABASE_URL separate database for product metrics
REMO_METRICS off disables instrumentation explicitly
REMO_METRICS_TOKEN token for /metrics; required in production

Metrics are never written to the rooms database.

Agents

Variable What it sets
REMO_AI_API_KEY, REMO_AI_BASE_URL, REMO_AI_MODEL default provider
REMO_AI_TIMEOUT_MS timeout of a model call
REMO_AGENT_MAX_TOKENS, REMO_AGENT_MAX_COST_USD, REMO_AGENT_MAX_ACTIONS upper bounds of the budget
REMO_AGENT_MAX_QUEUED how many tasks can wait at once

Without a key tasks finish with AI_NOT_CONFIGURED; the rest of the product works.

Proxy and limits

Variable What it sets
REMO_TRUST_PROXY 1 trusts X-Forwarded-For behind a reverse proxy
REMO_LOGIN_LIMIT sign-in attempts per email + IP in 15 minutes; 10 by default
REMO_LOGIN_IP_LIMIT sign-in attempts from one IP in 15 minutes; 100 by default
REMO_REGISTER_LIMIT registrations from one IP per hour; 20 by default
REMO_HASH_CONCURRENCY parallel password hashes; 4 by default
REMO_AI_ALLOW_PRIVATE 1 allows AI outbound to a private network; off by default

Saving quotas

Variable What it sets
REMO_WS_RATE_BYTES bytes per second per connection; 256 KiB/s by default
REMO_WS_BURST_BYTES burst per connection; 16 MiB by default
REMO_ORG_WS_RATE_BYTES bytes per second per organisation; 2 MiB/s by default
REMO_ORG_WS_BURST_BYTES burst per organisation; 64 MiB by default
REMO_ROOM_MAX_BYTES encoded room size; 64 MiB by default
REMO_ROOM_FULL_FRAME_BYTES largest edit a full room still accepts; 16 KiB by default
REMO_ROOM_MAX_OBJECTS objects in a room; 20 000 by default

One frame cannot exceed 16 MiB. An invalid variable value is ignored and the default stays.

Webhook and debugging

Variable What it sets
REMO_WEBHOOK_ALLOW_PRIVATE 1 allows an endpoint on the internal network
REMO_DEBUG verbose messages about save acknowledgements
REMO_VISITOR_SECRET signs the visitor identity in voting; without it the identity changes after a restart
REMO_AI_PRICE_INPUT_PER_MTOK, REMO_AI_PRICE_OUTPUT_PER_MTOK token prices used to cost a task
REMO_AI_ANCHOR_DIR, REMO_AI_ANCHOR_URL, REMO_AI_ANCHOR_TOKEN where the service writes the journal hash-chain head

Where to go next

Limits — default values for these settings.