Deployment guide

Self-Host OneDev: Git, CI/CD and Kanban in One Container

Deploy on a VPS Cloud →

Self-hosting8 min read

Self-Host OneDev: Git, CI/CD and Kanban in One Container

Looking for a self-hosted GitHub equivalent with built-in CI/CD, without installing a separate runner or paying per developer? OneDev bundles a Git forge, a CI/CD engine, Kanban boards and a package registry in a single Docker container — on a 2 GB RAM VPS.

Why OneDev over Gitea alone?

Gitea is great for hosting code: it is lightweight, fast and covers all the needs of a classic Git forge. But the moment you want CI/CD, you need to install a separate runner (gitea/act_runner), configure it, monitor its jobs and expose it to the network. OneDev does all this by default: when you push a .onedev-buildspec.yml, a pipeline is queued and runs in a Docker container on the same VPS — no additional service to configure.

This integration extends to issues and Kanban boards: instead of managing a project in a third application, OneDev's Kanban cards move automatically when a branch is created, a pull request opened or a commit merged. The result is a coherent developer workspace, without tab juggling.

What you get with OneDev

  • Complete Git forge: repositories, branches, tags, pull requests, code reviews, wikis and releases
  • Integrated CI/CD with visual pipeline designer — no separate runner to install
  • Kanban boards with automatic transitions triggered by repository events
  • Docker/OCI, npm, Maven, NuGet and Helm package registry hosted on the same URL
  • Code symbol search and diff navigation powered by static analysis
  • Authentication via LDAP, OAuth2 (GitHub, GitLab, Google) or local accounts
  • Import from GitHub, GitLab or Gitea with history, issues and pull requests

Architecture: two containers, one URL

OneDev runs as two Docker containers: 1dev/server (the Java application) and postgres:14 (the database). The application listens on port 6610; ServOrbit places an nginx vhost in front and handles TLS. Everything goes through the same domain: the web interface, HTTPS Git clones, CI webhooks and the package registry.

The 1dev/server image also embeds a local build agent. When a pipeline starts, it launches a Docker container for each build step — this is why the Docker socket (/var/run/docker.sock) is mounted in the OneDev container. This design is standard for self-hosted CI platforms (Jenkins, Drone, Woodpecker use it too) and allows configuring remote agents if you need parallelism or hardware isolation.

The PostgreSQL database stores repositories (as bare Git repositories in /opt/onedev), issues, members, CI jobs and configuration. A single Docker volume is enough to back everything up.

Deploy OneDev in 4 steps

01

Order a VPS with a domain

Choose a VPS with at least 2 GB of RAM — OneDev is a Java application that needs some headroom on startup. A domain is required: OneDev embeds the server URL in clone links, webhooks and OAuth redirects. Point a subdomain (git.mycompany.com) at your VPS, or use the free ServOrbit subdomain ({app}.{dns_slug}.servorbit-dns.com) which includes HTTPS automatically.

02

Automatic deployment from the marketplace

In your ServOrbit space, go to Marketplace → Development → OneDev → Deploy. ServOrbit generates database credentials, starts the two containers and configures the nginx vhost. The web interface is available over HTTPS within two minutes.

03

Initial setup wizard

Open your domain in a browser. OneDev shows a first-run wizard that asks you to create the administrator account and, crucially, to enter the server URL — enter your full HTTPS domain (https://git.mycompany.com). OneDev stores this URL and embeds it everywhere: clone links, email notifications, CI status badges. Take the time to set it correctly from the start.

04

First repository and first pipeline

Create a repository from the interface, clone it over HTTPS, add a .onedev-buildspec.yml at the root and push. OneDev detects the specification, queues the pipeline and runs it in a Docker container on your VPS — no additional configuration.

The OneDev pipeline: .onedev-buildspec.yml

OneDev uses its own YAML pipeline format, different from GitHub Actions or GitLab CI. The basic structure consists of jobs with steps. Each step can use a Docker image, run a script, publish an artifact or send a notification.

The visual pipeline designer generates this YAML graphically: you add steps from the interface, configure Docker images, environment variables and triggers, and OneDev writes the file for you. Pipelines support build matrices, inter-step artifacts, and scheduling via scheduleTrigger for nightly tasks. A dedicated dashboard shows the status of all jobs in real time and keeps the full run history with timestamped logs.

OneDev vs Gitea vs GitLab CE

OneDevGiteaGitLab CE
Built-in CI/CDYes (agent included)Via separate runnerYes (GitLab runner)
Built-in KanbanYesNo (third-party)Yes
Package registryDocker, npm, Maven…Docker, npm, Maven…Docker, npm, Maven…
Typical RAM (1 dev)~512 MB idle~200 MB2 GB minimum
LicenseMITMITMIT (EE proprietary)
Import GitHub/GitLabYes (issues + PRs)Yes (code only)Yes

Backing up OneDev

OneDev stores everything in two Docker volumes: onedev_data (Git repositories, config, jobs) and onedev_db (PostgreSQL). A full backup means archiving these two volumes. OneDev can also configure automatic backups to S3-compatible object storage from Site Administration → Settings → Backup Settings.

Never expose the Docker socket directly on a public interface — it gives root access to the host machine. ServOrbit binds port 6610 to the loopback interface by default, keeping the OneDev web UI behind the nginx reverse proxy on port 443.

Deploy your infrastructure today

VPS Cloud. Preconfigured environments available.

Need help?

Browse our help center and FAQ, or reach our team — callback, WhatsApp or email. Support in French, English and Arabic.