Skip to content

Administrator Guide

This guide covers deploying Dharini on your own server, from preparing the database and file storage to running the application behind a reverse proxy.

Dharini runs as a set of Docker Compose services (backend, web frontend, Redis, and optionally Postgres, Garage, pgAdmin and the mobile web app). You choose where the database and file storage live:

  • Managed cloud services. Use AWS RDS PostgreSQL (with PostGIS) for the database and an AWS S3 bucket for files.
  • Self-hosted. Use the bundled PostgreSQL 16 + PostGIS container and the bundled Garage container, which provides S3-compatible storage. Nothing leaves your own server. This also works on a Windows server through WSL 2 (see deploy-readme.md in the repository root).

You can mix the two, for example RDS with Garage.

Deploying Dharini requires:

  • A Linux server (Ubuntu 24.04 recommended) with Docker and Docker Compose
  • PostgreSQL 16 with PostGIS (managed, or the bundled container)
  • S3-compatible object storage (AWS S3, or the bundled Garage container), with a CORS rule for browser uploads
  • Nginx as a reverse proxy, and SSL certificates via Certbot
  • An SMTP email server or an SMS provider (Twilio), because users sign in with a one-time password

The backend applies database migrations and loads its reference data automatically when it starts, so there is no separate migration step.

  1. Short version: the README has the four steps: download two files, fill in .env, run ./deploy.sh production, put it behind HTTPS.
  2. Full version: follow Production Setup from top to bottom. It covers the database, file storage, .env, Nginx, SSL and DNS.
  3. Keep it running: Updating and rolling back, CI/CD with GitHub Actions, Troubleshooting.
  4. Phones: Mobile App for the Android app and its download link.