Installation / Install with Dokploy
Install with Dokploy
Deploy Uptime Kotlin and PostgreSQL on Dokploy from the official template in a few clicks, or paste the Compose file yourself.
Dokploy deploys the same two containers as the Docker Compose installation, and adds the domain and the HTTPS certificate for you. You need a server already running Dokploy.
Uptime Kotlin is available as an official Dokploy template. It is the quickest way to install it. If you want to edit the definition before the first deployment, paste the Compose file yourself instead.
Deploy from the template
- In your project, choose Create Service, then Template.
- Search for Uptime Kotlin and choose Create.
- Choose Deploy.
The template generates the database password and the encryption key, and adds a domain for the uptime-kotlin service on port 8080. To use your own domain, change it in the Domains tab and point a DNS record for that name at the server.
Save your encryption key
Open the Environment tab of the service and copy the value of ENCRYPTION_MASTER_KEY. Keep it somewhere safe, outside Dokploy. It encrypts the stored secrets (notification tokens, database passwords of your monitors) and a lost key cannot be recovered. To change it later, see Rotate the master key.
The template installs a fixed version of Uptime Kotlin. To upgrade, change the image tag in the General tab of the service, then deploy again.
Paste the Compose file yourself
In your project, create a Compose service, choose the Raw provider and paste this definition:
services:
uptime-kotlin:
image: ghcr.io/theomeunier/uptime-kotlin:latest
restart: unless-stopped
mem_limit: 512m
expose:
- 8080
environment:
TZ: ${TZ:-Europe/Paris}
QUARKUS_DATASOURCE_USERNAME: uptime-kotlin
QUARKUS_DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://postgres:5432/uptime-kotlin
ENCRYPTION_MASTER_KEY: ${ENCRYPTION_MASTER_KEY:?ENCRYPTION_MASTER_KEY is required}
MP_JWT_VERIFY_ISSUER: https://issuer.uptime-kotlin.com
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:18.6-alpine
restart: unless-stopped
environment:
POSTGRES_DB: uptime-kotlin
POSTGRES_USER: uptime-kotlin
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
volumes:
- uptime-kotlin-db:/var/lib/postgresql
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U uptime-kotlin -d uptime-kotlin']
interval: 5s
timeout: 3s
retries: 10
volumes:
uptime-kotlin-db:There are no ports: the Dokploy proxy reaches the application on port 8080.
Set your secrets
In the Environment tab of the service, set the two required variables:
POSTGRES_PASSWORD=change-me
ENCRYPTION_MASTER_KEY=change-meGenerate each value with openssl rand -base64 32. Keep the encryption key somewhere safe, outside Dokploy. It encrypts the stored secrets (notification tokens, database passwords of your monitors) and a lost key cannot be recovered. To change it later, see Rotate the master key.
Set the domain
In the Domains tab, add your domain for the uptime-kotlin service, on container port 8080, with HTTPS enabled. Point a DNS record for that name at the server: Dokploy requests the certificate on the first deployment.
Deploy and sign up
If you pasted the Compose file yourself, choose Deploy. Once both containers are running, open your domain: on the first visit, Uptime Kotlin asks for the administrator account, as described in Create the first account.
Good to know
Moving an existing instance? Set
ENCRYPTION_MASTER_KEYto your current key before the first deployment, and load a dump of your database once PostgreSQL is running, as in Upgrade from PostgreSQL 17.
Large exports cut off? Exports can take up to 300 s. Raise the read timeout of the Dokploy proxy if they stop early.
The other environment variables are listed on the configuration page. Add them to the uptime-kotlin container in the definition. Next, create your first monitor.
