Skip to content

Docker

Run Stib in a Docker container for quick deployment on any server. This method requires no build tools and keeps Stib isolated from the host system.

Prerequisites

  • Docker Engine 20+ or Docker Desktop installed
  • A terminal with network access to Docker Hub

TIP

Not sure which installation method to use? Docker is ideal for single-server deployments with minimal configuration. For multi-container setups with reverse proxies, see Docker Compose.

Quick Start

Pull and run Stib with a single command:

bash
docker run -d \
  --name stib \
  --restart unless-stopped \
  -p 50505:50505 \
  -v stib-data:/app/data \
  enixion/stib-server:latest

The web UI is available at http://localhost:50505.

Persistent Data

Stib stores all its data in /app/data inside the container. Mount a volume to persist data across container restarts and upgrades.

The data directory contains:

data/
├── stib.db          # SQLite database (auto-created)
├── logs/            # Rolling daily logs (7 files max)
├── backups/         # Database backups
└── attachments/     # Card attachments
sh
docker run -d \
  --name stib \
  --restart unless-stopped \
  -p 50505:50505 \
  -v stib-data:/app/data \
  enixion/stib-server:latest
sh
docker run -d \
  --name stib \
  --restart unless-stopped \
  -p 50505:50505 \
  -v ./stib-data:/app/data \
  enixion/stib-server:latest

WARNING

Always mount a volume for /app/data. Without it, your data is lost when the container is removed.

Environment Variables

VariableDescriptionDefaultRequired
STIB_ENCRYPTION_KEYCredential encryption key (AES-256-GCM, hex-encoded 32 bytes)Only if using encrypted credentials
STIB_SERVER_ORIGINBase URL for OIDC redirects (e.g., https://stib.example.com)http://localhost:50505Only for OIDC SSO
STIB_UPDATE_URLUpdate checker endpointOptional
RUST_LOGLogging level (info, debug, warn)infoOptional

To generate a valid encryption key:

bash
openssl rand -hex 32

Example with environment variables:

bash
docker run -d \
  --name stib \
  --restart unless-stopped \
  -p 50505:50505 \
  -v stib-data:/app/data \
  -e RUST_LOG=info \
  -e STIB_ENCRYPTION_KEY=your-hex-key-here \
  enixion/stib-server:latest

Manage the Container

Stop the container:

bash
docker stop stib

Restart the container:

bash
docker start stib

View logs:

bash
docker logs -f stib

Remove the container (data is preserved in the volume):

bash
docker stop stib && docker rm stib

Update Stib

Pull the latest image and recreate the container:

bash
docker pull enixion/stib-server:latest
docker stop stib && docker rm stib
docker run -d \
  --name stib \
  --restart unless-stopped \
  -p 50505:50505 \
  -v stib-data:/app/data \
  enixion/stib-server:latest

WARNING

If you used -e flags (e.g., STIB_ENCRYPTION_KEY, STIB_SERVER_ORIGIN), add them again when recreating the container.

TIP

Your data is safe — it lives in the stib-data volume, not in the container. For extra safety, you can back up the database before updating:

bash
docker cp stib:/app/data/stib.db ./stib.db.bak

Health Check

For production deployments, you can add a Docker health check to automatically monitor the container:

bash
docker run -d \
  --name stib \
  --restart unless-stopped \
  -p 50505:50505 \
  -v stib-data:/app/data \
  --health-cmd "curl -f http://localhost:50505/api/health || exit 1" \
  --health-interval 30s \
  --health-timeout 5s \
  --health-retries 3 \
  enixion/stib-server:latest

INFO

The Docker image is available for amd64 and arm64 architectures.

Verify Installation

Check that Stib is running:

bash
curl http://localhost:50505/api/health

Expected response:

json
{"data":{"status":"ok"}}

Then open http://localhost:50505 in your browser to access the web UI.

Next Steps

TIP

Head to the Configuration guide to set up your admin account, configure OIDC authentication, and customize your instance.