# Render

Deploy kogut on Render with a persistent disk.

Run kogut on [Render](https://render.com) as a web service from the container image,
separate from the servers it monitors. The disk needs a paid instance type, such as
**Starter**.

1. In the Render dashboard, select **New → Web Service → Existing Image** and enter
   `ghcr.io/piotrkowski/kogut:0.1`.

2. Choose an instance type with a disk.

3. In **Environment**, add `PORT=8484` and set `KOGUT_URL` to the service's HTTPS
   `onrender.com` URL. For your own domain, add it under **Settings → Custom Domains**
   and use that URL.

4. In **Advanced**, add a disk mounted at `/data` and set **Health Check Path** to
   `/healthz`.

5. Create the service. Open the URL and create your account with the setup token: search
   the service's log for `setup_token`.

## Configure the service

The disk holds the database; keep it attached across redeploys. 1 GB is enough for a few
dozen checks, a few hosts, and a few thousand page views a day with the default
retention. You can [increase the disk size](https://render.com/docs/disks) later.

Put [`kogut.toml`](https://docs.kogut.dev/reference/configuration/) at `/data/kogut.toml` on the disk.

If you know Render's proxy address range, add it to `[server] trusted_proxies`.
Otherwise all visitors through that proxy share one rate limit. See
[Client addresses](https://docs.kogut.dev/installation/caddy/#client-addresses-behind-a-proxy).

## Monitor servers and internal services

[Install the agent](https://docs.kogut.dev/agent/installing/) on each server with the Render HTTPS URL.
Use `from` to run checks inside private networks; see
[Internal services](https://docs.kogut.dev/monitoring/internal-services/). If Render blocks ICMP, run ping
checks from an agent or use a TCP check.

## Update

Select **Manual Deploy → Deploy latest reference** to pull the latest patch of the `0.1`
image tag. Read [Upgrading](https://docs.kogut.dev/installation/upgrading/) before changing minor versions.
