Janus
Getting Started

Coolify Deployment

Deploy Janus on your own server using Coolify — an open-source, self-hosted alternative to Vercel/Netlify.

Coolify is an open-source, self-hosted PaaS. It runs on any VPS and manages Docker deployments, databases, SSL, and reverse proxying. Perfect for Janus since both are self-hosted.

Why Coolify

Coolify gives you the convenience of one-click deploys on infrastructure you own. No vendor lock-in, no usage fees — just your server.

Prerequisites

  • A server with Coolify installed
  • At least 2GB RAM and 2 vCPUs (4GB recommended)
  • A domain pointing to your server (for SSL)

Step 1: Create resources

In the Coolify dashboard, create the backing services first:

PostgreSQL

Go to ResourcesNewDatabasePostgreSQL 16. Note the connection string from the database settings.

Redis

Go to ResourcesNewDatabaseRedis 7. Note the connection string.

Step 2: Deploy the API

Create the service

Go to ResourcesNewDocker Compose. Point it to your Janus repository URL:

https://github.com/elliot736/janus

Configure the build

Set the Dockerfile path to docker/Dockerfile.api and the build context to . (root).

Set environment variables

VariableValue
DATABASE_URLConnection string from Step 1
REDIS_URLConnection string from Step 1
HMAC_SECRETGenerate: openssl rand -hex 32
TOKEN_SECRETGenerate: openssl rand -hex 32
COOKIE_SECRETGenerate: openssl rand -hex 32
BETTER_AUTH_SECRETGenerate: openssl rand -hex 32
CORS_ORIGINYour dashboard URL (e.g., https://janus.example.com)
NODE_ENVproduction
PORT3001

Set the domain

Under SettingsDomains, add your API domain (e.g., api.janus.example.com). Coolify handles SSL automatically via Let's Encrypt.

Set health check

Under Health Check, set the path to /health and port to 3001.

Step 3: Deploy the Dashboard

Repeat the same process:

  • Dockerfile path: docker/Dockerfile.dashboard
  • Build context: .
  • Environment variables:
VariableValue
NEXT_PUBLIC_API_URLYour API URL (e.g., https://api.janus.example.com)
BETTER_AUTH_URLInternal API URL or same as above
NODE_ENVproduction
  • Domain: janus.example.com

Step 4: Push the schema

After the API is running, open a terminal to the API container (Coolify dashboard → API service → Terminal) and run:

npx drizzle-kit push

Alternative: Docker Compose in Coolify

Coolify also supports deploying a full docker-compose.yml as a single stack. Point Coolify at the repo and select the compose file — it will deploy all 5 services (Nginx, API, Dashboard, Postgres, Redis) together.

Compose deployment

When using Docker Compose mode, set all environment variables in Coolify's Environment tab. Coolify will inject them into the compose stack automatically.

TrafficServerEstimated cost
Low (< 10k verifications/day)2 vCPU, 4GB RAM~$12/mo (Hetzner)
Medium (10k-100k/day)4 vCPU, 8GB RAM~$24/mo (Hetzner)
High (100k+/day)8 vCPU, 16GB RAM~$48/mo (Hetzner)

These costs cover the entire stack including Coolify, Janus, PostgreSQL, and Redis on a single server.