Self-Hosting with Docker & Bun
Docs/Self-Hosting·5 min read

Self-Hosting with Docker & Bun

Run EntryWise on any VPS, AWS EC2, Hetzner, Railway, Fly.io, or Kubernetes cluster with Docker Compose, native SQLite, and pluggable Queue & Email drivers.

1-Command Docker Compose Deployment#

EntryWise ships with a production multi-stage Dockerfile and docker-compose.yml powered by Bun and native SQLite (bun:sqlite in WAL mode). It requires zero Cloudflare accounts or bindings.

On startup, src/server.ts automatically creates the SQLite database file in your mounted volume and applies all SQL migrations from ./migrations in order.

Docker Compose Quickstart· terminal
# 1. Copy the environment template
cp .env.example .env

# 2. Generate secure JWT & Master Encryption keys
openssl rand -hex 32

# 3. Boot EntryWise on port 8787
docker compose up -d --build

# 4. Verify health & active runtime drivers
curl http://localhost:8787/health

Pluggable Queue Drivers (QUEUE_DRIVER)#

Instead of locking you into Cloudflare Queues, self-hosted EntryWise lets you choose how background jobs (webhooks, CRM sync, email notifications) are processed via the QUEUE_DRIVER environment variable:

QUEUE_DRIVERRequired Env VarsHow It Works
memory (default)QUEUE_MAX_RETRIES=3Processes jobs asynchronously in-process using exponential backoff after returning the HTTP response. Ideal for single-container deployments.
httpQUEUE_HTTP_URL, QUEUE_HTTP_SECRETForwards each background job via HTTP POST to an external worker, n8n, BullMQ bridge, Temporal, or RabbitMQ consumer with Bearer auth and automatic local fallback.
cloudflareSUBMISSION_QUEUE bindingUsed automatically when deployed on Cloudflare Workers.

Pluggable Email Providers (DEFAULT_EMAIL_PROVIDER)#

Configure a server-wide default email driver in .env while still allowing individual workspaces in the Console to bring their own provider API keys:

DEFAULT_EMAIL_PROVIDEREnv VarsUse Case
resendRESEND_API_KEYProduction transactional delivery via Resend REST API.
smtp2goDEFAULT_EMAIL_API_KEYHigh-deliverability SMTP2GO REST API transport.
mailersendDEFAULT_EMAIL_API_KEYMailerSend transactional email API.
mailtrapDEFAULT_EMAIL_API_KEYMailtrapSending API for staging or production.
webhookEMAIL_WEBHOOK_URL, EMAIL_WEBHOOK_SECRETPOSTs { to, from, replyTo, cc, subject, html } to your own microservice, Nodemailer bridge, AWS SES Lambda, or Postal server.
consoleNonePrints formatted email metadata & HTML to stdout for local development.