Skip to content

Environment variables

Dopbase reads the following environment variables. Command-line options take precedence when both are set. For server settings, environment variables take precedence over values in server.toml.

VariableSample value
What it is used for
DOPBASE_TOKENdbs_xxxxxxxxxxxxxxxxxAuthenticates client commands with a runner or AI agent token. For run, it has lower priority than --token and higher priority than the encrypted credential saved by dopbase login.
DOPBASE_URLhttps://dopbase.example.comSelects the server for client commands when the global --server option is not set.
DOPBASE_ENVpayment-service/productionSelects the environment for dopbase run when no positional environment is given. An immutable ID such as env_482731 also works.
DOPBASE_DATA_DIR/srv/dopbaseChanges the directory used for server data and local CLI configuration. The default is ~/.dopbase.
DOPBASE_HOST0.0.0.0Sets the network interface used by dopbase server start and dopbase server up. The default is 127.0.0.1.
DOPBASE_PORT9000Sets the server port. The default is 8840.
DOPBASE_PUBLIC_URLhttps://dopbase.example.comSets the URL shown to clients and used in generated links. A non-loopback host requires an HTTPS public URL.
DOPBASE_DOCStrueEnables or disables Swagger UI and the OpenAPI document. Accepted values are true and false; the default is false.
DOPBASE_MASTER_KEY_PATH/srv/dopbase/master.keyReads the server master key from the given file instead of <data-dir>/master.key.
DOPBASE_SHUTDOWN_GRACE_SECONDS30Sets how long the server waits for in-flight requests during shutdown. The default is 10 seconds.

Examples

Run an application against a remote environment:

bash
export DOPBASE_URL=https://dopbase.example.com
export DOPBASE_TOKEN=dbs_xxxxxxxxxxxxxxxxx
export DOPBASE_ENV=env_482731

dopbase run -- ./payment-service

Start a self-hosted server with environment-based configuration:

bash
export DOPBASE_DATA_DIR=/srv/dopbase
export DOPBASE_HOST=0.0.0.0
export DOPBASE_PORT=9000
export DOPBASE_PUBLIC_URL=https://dopbase.example.com
export DOPBASE_MASTER_KEY_PATH=/run/secrets/dopbase-master-key

dopbase server start

Do not commit DOPBASE_TOKEN or a master key to source control. Supply them through your shell, process manager, CI secret store, or deployment platform.

dopbase run removes DOPBASE_TOKEN from the child process before it starts the application.

Open-source secrets management for developers.