# Dokploy

Deploy kogut on Dokploy with HTTPS and a persistent volume.

The [Dokploy](https://dokploy.com) template serves kogut over HTTPS through Traefik,
with a persistent volume.

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

2. Choose a domain, such as `kogut.acme.com`, and point its DNS record at the server.

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

## Configure the service

The template sets `KOGUT_URL` from your domain and mounts a volume at `/data`. See
[Environment variables](https://docs.kogut.dev/reference/environment-variables/).

Put [`kogut.toml`](https://docs.kogut.dev/reference/configuration/) at `/data/kogut.toml`, or mount a
configuration directory and set `KOGUT_CONFIG` to the file's path.

Add Traefik's 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).

## Add a status domain

Add a second domain to the service on port 8484 and set it in `kogut.toml`:

```toml title="kogut.toml"
[brand]
status_domain = "status.acme.com"
```

Without a separate domain, the status page is at `/status` on the panel's domain.

## Monitor the servers

[Install the agent](https://docs.kogut.dev/agent/installing/) on the Dokploy 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.
