Host Team OSConfiguration

Environment variables

Set the required Team OS API and Postgres variables.

Set these variables before you start the hosted Team OS API.

Core API and database

VariableRequiredExampleNotes
MEMORY_STORE_BACKENDyespostgresForces hosted Postgres.
MEMORY_DATABASE_URLyespostgres://postgres:<password>@postgres:5432/agentic_memoryUse the private database URL.
PGSSLMODEdependsdisableUse disable for private networks. Use require when the database needs TLS.
MEMORY_API_TOKENyesgenerated secretInternal dev fallback token. Keep it secret.
MEMORY_API_PORTno8787API port. If unset, the server uses PORT, then 8787.
MEMORY_EMBEDDERnobge-m3Default is bge-m3.
MEMORY_EMBEDDING_MODELnobge-m3Optional explicit model label.
MEMORY_EMBEDDING_DIMno1024Optional explicit dimension.
MEMORY_API_SERVER_EMBEDDINGSno1Lets /v1/memory/search accept embeddingMode: "server". If unset, callers must send queryEmbedding.
MEMORY_MODEL_CACHE_DIRno/data/agentic-os/.command-centre/modelsOptional BGE-M3 model cache. If unset, the API uses AGENTIC_OS_DIR/.command-centre/models.
AGENTIC_OS_DIRyes for Docker/data/agentic-osWorkspace and runtime data root. Mount it to persistent storage.

Auth, public URLs, and server principal

VariableRequiredExampleNotes
BETTER_AUTH_SECRETyesgenerated secretAuth signing secret. Use a strong random value.
MEMORY_API_PUBLIC_URLyeshttps://team.example.comPublic URL users enter when they sign in.
BETTER_AUTH_URLyeshttps://team.example.comUsually the same value as MEMORY_API_PUBLIC_URL.
TEAM_OS_PUBLIC_URLnohttps://team.example.comFallback public URL for admin tools.
MEMORY_API_TEAM_ID + MEMORY_API_USER_IDeither this pairbackend idsFixed server principal for the dev fallback token.
MEMORY_API_TEAM_SLUG + MEMORY_API_USER_EMAILor this pairacme, owner@example.comHuman-readable server principal.
MEMORY_API_BOOTSTRAP_TEAM_SLUG + MEMORY_API_BOOTSTRAP_OWNER_EMAILfirst setupacme, owner@example.comCreates or resolves the first Team and Team Owner. The first setup also assigns the first Company Owner.
MEMORY_API_BOOTSTRAP_TEAM_NAMEnoAcmeDisplay name for the first Team.
MEMORY_API_BOOTSTRAP_OWNER_NAMEnoOwner ExampleDisplay name for the first owner.

Hosted Postgres mode requires a server principal. For the first startup, use the bootstrap Team slug and owner email.

After the first startup, you can keep the slug and email pair. You can also switch to the backend ID pair.

Postgres service variables

Set these variables on the Postgres service:

VariableRequiredExampleNotes
POSTGRES_USERyespostgresDatabase user.
POSTGRES_PASSWORDyesgenerated secretStrong database password.
POSTGRES_DByesagentic_memoryDatabase name used in MEMORY_DATABASE_URL.

Do not commit real database URLs, API tokens, auth secrets, encryption keys, or passwords. Keep real values in your host's secret manager.

Next: Secrets and workspace backup

On this page