Deployment
Run Tasked in production with systemd, Docker, or your preferred deployment method.
systemd
Create a unit file at /etc/systemd/system/tasked.service:
[Unit]
Description=Tasked DAG execution engine
After=network.target
[Service]
Type=simple
User=tasked
Group=tasked
WorkingDirectory=/var/lib/tasked
ExecStart=/usr/local/bin/tasked-server serve \
--data-dir /var/lib/tasked \
--port 8080 \
--host 0.0.0.0
Restart=on-failure
RestartSec=5
Environment=RUST_LOG=tasked_server=info,tasked=info
[Install]
WantedBy=multi-user.target
# Create the service user and data directory
sudo useradd -r -s /bin/false tasked
sudo mkdir -p /var/lib/tasked
sudo chown tasked:tasked /var/lib/tasked
# Enable and start
sudo systemctl daemon-reload
sudo systemctl enable tasked
sudo systemctl start tasked
# Check status
sudo systemctl status tasked
Docker
Dockerfile
Multi-stage build for a minimal production image:
# Build stage
FROM rust:1.86-slim AS builder
WORKDIR /app
COPY . .
RUN cargo build --release --bin tasked-server
# Runtime stage
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/tasked-server /usr/local/bin/
VOLUME /data
EXPOSE 8080
CMD ["tasked-server", "serve", "--data-dir", "/data"]
docker-compose
services:
tasked:
build: .
ports:
- "8080:8080"
volumes:
- tasked-data:/data
environment:
- RUST_LOG=tasked_server=info,tasked=info
restart: unless-stopped
volumes:
tasked-data:
docker compose up -d
Reverse Proxy
An nginx configuration for proxying to Tasked:
server {
listen 443 ssl;
server_name tasked.example.com;
ssl_certificate /etc/letsencrypt/live/tasked.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/tasked.example.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Tasked has permissive CORS built in, so you don't need to configure CORS headers in your reverse proxy.
Monitoring
Health check
Tasked exposes a health check endpoint that returns HTTP 200 when the server is ready:
curl http://localhost:8080/healthz
# {"status":"ok"}
Prometheus
Add Tasked to your Prometheus scrape config:
scrape_configs:
- job_name: tasked
static_configs:
- targets: ["localhost:8080"]
metrics_path: /metrics
scrape_interval: 15s
Grafana dashboard suggestions
Key panels to include in a Tasked dashboard:
- Flow throughput —
rate(tasked_flows_submitted_total[5m]) - Task dispatch rate —
rate(tasked_tasks_dispatched_total[5m]) - Task failure rate —
rate(tasked_tasks_completed_total{state="failed"}[5m]) - Ready queue depth —
tasked_tasks_ready - Retry rate —
rate(tasked_tasks_retried_total[5m])
Backup
Tasked uses a single SQLite file. To back it up safely, checkpoint the WAL first, then copy:
# Checkpoint WAL and create a backup
sqlite3 /var/lib/tasked/tasked.db "PRAGMA wal_checkpoint(TRUNCATE);"
sqlite3 /var/lib/tasked/tasked.db ".backup /var/lib/tasked/backup.db"
You can also use filesystem snapshots or any tool that creates a consistent copy of the .db, .db-wal, and .db-shm files together.
Coming Soon
Official Docker image — Pre-built images published to Docker Hub and GitHub Container Registry.
Helm chart — Deploy Tasked to Kubernetes with a single command.