Docker Deployment
Stina can be deployed as a self-hosted web application using Docker Compose. This is ideal for running Stina on a home server, NAS, or cloud VM.
Quick Start
Section titled “Quick Start”curl -O https://raw.githubusercontent.com/einord/stina/main/docker-compose.ymldocker compose up -dStina is now running at localhost:3002.
Architecture
Section titled “Architecture”The Docker deployment consists of two services:
- stina-api — The backend API server (Node.js), handles AI provider communication, database, extensions, and scheduling
- stina-web — The frontend web app (Vue.js), served as static files with a lightweight HTTP server
Both images are published to GitHub Container Registry (ghcr.io/einord).
Configuration
Section titled “Configuration”Environment Variables
Section titled “Environment Variables”| Variable | Default | Description |
|---|---|---|
STINA_VERSION | latest | Docker image version tag |
STINA_DATA_PATH | ./data | Host path for persistent data |
NODE_ENV | production | Node environment |
DB_PATH | /data/data.db | Database file path inside container |
EXTENSIONS_PATH | /data/extensions | Extensions directory inside container |
Custom Data Directory
Section titled “Custom Data Directory”STINA_DATA_PATH=/opt/stina/data docker compose up -dPinning a Version
Section titled “Pinning a Version”STINA_VERSION=1.0.0 docker compose up -dUpdating
Section titled “Updating”To update to the latest version:
docker compose pulldocker compose up -dYour data is preserved in the mounted volume.
Reverse Proxy
Section titled “Reverse Proxy”To expose Stina behind a reverse proxy (e.g., Nginx, Caddy, Traefik), point your proxy to port 3002 (the web frontend). The web app communicates with the API internally.
Nginx Example
Section titled “Nginx Example”server { listen 443 ssl; server_name stina.example.com;
location / { proxy_pass http://localhost:3002; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }
location /api/ { proxy_pass http://localhost:3001/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }}Backup
Section titled “Backup”All persistent data is stored in the data volume. To back up:
cp -r ./data ./data-backup-$(date +%Y%m%d)Or if using a custom path:
cp -r /opt/stina/data /opt/stina/data-backup-$(date +%Y%m%d)