Self-hosting

Self Hosting BureauCat

BureauCat ships as one binary with the web app and database migrations built in. You bring PostgreSQL and an S3-compatible bucket for attachments; everything else is served from a single port. Running on a network with no internet access? See the air-gapped install guide.

What you need

  • PostgreSQL: the app is developed and tested against PostgreSQL 18
  • S3-compatible storage such as Amazon S3, or an open-source alternative like RustFS or Garage, with the bucket already created. The server checks the bucket on startup and will not start without it.
  • A reverse proxy with HTTPS in front of port 1341. Sign-in cookies are marked Secure, so plain HTTP will not keep you signed in.

1. Configure

Create a .env file. Generate the JWT secret with openssl rand -hex 32 and keep the file out of version control.

DATABASE_URL=postgres://bureaucat:change-me@postgres:5432/bureaucat?sslmode=disable
JWT_SECRET=paste-output-of-openssl-rand-hex-32

S3_ENDPOINT=http://garage:3900
FILES_BUCKET_NAME=bureaucat
FILES_BUCKET_ACCESS_KEY_ID=your-access-key-id
FILES_BUCKET_SECRET_ACCESS_KEY=your-secret-access-key

2a. Run with Docker Compose

The ghcr.io/bureaucatorg/bureaucat image (linux/amd64) runs bureaucat serve --migrate by default, so migrations apply on every start. Pin a release tag such as v0.16.47 instead of latest for predictable upgrades.

services:
  app:
    image: ghcr.io/bureaucatorg/bureaucat:latest
    restart: unless-stopped
    ports:
      - 127.0.0.1:1341:1341
    env_file: .env
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    image: postgres:18.1-alpine3.23
    restart: unless-stopped
    environment:
      POSTGRES_USER: bureaucat
      POSTGRES_PASSWORD: change-me
      POSTGRES_DB: bureaucat
    volumes:
      - ./postgres-data:/var/lib/postgresql/18/docker
    healthcheck:
      test: pg_isready -U bureaucat -d bureaucat
      interval: 10s
      retries: 5

2b. Or run the binary

Release archives are published for Linux and macOS on amd64 and arm64, with a checksums.txt to verify them.

curl -LO https://github.com/bureaucatorg/bureaucat/releases/latest/download/bureaucat_linux_amd64.tar.gz
curl -LO https://github.com/bureaucatorg/bureaucat/releases/latest/download/checksums.txt
sha256sum --ignore-missing -c checksums.txt
tar -xzf bureaucat_linux_amd64.tar.gz
set -a; . ./.env; set +a
./bureaucat serve --migrate

3. Create the admin account

Open the app and sign up. The first account created on a fresh database becomes the admin. From the admin panel you can then set up:

  • Single sign-on with Google or Zitadel, optionally limited to your email domains
  • SMTP for email digests, and a Mattermost bot for DM notifications
  • Default projects and role for new users, and custom branding
  • The AI assistant's provider, model and API key, including a local OpenAI-compatible endpoint such as Ollama

Environment variables

  • DATABASE_URL (required): PostgreSQL connection string
  • JWT_SECRET (required): signing key, 32+ characters
  • S3_ENDPOINT, FILES_BUCKET_NAME, FILES_BUCKET_ACCESS_KEY_ID, FILES_BUCKET_SECRET_ACCESS_KEY (required): attachment storage
  • MAX_UPLOAD_SIZE: max attachment size in bytes, default 10 MB
  • API_PORT / API_HOST: listen address, default 0.0.0.0:1341
  • ACCESS_TOKEN_EXPIRY_MINS / REFRESH_TOKEN_EXPIRY_DAYS: session lifetimes, default 5 minutes and 7 days

Upgrading and backups

Pull the new image (or swap the binary) and restart; pending migrations run before the server accepts traffic, and a failed migration stops startup instead of serving an outdated schema.

docker compose pull
docker compose up -d

Back up two things: the PostgreSQL database (for example with pg_dump) and the attachment bucket. Migrations are tested before every release, but we still recommend taking a backup before you upgrade.

Need help?

Open an issue on GitHub, or see the developer guide for the API and CLI.