# Self-host Uptime Kuma (MariaDB)

> Uptime Kuma with a MariaDB sidecar provisioned, for the setups that opt out of its default SQLite file.

- Page: https://levelrail.com/templates/uptime-kuma-mariadb/
- JSON: https://levelrail.com/templates/uptime-kuma-mariadb.json
- Category: Monitoring
- Licence: MIT (Permissive license)
- Source: https://github.com/louislam/uptime-kuma
- Upstream docs: https://github.com/louislam/uptime-kuma/wiki

## Requirements
- Memory: about 512 MiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 11

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| mariadb | mariadb | 11 | none | uptime_kuma_mariadb_data -> /var/lib/mysql |
| uptime-kuma | louislam/uptime-kuma | 2 | 3001 | uptime_kuma_mariadb_app_data -> /app/data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| mariadb | MYSQL_DATABASE | preset |
| mariadb | MYSQL_PASSWORD | generated |
| mariadb | MYSQL_ROOT_PASSWORD | generated |
| mariadb | MYSQL_USER | generated |
| uptime-kuma | TZ | preset |

## Deploy

### CLI

```bash
levelrail-cli templates deploy uptime-kuma-mariadb --name my-uptime-kuma-mariadb
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/uptime-kuma-mariadb/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy Uptime Kuma (MariaDB) on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Uptime Kuma (MariaDB), so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image mariadb:11, louislam/uptime-kuma:2 is what you deploy there.

Self-host Uptime Kuma (MariaDB), Uptime Kuma (MariaDB) docker compose file, deploy Uptime Kuma (MariaDB) on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
