Install Kivo

DigitalOcean

A Droplet with Managed PostgreSQL.

Run Kivo on a Droplet with Docker Compose, behind a Cloud Firewall. PostgreSQL runs either on the Droplet or in a Managed PostgreSQL cluster. HTTPS comes from Caddy or nginx with Let's Encrypt.

Replace everything in <angle brackets>, and every change-me, with your own values.

What you'll create

ResourceExample
Ubuntu 24.04 Droplet, 2 vCPU / 2 GB or largerkivo
Cloud Firewallkivo-fw
Optional: Managed PostgreSQL 16 clusterkivo-db

You'll need doctl (doctl auth init), an SSH key added to your account, a domain, and SMTP credentials.

Create the Droplet

bash
doctl compute ssh-key list                        # note your key's ID
doctl compute droplet create kivo --region <region> --size s-2vcpu-2gb \
  --image ubuntu-24-04-x64 --ssh-keys <ssh-key-id> --tag-names kivo \
  --enable-backups --wait
doctl compute droplet get kivo --format PublicIPv4   # <droplet-ip>

Cloud Firewall

bash
doctl compute firewall create --name kivo-fw --tag-names kivo \
  --inbound-rules "protocol:tcp,ports:22,address:<your-ip>/32 protocol:tcp,ports:80,address:0.0.0.0/0,address:::/0 protocol:tcp,ports:443,address:0.0.0.0/0,address:::/0" \
  --outbound-rules "protocol:tcp,ports:all,address:0.0.0.0/0,address:::/0 protocol:udp,ports:all,address:0.0.0.0/0,address:::/0 protocol:icmp,address:0.0.0.0/0,address:::/0"

Never open 3000 or 5432.

DNS

Add an A record for <your-domain> pointing at <droplet-ip>. With DigitalOcean DNS:

bash
doctl compute domain records create <your-zone> --record-type A --record-name <subdomain> --record-data <droplet-ip> --record-ttl 300

Install Docker and Docker Compose

bash
ssh root@<droplet-ip>
adduser kivo && usermod -aG sudo kivo && rsync --archive --chown=kivo:kivo ~/.ssh /home/kivo
exit
ssh kivo@<droplet-ip>

sudo apt-get update && sudo apt-get install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
  | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update && sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo usermod -aG docker $USER && exit

Get and configure Kivo

bash
ssh kivo@<droplet-ip>

Then download the two files:

bash
sudo mkdir -p /opt/kivo && sudo chown $USER /opt/kivo && cd /opt/kivo
curl -fsSL https://kivo-control.invicly.com/install/files/docker-compose.yml -o docker-compose.yml
curl -fsSL https://kivo-control.invicly.com/install/files/kivo.env -o .env && chmod 600 .env

Edit .env (nano .env):

bash
COMPOSE_PROFILES=db,https              # see PostgreSQL below
KIVO_DOMAIN=<your-domain>
AUTH_URL=https://<your-domain>
AUTH_SECRET=change-me                 # openssl rand -base64 32
SMTP_HOST=<smtp-host>
SMTP_PORT=465
SMTP_SECURE=true
SMTP_USERNAME=<smtp-user>
SMTP_PASSWORD=change-me
SMTP_FROM_EMAIL=kivo@<your-domain>
SMTP_FROM_NAME=Kivo
KIVO_INSTANCE_NAME=Kivo on DigitalOcean
KIVO_CONTROL_URL=https://kivo-control.invicly.com
KIVO_LICENSE_PUBLIC_KEYS="lic-2026-09:MCowBQYDK2VwAyEAzWdTL0qB3C7ZDkfbdcn0u4MADyzGFR9suPCuNkf8mbQ="

DigitalOcean may block outbound SMTP ports on new Droplets. If emails time out, use your provider's alternative port (many offer 2525) with SMTP_PORT=2525 and SMTP_SECURE=false (STARTTLS), or ask DigitalOcean support to unblock SMTP.

PostgreSQL

Option A: on the Droplet

bash
POSTGRES_USER=kivo
POSTGRES_PASSWORD=change-me           # openssl rand -hex 24
POSTGRES_DB=kivo

Keep COMPOSE_PROFILES=db,https. The compose file publishes the app on 127.0.0.1:3000 only.

Option B: Managed PostgreSQL

bash
doctl databases create kivo-db --engine pg --version 16 --region <region> --size db-s-1vcpu-1gb --num-nodes 1
doctl databases list                                  # note the ID as <db-id>; wait until it is "online"
doctl databases db create <db-id> kivo
doctl databases user create <db-id> kivo
doctl databases firewalls append <db-id> --rule droplet:<droplet-id>
doctl databases connection <db-id> --format Host,Port,User,Password
doctl databases user get <db-id> kivo --format Password

Managed clusters listen on port 25060 and require TLS. Add to .env (use the kivo user's password):

bash
DATABASE_URL=postgresql://kivo:change-me@<db-host>:25060/kivo?sslmode=require

And set COMPOSE_PROFILES=https, so the bundled PostgreSQL doesn't start (details). For traffic inside DigitalOcean's network, use the cluster's private host (same VPC as the Droplet).

Start Kivo

bash
cd /opt/kivo
docker compose pull                  # invicly/kivo:1.0.0, invicly/kivo-migrate, postgres, caddy
docker compose up -d
docker compose ps                    # migrate: Exited (0); app: healthy; caddy: running
curl -fsS http://127.0.0.1:3000/api/health/ready

HTTPS

With https in COMPOSE_PROFILES, the bundled Caddy serves https://<your-domain> with a Let's Encrypt certificate and renews it by itself, as soon as the DNS record points at the server and ports 80 and 443 are open. Check with docker compose logs caddy and curl -I https://<your-domain>.

To use nginx and Certbot or your own proxy instead, remove https from COMPOSE_PROFILES: Your own proxy.

Open https://<your-domain>/register and create the first workspace.

Backup

  • Droplet backups (turned on with --enable-backups) keep weekly images of the whole Droplet. They aren't a substitute for database dumps.

  • Option A: a nightly pg_dump (Backup) copied to Spaces with any S3 tool, for example:

    bash
    aws s3 cp /var/backups/kivo/kivo-$(date +%F).dump s3://<space-name>/kivo/ --endpoint-url https://<region>.digitaloceanspaces.com
  • Option B: Managed PostgreSQL keeps daily backups with point-in-time recovery for seven days. Restore into a new cluster with doctl databases create … --restore-from-cluster-name kivo-db.

  • Keep .env (with AUTH_SECRET) somewhere safe.

Updates

bash
cd /opt/kivo
sed -i 's/^KIVO_VERSION=.*/KIVO_VERSION=<new-version>/' .env
docker compose pull
docker compose up -d

Back up first. Compose runs the new invicly/kivo-migrate before the new app starts.

Connect to Kivo Control and activate

The server needs outbound HTTPS to https://kivo-control.invicly.com (allowed by the firewall above). Make sure .env has:

bash
KIVO_CONTROL_URL=https://kivo-control.invicly.com
KIVO_LICENSE_PUBLIC_KEYS="lic-2026-09:MCowBQYDK2VwAyEAzWdTL0qB3C7ZDkfbdcn0u4MADyzGFR9suPCuNkf8mbQ="

Then sign in as the owner, open Settings → License, paste your key and press Activate workspace. The workspace appears under Installations in your Kivo Control portal. More: Connect & activate.


Next