Install Kivo
Amazon Web Services
EC2 with PostgreSQL on the instance or Amazon RDS.
Run Kivo on an EC2 instance with Docker Compose. PostgreSQL runs either on the instance or in Amazon RDS for PostgreSQL. DNS can be in Route 53, email through Amazon SES, and HTTPS 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 |
|---|---|
| Security group for the app | kivo-sg |
EC2 instance, Ubuntu 24.04, t3.small or larger | kivo |
| Elastic IP | a fixed public address |
| Optional: security group and RDS instance for PostgreSQL | kivo-db-sg, kivo-db |
You'll need the AWS CLI, an EC2 key pair, a domain, and SMTP credentials (SES SMTP credentials work well).
Security groups
aws ec2 create-security-group --group-name kivo-sg --description "Kivo app" --vpc-id <vpc-id>
# note the GroupId as <sg-id>
aws ec2 authorize-security-group-ingress --group-id <sg-id> --protocol tcp --port 22 --cidr <your-ip>/32
aws ec2 authorize-security-group-ingress --group-id <sg-id> --protocol tcp --port 80 --cidr 0.0.0.0/0
aws ec2 authorize-security-group-ingress --group-id <sg-id> --protocol tcp --port 443 --cidr 0.0.0.0/0Never open 3000 or 5432 to the internet.
Launch the instance
AMI=$(aws ssm get-parameters --names /aws/service/canonical/ubuntu/server/24.04/stable/current/amd64/hvm/ebs-gp3/ami-id \
--query 'Parameters[0].Value' --output text)
aws ec2 run-instances --image-id "$AMI" --instance-type t3.small \
--key-name <key-pair> --security-group-ids <sg-id> \
--block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"VolumeSize":30,"VolumeType":"gp3","Encrypted":true}}]' \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=kivo}]'
# note the InstanceId as <instance-id>
aws ec2 allocate-address --domain vpc # note AllocationId and PublicIp
aws ec2 associate-address --instance-id <instance-id> --allocation-id <allocation-id>DNS with Route 53
aws route53 change-resource-record-sets --hosted-zone-id <zone-id> --change-batch '{
"Changes": [{ "Action": "UPSERT", "ResourceRecordSet": {
"Name": "<your-domain>", "Type": "A", "TTL": 300,
"ResourceRecords": [{ "Value": "<elastic-ip>" }] } }]
}'Any other DNS provider works too: add an A record for <your-domain> pointing at the Elastic IP.
Install Docker and Docker Compose
ssh -i <key-pair>.pem ubuntu@<elastic-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 && exitGet and configure Kivo
ssh -i <key-pair>.pem ubuntu@<elastic-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=email-smtp.<region>.amazonaws.com # Amazon SES
SMTP_PORT=465
SMTP_SECURE=true
SMTP_USERNAME=<ses-smtp-user>
SMTP_PASSWORD=change-me
SMTP_FROM_EMAIL=kivo@<your-domain> # a verified SES identity
SMTP_FROM_NAME=Kivo
KIVO_INSTANCE_NAME=Kivo on AWS
KIVO_CONTROL_URL=https://kivo-control.invicly.com
KIVO_LICENSE_PUBLIC_KEYS="lic-2026-09:MCowBQYDK2VwAyEAzWdTL0qB3C7ZDkfbdcn0u4MADyzGFR9suPCuNkf8mbQ="New SES accounts are in the sandbox and can only send to verified addresses; request production access first. EC2 throttles port 25; use 465 or 587.
PostgreSQL
Option A: on the instance
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: Amazon RDS for PostgreSQL
aws ec2 create-security-group --group-name kivo-db-sg --description "Kivo database" --vpc-id <vpc-id>
aws ec2 authorize-security-group-ingress --group-id <db-sg-id> --protocol tcp --port 5432 --source-group <sg-id>
aws rds create-db-instance --db-instance-identifier kivo-db \
--engine postgres --engine-version 16 --db-instance-class db.t4g.micro \
--allocated-storage 20 --storage-type gp3 --storage-encrypted \
--master-username kivo --master-user-password 'change-me' --db-name kivo \
--vpc-security-group-ids <db-sg-id> --no-publicly-accessible \
--backup-retention-period 7
aws rds wait db-instance-available --db-instance-identifier kivo-db
aws rds describe-db-instances --db-instance-identifier kivo-db --query 'DBInstances[0].Endpoint.Address' --output textAdd to .env:
DATABASE_URL=postgresql://kivo:change-me@<rds-endpoint>: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
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.
If you put an Application Load Balancer in front instead (with an ACM certificate), remove https from COMPOSE_PROFILES, set APP_BIND=0.0.0.0, point its target group at port 3000 with the health check /api/health/ready, allow 3000 only from the load balancer's security group, and keep TRUSTED_PROXY_HOPS=1 (2 with CloudFront in front).
Open https://<your-domain>/register and create the first workspace.
Backup
Option A: a nightly
pg_dump(Backup) copied to S3. Give the instance an IAM role that can write to the bucket, then:aws s3 cp /var/backups/kivo/kivo-$(date +%F).dump s3://<backup-bucket>/kivo/Add an S3 lifecycle rule to expire old copies, and consider Amazon Data Lifecycle Manager snapshots of the EBS volume.
Option B: RDS keeps automated backups with point-in-time restore for the retention period. Take a manual snapshot before updates:
aws rds create-db-snapshot --db-instance-identifier kivo-db --db-snapshot-identifier kivo-before-update.Keep
.env(withAUTH_SECRET) in AWS Secrets Manager or another safe place.
Updates
cd /opt/kivo
sed -i 's/^KIVO_VERSION=.*/KIVO_VERSION=<new-version>/' .env
docker compose pull
docker compose up -dBack 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 (security groups allow all outbound traffic by default). 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