---
title: Deploy Gitea with AI on Blossom
url: "/deploy/gitea/"
canonical_url: https://blossom88.com/deploy/gitea/
markdown_url: https://blossom88.com/deploy/gitea.md
summary: Deploy Gitea with AI on Blossom. Host private Git repositories with managed
  PostgreSQL and persistent storage for repositories and configuration.
stack:
- Go
- Vue.js
- PostgreSQL
---

# Deploy Gitea with AI on Blossom

[Gitea](https://about.gitea.com/) hosts Git repositories, code reviews and
issues in a browser-based workspace. Use familiar Git commands to push and
clone your projects.

## Ask Your Agent

> **Ask your AI agent:** Deploy Gitea on Blossom so I can host private Git repositories.
>
> Follow this guide: https://blossom88.com/deploy/gitea/

[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).

## Your Git Workspace

| Part | Purpose |
|---|---|
| Gitea | Repository browser, accounts and issue tracking |
| Managed PostgreSQL | Users, repository metadata and issues |
| Persistent Volume | Git repositories, configuration and app files |

The app uses one [Persistent Service](https://docs.blossom88.com/docs/apps/persistent-services/).
Choose storage for your repositories and their growth.

![Gitea shows a private sample repository with its committed README.](/deploy/assets/images/gitea/private-repository.webp)

<details class="optional-reading" markdown="1">
<summary>Deployment setup and commands</summary>

Check the current [container instructions](https://docs.gitea.com/installation/install-with-docker/)
and [database requirements](https://docs.gitea.com/installation/database-prep/).
Choose a maintained image and compatible PostgreSQL, and pin the image's
multi-architecture index digest.

    blossom profile:show
    blossom app:create --data '{"app":{"name":"gitea"}}'
    blossom environment:create --data environment.yml
    blossom database_instance:create --data postgres.yml
    blossom activity:wait --id activity-100 --timeout 20m
    blossom environment_link:create --data postgres-link.yml

Map the linked database URL to Gitea's `database` settings at startup, decoding
the username, password and database name. Keep its credentials and application
secrets stable. Set the public root URL and domain from the Service's generated
HTTPS address.

Mount the image's persistent data directory at `/data`. Keep one writer and
give startup and database upgrades enough time before readiness checks.
Only the web Service is public; the database stays private.

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

Finish installation and create the owner while the workspace is behind Blossom
Account access. Close public registration and require native Gitea sign-in.
Make repository privacy explicit.

For direct HTTPS Git, make the endpoint reachable through the outer gate and
let Gitea authenticate repository requests. Check anonymous clone and repository
access before adding real code. SSH, Actions runners, LFS and email each need
their own configuration and checks.

</details>

## Push Your First Repository

Create a private repository and push a small sample project. Clone it into a
new directory and compare the commit and files. Add an issue to try the team
workflow.

<details class="optional-reading" markdown="1">
<summary>Updates, persistence and backups</summary>

Preserve the Volume, database and secrets across updates. Replacing a
Persistent Service interrupts its single writer during the handoff.

    blossom environment:deploy --id environment-100 --follow
    blossom container:list --environment environment-100

Our original commit, file checksums and issue survived Container replacement.
A fresh password login worked, and a new commit pushed and cloned successfully.
Anonymous repository and Git requests stayed protected.

Follow Gitea's [backup and restore guidance](https://docs.gitea.com/administration/backup-and-restore/).
Back up repository files and configuration with the database, then test
restoration. A Container replacement check does not test backup recovery.

</details>

## What You Get

- Your own Git hosting workspace
- Private repositories and issue tracking
- Managed PostgreSQL and persistent repository storage
