Skip to content

Backend Installation (Docker)

import { Steps, Aside } from ‘@astrojs/starlight/components’;

The production deployment uses Docker Compose to run SurrealDB and the Bastion backend together.

  1. Download the release bundle

    Terminal window
    curl -Lo bastion-server.tar.gz \
    https://github.com/halden-technologies/bastion/releases/latest/download/bastion-server-linux-x86_64.tar.gz
    tar -xzf bastion-server.tar.gz
    cd bastion-server
  2. Edit configuration

    Copy the example config:

    Terminal window
    cp config/backend.example.toml config/backend.toml

    Set your JWT secret and any optional settings (SMTP, SIEM, etc.) in config/backend.toml. See Backend Configuration.

  3. Start services

    Terminal window
    docker compose up -d
  4. Verify

    Terminal window
    curl http://localhost:8080/health
    # {"status":"ok","version":"13.0.0"}
PortExpose toPurpose
8080Console workstationsREST API
50051EndpointsgRPC agent connections
8000localhost onlySurrealDB

For production deployments, terminate TLS at a reverse proxy (nginx, Caddy, or Cloudflare Tunnel) in front of port 8080. The gRPC port (50051) supports optional mTLS — see Backend Configuration.

Terminal window
docker compose pull
docker compose up -d

Bastion uses zero-downtime rolling updates. Existing agent connections are maintained during restarts.

SurrealDB data is in the ./data/ directory. Back it up with any standard file backup:

Terminal window
# Stop, snapshot, restart
docker compose stop surrealdb
tar -czf backup-$(date +%Y%m%d).tar.gz ./data/
docker compose start surrealdb