Prerequisites
- TerminusDB running locally via Docker — see Install with Docker
This page covers production deployment, environment configuration, CLI access, and migration from legacy setups.
Environment configuration
The container uses environment variables with default values. Override them by creating a .env file in the cloned terminusdb directory:
# AI indexing (optional)
OPENAI_KEY=your-openai-key-here
BUFFER_AMOUNT=120000
# Server configuration
TERMINUSDB_SERVER_PORT=6363
TERMINUSDB_ADMIN_PASS=rootPass the file to Docker Compose:
docker compose --env-file .env upUsing the CLI
Access the TerminusDB command-line interface from the Docker container:
# When container is not running:
docker compose run terminusdb-server ./terminusdb
# When container is already running:
docker compose exec terminusdb-server ./terminusdbFor full CLI documentation, see CLI Reference.
Server deployment
Local deployment (default)
By default, the Docker container binds to IP 127.0.0.1. This prevents insecure deployments and ensures the TerminusDB server is accessible on the local machine only.
Remote / production deployment
To deploy TerminusDB on a remote server:
- Enable HTTPS with a reverse proxy (Nginx, Caddy, or similar)
- Do not use the
X-Forward-HeaderENV variables unless you fully understand the security implications - Consider the Self-Hosted (Production) guide for a comprehensive production setup
Migrating from terminusdb-bootstrap
If you previously used terminusdb-bootstrap and want to keep your existing data, run Docker Compose with the bootstrap storage overlay:
docker compose -f docker-compose.yml -f distribution/docker-compose/bootstrap_storage.yaml upThis mounts the data volumes from your previous installation into the new container setup.
Related guides
- Install with Docker — quick start (2 minutes)
- Docker on Windows — Windows-specific guide
- Self-Hosted (Production) — full production deployment
- Kubernetes — orchestrated deployment
- Build from Source — compile TerminusDB yourself