# Self-host OneDev

> A self-hosted Git server with built-in CI/CD, issue tracking and code search, in one container.

- Page: https://levelrail.com/templates/onedev/
- JSON: https://levelrail.com/templates/onedev.json
- Category: Developer Tools
- Licence: MIT (Permissive license)
- Source: https://github.com/theonedev/onedev
- Upstream docs: https://docs.onedev.io/installation-guide/run-as-docker-container

## Requirements
- Memory: about 1 GiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 16.9.0

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| onedev | 1dev/server | 16.9.0 | 6610 | data -> /opt/onedev |

## Deploy

### CLI

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

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/onedev/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 OneDev on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id onedev for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image 1dev/server:16.9.0 is what you deploy there.

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