Self-hosting
On this page 4
BugHQ is a Bun and Stacks application with a dashboard server, API server, relational database, mail delivery, and optional queue, billing, alerts, and Autofix integrations.
Requirements
- Bun 1.3 or newer
- SQLite 3.47.2 or newer for local development
- PostgreSQL for the production configuration
- A reverse proxy with TLS
- SMTP or another configured mail transport for invitations and email alerts
- A durable queue driver when background work must survive process restarts
Local setup
git clone https://github.com/stacksjs/bughq.git
cd bughq
bun install
cp .env.example .env
./buddy key:generate
./buddy migrate
bun run dev
The default development setup serves the frontend on port 3100 and the API on port 3108.
Production checklist
- Set
APP_ENV=production,APP_URL, and a generatedAPP_KEY. - Configure PostgreSQL and apply migrations before serving traffic.
- Configure mail and a persistent queue driver.
- Put both application processes behind the same HTTPS origin.
- Set
TRUSTED_PROXY_HOPSto match the proxy topology. - Configure backups, monitoring, health checks, and log retention.
- Add Stripe only if the deployment uses hosted-style plan enforcement.
- Add GitHub and AI credentials only if Autofix is enabled.
Use GET /health or GET /api/health for service checks. A deployment should verify database connectivity, event ingestion, dashboard access, mail, queues, and one alert channel before accepting production traffic.
Build these docs
./buddy build docs
BunPress writes the static site to dist/docs/.bunpress for deployment at /docs.