---
title: Deploy OneDev with AI on Blossom
url: "/deploy/onedev/"
canonical_url: https://blossom88.com/deploy/onedev/
markdown_url: https://blossom88.com/deploy/onedev.md
summary: Run your own Git server and link a commit to an issue.
categories:
- deployment
- git
stack:
- Java
- Git
---

# Deploy OneDev with AI on Blossom

[OneDev](https://onedev.io/) is an open-source Git server with
issue tracking, code review, and CI. Start with a private project
and link an issue to its first commit.

## Ask Your Agent

> **Ask your AI agent:** Deploy OneDev on Blossom and help me push a sample repo and link a commit to an issue.
>
> Follow this guide: https://blossom88.com/deploy/onedev/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## Have Ready

- **Stable HTTPS address** (Required): Use the same address for browser access and Git remotes.

## How It Runs

| Part | Role | Where |
|---|---|---|
| OneDev | Host Git repositories, issues, and the web UI | One Persistent Service with a Volume |

## Deploy OneDev

Run the official image on a
[Persistent Service with a Volume](/docs/apps/persistent-services/).
Set the server URL to its stable HTTPS address and create your
administrator login.

<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom app:create --data app.yml
    blossom environment:create --data environment.yml
    blossom service:create --data web.yml
    blossom env_var:push --environment environment-100 --file onedev.env
    blossom environment:deploy --id environment-100 --follow

</details>

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

Mount the Volume at `/opt/onedev` and use port 6610 with a TCP
health check. On first boot, supply the administrator password
through a private file and set `initial_server_url` to the Service
URL. Once the administrator can sign in, remove the bootstrap
password from the Environment and deploy again to apply the change.
Set up CI executors separately if you need builds.

</details>

## Create a Private Project

Sign in as the administrator and create a project. Keep anonymous
access disabled and copy the HTTPS Git remote from the project.

![Open the first commit in the private workshop repository.](/deploy/assets/images/onedev/workshop-commit.webp)

## Push a Commit and Link an Issue

Push a README over HTTPS and clone the project to read it back.
Create an issue with a link to the commit and open the link in OneDev.

> **Ask your AI agent:** Push a workshop README to a private OneDev project and link the commit to a new issue.

> Follow this guide: https://blossom88.com/deploy/onedev/



## Keep It Running

Replace the Container on the same Volume. Sign in again, clone
the repository, and follow the link from the saved issue to the
same commit.

<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom service:scale --id service-web-100 --desired-size 0 --follow
    blossom service:scale --id service-web-100 --desired-size 1 --follow

</details>

![Reopen the same issue and commit link after replacing OneDev.](/deploy/assets/images/onedev/workshop-issue-after-replacement.webp)

## What You Get

- A private Git repository with a sample README
- An issue that links to the first commit
- The same code and issue after a Container update

Tested on Blossom: A fresh checkout contained the original commit, and its issue still linked to it after replacing OneDev.
