You can declare monitors directly in your `compose.yml` using the `UPTIME_KUMA_MONITORS` environment variable, so they are automatically created at startup without any UI interaction.
```yaml
services:
uptime-kuma:
image: louislam/uptime-kuma:2
container_name: uptime-kuma
restart: always
ports:
- "3001:3001"
volumes:
- uptime-kuma-data:/app/data
environment:
UPTIME_KUMA_MONITORS: |
[
{"name": "My Website", "url": "https://example.com"},
The value must be a valid JSON array. Seeding is **idempotent** — monitors already in the database are never duplicated, and monitors added through the UI are unaffected.
> [!NOTE]
> At least one user account must exist before seeding runs. On a brand-new install, complete the initial setup (database + admin account) first, then restart the container.
#### Monitor object fields
| Field | Type | Default | Description |
|---|---|---|---|
| `name` | string | **required** | Display name shown in the dashboard |
| `url` | string | **required** | URL to monitor (or hostname for non-HTTP types) |