Install Kivo
Microsoft Azure
An Ubuntu VM with Azure Database for PostgreSQL.
Run Kivo on an Ubuntu virtual machine in Azure with Docker Compose. PostgreSQL runs either on the VM (simplest) or in Azure Database for PostgreSQL – Flexible Server (managed backups and patching). 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
| Resource | Example name |
|---|---|
| Resource group | kivo-rg |
Ubuntu 24.04 VM (2 vCPU, 4 GB suggested; Standard_B2s) | kivo-vm |
| Network security group (made with the VM) | kivo-vmNSG |
| Optional: Azure Database for PostgreSQL Flexible Server | <db-server-name> |
You'll need the Azure CLI, a domain you can add DNS records to, and SMTP credentials (for example Azure Communication Services Email, or SendGrid).
Create the VM
az login
az group create -n kivo-rg -l <region>
az vm create -g kivo-rg -n kivo-vm \
--image Ubuntu2404 --size Standard_B2s \
--admin-username azureuser --generate-ssh-keys \
--public-ip-sku Standard --os-disk-size-gb 64
az vm show -d -g kivo-rg -n kivo-vm --query publicIps -o tsv # note the public IPNetwork security group (firewall)
Allow HTTP and HTTPS from anywhere, and SSH only from your own address. Never open port 3000 or 5432.
az network nsg rule create -g kivo-rg --nsg-name kivo-vmNSG -n allow-web \
--priority 1010 --direction Inbound --access Allow --protocol Tcp \
--destination-port-ranges 80 443
az network nsg rule update -g kivo-rg --nsg-name kivo-vmNSG -n default-allow-ssh \
--source-address-prefixes <your-ip>/32DNS
Add an A record for <your-domain> pointing at the VM's public IP, at your DNS provider. With Azure DNS:
az network dns record-set a add-record -g <dns-resource-group> -z <your-zone> -n <subdomain> -a <vm-public-ip>Wait until dig +short <your-domain> returns the IP before you set up HTTPS.
Install Docker and Docker Compose
ssh azureuser@<vm-public-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 # sign in again for the group to applyGet and configure Kivo
ssh azureuser@<vm-public-ip>Then download the two files:
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 .envEdit .env (nano .env):
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> # e.g. smtp.azurecomm.net
SMTP_PORT=587
SMTP_SECURE=false # STARTTLS on 587
SMTP_USERNAME=<smtp-user>
SMTP_PASSWORD=change-me
SMTP_FROM_EMAIL=kivo@<your-domain>
SMTP_FROM_NAME=Kivo
KIVO_INSTANCE_NAME=Kivo on Azure
KIVO_CONTROL_URL=https://kivo-control.invicly.com
KIVO_LICENSE_PUBLIC_KEYS="lic-2026-09:MCowBQYDK2VwAyEAzWdTL0qB3C7ZDkfbdcn0u4MADyzGFR9suPCuNkf8mbQ="Azure blocks outbound port 25 from VMs; ports 587 and 465 work.
PostgreSQL
Option A: on the VM
Set these in .env:
POSTGRES_USER=kivo
POSTGRES_PASSWORD=change-me # openssl rand -hex 24
POSTGRES_DB=kivoKeep COMPOSE_PROFILES=db,https. The compose file publishes the app on 127.0.0.1:3000 only.
Option B: Azure Database for PostgreSQL
Create the server with access only from the VM's IP (or use private access in the VM's virtual network, --vnet and --subnet, for traffic that never leaves Azure):
az postgres flexible-server create -g kivo-rg -n <db-server-name> -l <region> \
--tier Burstable --sku-name Standard_B1ms --version 16 --storage-size 32 \
--admin-user kivo --admin-password 'change-me' \
--public-access <vm-public-ip> --backup-retention 14
az postgres flexible-server db create -g kivo-rg -s <db-server-name> -d kivoAdd to .env (URL-encode special characters in the password):
DATABASE_URL=postgresql://kivo:change-me@<db-server-name>.postgres.database.azure.com:5432/kivo?sslmode=requireAnd set COMPOSE_PROFILES=https, so the bundled PostgreSQL doesn't start (details).
Start Kivo
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/readyHTTPS and the reverse proxy
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. Keep TRUSTED_PROXY_HOPS=1. If you add Azure Front Door or Application Gateway in front, set it to 2.
Open https://<your-domain>/register and create the first workspace (you become its owner).
Backup
Option A (on the VM): a nightly
pg_dump(see Backup), copied to Blob Storage:az storage blob upload --auth-mode login --account-name <storage-account> -c kivo-backups \ -f /var/backups/kivo/kivo-$(date +%F).dump -n kivo-$(date +%F).dumpGive the VM a managed identity with Storage Blob Data Contributor on the container, and turn on Azure Backup for the VM for disk-level copies.
Option B (managed): automated backups with point-in-time restore are on (
--backup-retention 14above). Restore withaz postgres flexible-server restore.Keep a copy of
/opt/kivo/.env(withAUTH_SECRET) somewhere safe, such as Azure Key Vault.
Updates
cd /opt/kivo
docker compose exec -T postgres pg_dump -U kivo -Fc kivo > ~/kivo-before-update.dump # Option A
sed -i 's/^KIVO_VERSION=.*/KIVO_VERSION=<new-version>/' .env
docker compose pull
docker compose up -dKeep Ubuntu patched with sudo apt-get update && sudo apt-get upgrade, or turn on unattended upgrades.
Connect to Kivo Control and activate
The server needs outbound HTTPS to https://kivo-control.invicly.com (allowed by default in a network security group). Make sure .env has:
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