Deploy OneDev

OneDev 16.7 Git server with CI/CD, issues and code search, on Postgres.

Deploy OneDev

/var/lib/postgresql/data

Just deployed

/opt/onedev

Deploy and Host OneDev on Railway

OneDev is an all-in-one, self-hosted Git server with built-in CI/CD, kanban issue boards, pull requests with code review, package registries and fast code search with symbol navigation. Pipelines are defined in a visual editor or YAML, and it runs as one Java application that is easy to operate for teams of any size.

About Hosting OneDev

This template deploys OneDev v16.7.3 from the official image with a Railway Postgres database. Repositories, build logs and settings live on a Railway volume. The admin account is created from environment variables on first start, and public self sign-up is turned off once during that boot. The web UI and HTTPS Git run on your Railway domain, and SSH Git goes through the Railway TCP proxy. CI jobs need an agent or the server's own executor, which uses its CPU and memory. OneDev is a Java application, so plan for at least 1 GB of memory. Back up the volume and Postgres regularly.

Common Use Cases

  • Self-hosted Git with pull requests, issues and CI in one place
  • Private code hosting for teams that want to avoid GitHub or GitLab
  • Code search and navigation across many repositories

Dependencies for OneDev Hosting

  • 1dev/server:16.7.3 (official image)
  • Railway Postgres (ghcr.io/railwayapp-templates/postgres-ssl:18) with a volume
  • A Railway volume at /opt/onedev
  • A Railway TCP proxy for SSH Git

Deployment Dependencies

Implementation Details

ServiceImageNetworkingStorage
onedev1dev/server:16.7.3public domain on 6610; TCP proxy to SSH 6611volume at /opt/onedev
PostgresRailway Postgres 18private onlyvolume
git clone https://admin@/my-project
VariableDefaultPurpose
initial_user / initial_password / initial_emailadmin / generated / admin@example.comAdmin account, created on first start
initial_server_url / initial_ssh_root_urldomain / TCP proxyClone URLs
hibernate_*Postgres referencesDatabase

Notes:

  • The start command closes self sign-up once and writes a marker file on the volume; re-enable it in Administration if you want it.
  • Jobs run by the server's own executor share its container; use agents for untrusted code.

This is a community-maintained deployment package and does not imply affiliation with or endorsement by the OneDev project or its maintainers.

Why Deploy OneDev on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying OneDev on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
47
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51