# Coolify

Deploy kogut on Coolify with HTTPS and a persistent volume.

The [Coolify](https://coolify.io) template serves kogut over HTTPS with a persistent
volume.

1. Choose **New → Service** in your project and search for **kogut**.

2. Keep the generated URL or replace it with your domain, such as
   `https://kogut.acme.com`, and point the domain's DNS record at the server.

3. Deploy. When the service is healthy, open the URL and create your account with the
   setup token: search the service's log for `setup_token`.

## Configure the service

Add settings in **Environment Variables**. The template sets `KOGUT_URL` from the service
URL. See [Environment variables](https://docs.kogut.dev/reference/environment-variables/).

Put [`kogut.toml`](https://docs.kogut.dev/reference/configuration/) at `/data/kogut.toml` in the volume, or
mount a configuration directory under **Storages** and set `KOGUT_CONFIG` to the file's
path in the container. Put secrets referenced as `${NAME}` in **Environment Variables**.

Add the proxy's Docker network range to `[server] trusted_proxies` to keep client
addresses for rate limits and visitor counts. See
[Client addresses behind a proxy](https://docs.kogut.dev/installation/caddy/#client-addresses-behind-a-proxy).

## Monitor the servers

[Install the agent](https://docs.kogut.dev/agent/installing/) on the Coolify server and each deployment
server with the command from **Hosts → Add a server**. [Discovery](https://docs.kogut.dev/agent/discovery/)
adds checks for containers and the URLs their Traefik labels route to.

If kogut runs on a server it monitors, that server's failure also stops its alerts. Use
a separate server or [kogut edge](https://docs.kogut.dev/high-availability/kogut-edge/).

## Update

Redeploy to get the latest patch of the template's `0.1` image tag. Read
[Upgrading](https://docs.kogut.dev/installation/upgrading/) before changing minor versions.
