InboxorcistInboxorcist

DigitalOcean

Deploy Inboxorcist on DigitalOcean App Platform.

DigitalOcean App Platform provides managed infrastructure with easy scaling.

App Spec Deployment

Step 1: Fork the Repository

Fork the Inboxorcist repository to your GitHub account.

Step 2: Update App Spec

Edit deploy/do-app-spec.yaml and replace YOUR_USERNAME with your GitHub username:

github:
  repo: YOUR_USERNAME/inboxorcist
  branch: main

Step 3: Create the App

Using the DigitalOcean CLI:

doctl apps create --spec deploy/do-app-spec.yaml

Or through the dashboard:

  1. Log in to DigitalOcean
  2. Go to Apps > Create App
  3. Select GitHub and connect your repository
  4. Choose Use App Spec and upload deploy/do-app-spec.yaml

Step 4: Configure Environment Variables

In the App settings, add these environment variables:

# Required - Security
JWT_SECRET=your-jwt-secret-min-32-chars
ENCRYPTION_KEY=your-64-character-hex-encryption-key

# App URL (your DigitalOcean domain)
APP_URL=https://your-app.ondigitalocean.app

# Optional - Google OAuth (can also be configured via /setup UI)
# GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
# GOOGLE_CLIENT_SECRET=GOCSPX-your-secret

Mark JWT_SECRET and ENCRYPTION_KEY as Secret.

Google OAuth credentials are optional. You can configure them via the web UI at /setup after deployment.

Step 5: Deploy

Click Deploy or push to the connected branch.

App Spec Reference

name: inboxorcist
region: nyc

services:
  - name: inboxorcist
    dockerfile_path: Dockerfile
    github:
      repo: YOUR_USERNAME/inboxorcist
      branch: main
      deploy_on_push: true
    http_port: 6616
    instance_size_slug: basic-xxs
    instance_count: 1
    health_check:
      http_path: /health
      initial_delay_seconds: 10
      period_seconds: 30
    envs:
      - key: JWT_SECRET
        scope: RUN_TIME
        type: SECRET
      - key: ENCRYPTION_KEY
        scope: RUN_TIME
        type: SECRET
      - key: APP_URL
        scope: RUN_TIME
        value: https://your-app.ondigitalocean.app

Database Options

Add a managed database to your app spec:

databases:
  - name: db
    engine: PG
    version: "16"
    size: db-s-dev-database
    num_nodes: 1

Then reference it in your service:

services:
  - name: inboxorcist
    envs:
      - key: DATABASE_URL
        scope: RUN_TIME
        value: ${db.DATABASE_URL}

Option B: External PostgreSQL

If you have an existing PostgreSQL database (e.g., Supabase, Neon, or your own):

  1. Go to your app's Settings > Environment Variables
  2. Add DATABASE_URL with your connection string:
    postgres://user:password@host:5432/dbname

Option C: SQLite (Default)

If no DATABASE_URL is set, Inboxorcist uses SQLite automatically.

SQLite data may not persist across DigitalOcean deployments. For production, use managed PostgreSQL.

Custom Domain

  1. Go to your app's Settings > Domains
  2. Click Add Domain
  3. Enter your domain name
  4. Configure DNS records as instructed
  5. Update environment variable:
APP_URL=https://yourdomain.com

Scaling

Vertical Scaling

Change instance_size_slug:

SlugvCPUsRAMPrice
basic-xxs1512 MB$5/mo
basic-xs11 GB$10/mo
basic-s12 GB$20/mo
basic-m24 GB$40/mo

Horizontal Scaling

Increase instance_count:

instance_count: 3

Horizontal scaling requires PostgreSQL instead of SQLite to share state between instances.

Monitoring

Logs

View in Runtime Logs tab or:

doctl apps logs <app-id>

Metrics

Monitor in the Insights tab:

  • CPU usage
  • Memory usage
  • Request count
  • Response times

Alerts

Configure alerts in Settings > Alerts:

  • CPU threshold
  • Memory threshold
  • Deployment failures

Updating

DigitalOcean automatically deploys on push to the connected branch.

Manual redeploy:

doctl apps create-deployment <app-id>

Or click Deploy in the dashboard.

Pricing

App Platform pricing:

PlanPriceFeatures
Starter$5/mo1 vCPU, 512MB RAM
Basic$10/mo+Scalable, custom domains
Professional$12/mo+Autoscaling, dedicated resources

PostgreSQL Dev database: $7/mo additional.

Troubleshooting

Build Fails

Check build logs in Deployments tab. Common issues:

  • Dockerfile path incorrect
  • Missing build dependencies

App Crashes

Check runtime logs for:

  • Missing environment variables
  • Health check failures
  • Memory limits exceeded

Database Connection Issues

Verify DATABASE_URL:

  1. Go to database settings
  2. Copy connection string
  3. Ensure it's set in app environment

Slow Performance

Consider upgrading instance size or enabling autoscaling.

On this page