# Self-host Zot Registry

> OCI native container image registry with a web UI, search and optional sync. The install form carries config.json as an editable file and images are stored on a volume.

- Page: https://levelrail.com/templates/zot/
- JSON: https://levelrail.com/templates/zot.json
- Category: Developer Tools
- Licence: Apache-2.0 (Permissive license)
- Source: https://github.com/project-zot/zot
- Upstream docs: https://zotregistry.dev/latest/

## Requirements
- Memory: about 128 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: v2.1.23

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| zot | ghcr.io/project-zot/zot | v2.1.23 | 5000 | data -> /var/lib/registry |

## Deploy

### CLI

```bash
levelrail-cli templates install zot --name my-zot
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain zot=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/zot/install \
  -d '{
    "name": "my-zot"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## First run
1. Push an image with docker push to this address, then open the address to browse it. The starter config has no login, so keep it private or add authentication in the config file.

## Questions

### Can I deploy Zot Registry 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 Zot Registry, 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 ghcr.io/project-zot/zot:v2.1.23 is what you deploy there.

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