---
title: "Deploy Harness Open Source"
description: "Self-hosted Git, code review and artifact registry (formerly Gitness)"
category: "Other"
url: https://railway.com/deploy/harness-open-sourc-1
---

# Deploy Harness Open Source

Self-hosted Git, code review and artifact registry (formerly Gitness)

**[Deploy Harness Open Source on Railway](https://railway.com/template/harness-open-sourc-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/harness-open-sourc-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### Harness https://cdn.jsdelivr.net/gh/harness/harness@v3.3.0/web/src/favicon.svg

- **Source:** https://github.com/aalfath/harness-open-source-railway-template
- **Health check:** /api/v1/system/health
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Documentation

# Deploy and Host Harness Open Source on Railway

Harness Open Source (formerly Gitness) is a self-hosted developer platform from Harness, licensed Apache-2.0. It hosts Git repositories with pull requests, code review, branch rules and webhooks, and includes an artifact registry for container images and packages. You get one web UI and a REST API on your own server and database.

## About Hosting Harness Open Source

This template runs Harness Open Source 3.3.0 from the official `harness/harness` image, pinned by version and digest, built from a public GitHub repo. A Railway Postgres database holds users, spaces and pull requests. A volume at `/data` keeps the Git repositories, uploads, registry blobs and the SSH host key, so nothing is lost on a redeploy. The encryption key, registry secret and admin password are generated at deploy. Railway asks only for your email, and the admin account is created with it on first boot. Open sign-up is off. Git over SSH goes through a Railway TCP proxy. A health check guards every deploy.

## Common Use Cases

* Private Git hosting with pull requests and code review for a team or for side projects
* A private container and package registry next to your code
* A self-hosted alternative to GitHub or GitLab for repositories you want to keep on your own infrastructure

## Dependencies for Harness Open Source Hosting

* Harness Open Source 3.3.0 (`harness/harness`), built from this template's GitHub repo
* PostgreSQL (Railway's Postgres service)

### Deployment Dependencies

* Harness Open Source source code: https://github.com/harness/harness
* Release 3.3.0: https://github.com/harness/harness/releases/tag/v3.3.0
* Documentation: https://developer.harness.io/docs/open-source
* Settings reference: https://developer.harness.io/docs/open-source/installation/settings
* Template repo, with the changelog: https://github.com/aalfath/harness-open-source-railway-template

### Implementation Details

After the deploy finishes:

1. Open the Harness service's public URL.
2. Sign in as `admin` (or with the email you entered). The password is the `GITNESS_PRINCIPAL_ADMIN_PASSWORD` variable on the Harness service. Change it in your profile afterwards.
3. Add team members under Admin, Users. To let anyone register, set `GITNESS_USER_SIGNUP_ENABLED=true`.
4. For Git over HTTPS, create a token in your profile and use it as the password. For Git over SSH, add your public key. The clone URL shown in each repository uses the TCP proxy address.

Pipelines (CI/CD) and Gitspaces start Docker containers, and Railway services have no Docker host, so Gitspaces are turned off. Pipelines can use a Docker host you run elsewhere through `GITNESS_DOCKER_HOST`. If you add a custom domain, set `GITNESS_URL_BASE` to it. Email works once you add `GITNESS_SMTP_HOST`, `GITNESS_SMTP_PORT`, `GITNESS_SMTP_USERNAME`, `GITNESS_SMTP_PASSWORD` and `GITNESS_SMTP_FROM_MAIL`.

Updates: when a new Harness version is tested, this template's GitHub repo gets the new pinned image and a changelog entry, and Railway shows you an update notice. Read the changelog, then apply the update. Harness migrates its database on start.

## Why Deploy Harness Open Source 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 Harness Open Source 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.



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/harness-open-sourc-1
