# Self-host Kopia

> Fast, incremental, encrypted backups to a repository, driven from a web UI instead of a cron script.

- Page: https://levelrail.com/templates/kopia/
- JSON: https://levelrail.com/templates/kopia.json
- Category: Storage
- Licence: Apache-2.0 (Permissive license)
- Source: https://github.com/kopia/kopia
- Upstream docs: https://kopia.io/docs/installation/#quick-setup-using-docker

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

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| kopia | kopia/kopia | 0.19.0 | 51515 | kopia_repository -> /app/repository; kopia_config -> /app/config; kopia_cache -> /app/cache; kopia_logs -> /app/logs |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| kopia | KOPIA_PASSWORD | generated |
| kopia | KOPIA_SERVER_PASSWORD | generated |
| kopia | KOPIA_SERVER_USERNAME | preset |

## Deploy

### CLI

```bash
levelrail-cli templates deploy kopia --name my-kopia
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/kopia/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 Kopia 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 Kopia, 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 kopia/kopia:0.19.0 is what you deploy there.

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