DEV Community

Cover image for How to Self-Host Cal.com on Ubuntu (with Monitoring)
Alexander Neitzel
Alexander Neitzel

Posted on • Originally published at garmingo.com

1

How to Self-Host Cal.com on Ubuntu (with Monitoring)

Cal.com is one of the best open-source alternatives to Calendly — and yes, you can self-host it.

In this guide, I’ll show you how to deploy Cal.com using Docker on a clean Ubuntu server (works great on any VPS), connect it to a PostgreSQL database, and make sure it’s always online by the time you’re done.


🧰 What You’ll Need

  • Ubuntu 22.04 server (or similar)
  • Docker + Docker Compose installed
  • Domain name (optional but recommended)
  • SMTP credentials (for email support)
  • 15 minutes

🚀 Step 1: Clone the Cal.com Repository

git clone https://github.com/calcom/cal.com.git
cd cal.com
Enter fullscreen mode Exit fullscreen mode

⚙️ Step 2: Configure Environment Variables

Copy the example environment file:

cp .env.example .env
Enter fullscreen mode Exit fullscreen mode

Edit .env and set your desired values:

DATABASE_URL=postgresql://cal:calpass@db:5432/calcom  
NEXTAUTH_SECRET=generateOne  
SMTP_HOST=smtp.example.com  
SMTP_USER=username  
SMTP_PASS=password
Enter fullscreen mode Exit fullscreen mode

🛢️ Step 3: Set Up PostgreSQL with Docker

Create a docker-compose.yml:

version: "3.9"

services:
  db:
    image: postgres:14
    environment:
      POSTGRES_USER: cal
      POSTGRES_PASSWORD: calpass
      POSTGRES_DB: calcom
    volumes:
      - pgdata:/var/lib/postgresql/data

  calcom:
    build: .
    ports:
      - "3000:3000"
    environment:
      - DATABASE_URL=postgresql://cal:calpass@db:5432/calcom
    depends_on:
      - db

volumes:
  pgdata:
Enter fullscreen mode Exit fullscreen mode

🧱 Step 4: Build and Launch Cal.com

docker compose up --build -d
Enter fullscreen mode Exit fullscreen mode

Cal.com will now be running on http://your-server-ip:3000


🌐 Step 5: Add a Domain (Optional)

Use NGINX or a reverse proxy like Caddy or Nginx Proxy Manager to bind Cal.com to calendar.yourdomain.com with HTTPS.


🧪 Step 6: Test It

Go to your IP or domain → sign up → test the booking flow.

Check database persistence and email sending.


✅ Step 7: Monitor Your Cal.com Instance (Highly Recommended)

Running a self-hosted service means you’re responsible when things go down.

Set up uptime monitoring + a public/private status page in 2 minutes using Garmingo Status:

  • Monitor https://calendar.yourdomain.com
  • Get alerts via Email, Slack, Telegram, etc.
  • Track uptime, SLA, and incidents
  • Publish a status page (or keep it internal)
  • Forever free plan (no credit card needed)

👉 Set it up here

Because what good is a calendar app if it's offline?


🧘 TL;DR

  • ✅ Clone Cal.com
  • ⚙️ Set up PostgreSQL via Docker
  • 🔧 Configure .env
  • 🌐 Optional: Add domain
  • 🧠 Pro move: Set up monitoring with Garmingo

Self-hosting is powerful — but only if your users can rely on it.

👉 Monitor your Cal.com instance with Garmingo Status

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

ITRS image

See What Users Experience in The Browser — Anywhere, Anytime

Simulate logins, checkouts, and payments on SaaS, APIs, and internal apps. Catch issues early, baseline web performance, and stay ahead of incidents. Easily record user journeys right from your browser.

Start Free Trial

👋 Kindness is contagious

Explore this insightful write-up, celebrated by our thriving DEV Community. Developers everywhere are invited to contribute and elevate our shared expertise.

A simple "thank you" can brighten someone’s day—leave your appreciation in the comments!

On DEV, knowledge-sharing fuels our progress and strengthens our community ties. Found this useful? A quick thank you to the author makes all the difference.

Okay