# Self-host Gitness

> Harness Open Source, a Git host with code review, pipelines and an artifact registry in one binary. Apache-2.0 licensed. Uses an embedded SQLite database on the data volume. The first user to register becomes the admin, then turn off sign-ups. Pipelines that run containers need Docker access, which this template does not grant.

- Page: https://levelrail.com/templates/gitness/
- JSON: https://levelrail.com/templates/gitness.json
- Category: Developer Tools
- Licence: Apache-2.0 (Permissive license)
- Source: https://github.com/harness/harness
- Upstream docs: https://docs.harness.io/open-source

## Requirements
- Memory: about 384 MiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 3.3.0

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| gitness | harness/harness | 3.3.0 | 3000 | data -> /data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| gitness | GITNESS_URL_BASE | preset |
| gitness | GITNESS_USER_SIGNUP_ENABLED | preset |

## Deploy

### CLI

```bash
levelrail-cli templates install gitness --name my-gitness
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain gitness=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/gitness/install \
  -d '{
    "name": "my-gitness"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## Questions

### Can I deploy Gitness on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Gitness, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image harness/harness:3.3.0 is what you deploy there.

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