Skip to main content

Self-Hosting

The Feature Flag Service is fully self-hostable. You run the backend (Rust/Axum), the frontend (React/Caddy), and a PostgreSQL database. All three ship with Dockerfiles and work out of the box on Railway.

What you need

ComponentRequirement
Backend APIDocker, or Rust 1.88+ to build from source
FrontendDocker (Caddy serves the built SPA)
DatabasePostgreSQL 16+
Reverse proxyOptional (Caddy, nginx, or Railway's built-in routing)

Deployment options

Railway (recommended): connect your GitHub repos and Railway detects the Dockerfiles automatically. Add a PostgreSQL plugin and you're done. See Deploy on Railway.

Docker Compose (local or VPS): the backend repo ships a docker-compose.yml that runs the API and a local PostgreSQL instance. See Docker.

Custom: build from source and run anywhere. The backend is a single binary with no runtime dependencies besides PostgreSQL.

Repos

ComponentRepository
Backendgithub.com/Webrowse/feature-flag-service-backend
Frontendgithub.com/Webrowse/feature-flag-service-frontend

Quick reference

# Clone and run locally in one shot
git clone git@github.com:Webrowse/feature-flag-service-backend.git
cd feature-flag-service-backend
cp .env.example .env # set JWT_SECRET and DATABASE_URL
docker-compose up -d # starts PostgreSQL
cargo install sqlx-cli --no-default-features --features postgres
sqlx migrate run
cargo run # API on :8080

See Environment Variables for all configuration options.