OneDev — an all-in-one, self-hosted Git server with built-in CI/CD, code search, packages and Kanban boards. Uses an embedded database, so no external DB is needed. Deployed as a single host-networked Nomad service.
Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.
Source ↗ Project ↗ ★ 15.3k ⚑ Report an issue
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "onedev"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The OneDev container image. Pin a tag in production.
image = "1dev/server:latest"
# Host port for the OneDev web UI / HTTP git.
port = 6610
# Port for git-over-SSH.
ssh_port = 6611
# Named volume mounted at /opt/onedev — repositories, the embedded database and config.
data_volume = "onedev_data"
# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# The task resources.
resources = {
cpu = 1500
memory = 2048
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "onedev" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "1dev/server:latest" | The OneDev container image. Pin a tag in production. |
| port | number | 6610 | Host port for the OneDev web UI / HTTP git. |
| ssh_port | number | 6611 | Port for git-over-SSH. |
| data_volume | string | "onedev_data" | Named volume mounted at /opt/onedev — repositories, the embedded database and config. |
| constraints | list | [] | Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 1500
memory = 2048
} | The task resources. |
No variables match.
This pack stores data in one Docker named volume:
onedev_data
restic
# Run on the node hosting this pack. Point restic at your repo first: # export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>" # export RESTIC_PASSWORD="<repo-password>" # export AWS_ACCESS_KEY_ID=<key> AWS_SECRET_ACCESS_KEY=<secret> restic backup \ /var/lib/docker/volumes/onedev_data/_data
rclone (sync to S3/R2)
rclone sync /var/lib/docker/volumes/onedev_data/_data backup:<bucket>/onedev_data
Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.
OneDev — an all-in-one, self-hosted Git server with built-in CI/CD, code search & navigation, pull requests, packages and Kanban boards. Unlike some forges it needs no separate CI runner to get started and uses an embedded database, so a single container gives you a full development platform.
Single host-networked Nomad service with a persistent data volume.
nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run onedev --registry=nomploy
| Variable | Default | Description |
|---|---|---|
port |
6610 |
Web UI / HTTP-git port (OneDev's default). |
ssh_port |
6611 |
git-over-SSH port (OneDev's default). |
image |
1dev/server:latest |
Container image. Pin a tag in production. |
data_volume |
onedev_data |
/opt/onedev — repositories, embedded DB and config. |
resources |
{ cpu = 1500, memory = 2048 } |
Task resources. The JVM needs headroom. |
On first launch, complete the setup wizard (create the admin account, set the server URL). The default ports match OneDev's built-ins; a prestart init task makes the data volume writable. For CI builds on the same host, add a Docker executor by mounting
/var/run/docker.sockinto the task. Pin the job to the node holding the volume withconstraints.