Self-Hosted: Binary Deployment

For deployments without Docker (bare metal, VM, or systemd-managed hosts).

Prerequisites

  • Linux x86_64 with glibc 2.31+ (or use the musl static binary from CI artifacts)

  • PostgreSQL 16

  • A reverse proxy (Nginx, Caddy, Traefik) terminating TLS

  • A Zitadel instance (separate deployment or external)

  • An S3-compatible object store (RustFS, MinIO, AWS S3)

  • A signed shiftit.lic license file

Steps

  1. Get the binary: Download shiftit-backend from CI artifacts or build with cargo build --release --manifest-path backend/Cargo.toml. Pre-built binaries are musl-static and run on any glibc-free Linux.

  2. Provision Postgres: Create a database, user, and grant CREATEROLE so the migration’s CREATE ROLE shiftit_app succeeds. The migration is idempotent and safe to re-apply.

  3. Configure environment: Create /etc/shiftit/shiftit.env:

    DATABASE_URL=postgres://shiftit:STRONG_PASSWORD@localhost:5432/shiftit
    ZITADEL_DOMAIN=https://auth.example.com
    RUSTFS_ENDPOINT=https://s3.example.com
    RUSTFS_ACCESS_KEY=...
    RUSTFS_SECRET_KEY=...
    RUSTFS_BUCKET_PREFIX=shiftit
    VAPID_PRIVATE_KEY=...
    VAPID_PUBLIC_KEY=...
    VAPID_SUBJECT=mailto:admin@example.com
    SHIFTIT_LICENSE_FILE=/etc/shiftit/shiftit.lic
    RUST_LOG=shiftit_backend=info,tower_http=info
    PORT=3000
  4. Systemd unit at /etc/systemd/system/shiftit-backend.service:

    [Unit]
    Description=ShiftIt Backend
    After=postgresql.service network.target
    Requires=postgresql.service
    
    [Service]
    Type=simple
    User=shiftit
    Group=shiftit
    EnvironmentFile=/etc/shiftit/shiftit.env
    ExecStart=/usr/local/bin/shiftit-backend
    Restart=on-failure
    RestartSec=5
    
    [Install]
    WantedBy=multi-user.target
  5. Frontend: Run trunk build --release in the frontend/ directory and serve the resulting dist/ from your reverse proxy. See nginx.adoc for the matching Nginx config.

  6. Start and enable:

    systemctl daemon-reload
    systemctl enable --now shiftit-backend
    journalctl -u shiftit-backend -f