Docker
Deploy the Portabase Dashboard and Agent with Docker Run or Docker Compose.
Deploy Portabase yourself, without the CLI. Use Docker Run for a quick test and Docker Compose for anything you intend to keep.
Make sure the Docker engine is already installed on the host.
Docker Run
Recommended for testing only, not for production: this uses the bundled internal database.
Environment variables
Create the .env file. Warning, you must generate passwords and secrets yourself.
# --- App Configuration ---
PROJECT_URL=http://localhost:8887
# ⚠️ GENERATE A STRONG SECRET (e.g., openssl rand -hex 32)
# This secret is used to encrypt communications with agents.
PROJECT_SECRET=change_me_please_generate_a_secure_hex_tokenStart the Dashboard
docker run -d \
--name portabase-app-prod \
-p 8887:80 \
--restart unless-stopped \
-e TZ="Europe/Paris" \
--env-file .env \
-v ./portabase-data:/data \
portabase/portabase:latestAccess the interface
Open your browser: http://localhost:8887 (or the chosen port).
Docker Compose
Recommended for production and GitOps workflows: the Dashboard runs alongside a dedicated PostgreSQL container.
File structure
Create a folder and place two files in it: docker-compose.yml and .env.
mkdir portabase-dashboard && cd portabase-dashboardDocker configuration
name: portabase-dashboard
services:
portabase:
container_name: portabase-app
image: portabase/portabase:latest
restart: always
env_file: .env
environment:
- TZ=Europe/Paris
ports:
- "8887:80"
volumes:
- portabase-data:/data
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/api/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 60s
db:
container_name: portabase-pg
image: postgres:17-alpine
restart: always
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres-data:
portabase-data:Environment variables
Create the .env file. Warning, you must generate passwords and secrets yourself.
# --- App Configuration ---
PROJECT_URL=http://localhost:8887
# ⚠️ GENERATE A STRONG SECRET (e.g., openssl rand -hex 32)
# This secret is used to encrypt communications with agents.
PROJECT_SECRET=change_me_please_generate_a_secure_hex_token
# --- Database URL ---
POSTGRES_USER=portabase
POSTGRES_PASSWORD=changeme
POSTGRES_HOST=db
POSTGRES_PORT=5432
POSTGRES_DB=portabase
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?schema=publicStartup
docker compose up -dAccess the interface
Open your browser: http://localhost:8887 (or the chosen port).
Next steps
- Environment variables for the Dashboard, or Agent environment.
- Reverse proxy to expose the Dashboard behind a domain.
- Getting started to create your first backup.
Last updated on