---
title: Deploy Forgejo with AI on Blossom
url: "/deploy/forgejo/"
canonical_url: https://blossom88.com/deploy/forgejo/
markdown_url: https://blossom88.com/deploy/forgejo.md
summary: Host private Git repositories and review pull requests in Forgejo with managed
  PostgreSQL.
categories:
- deployment
- git
- developer-tools
stack:
- Go
- Git
- PostgreSQL
---

# Deploy Forgejo with AI on Blossom

[Forgejo](https://forgejo.org/) is a Git hosting platform for repositories,
issues, and pull requests. Your team can push code over HTTPS and review
changes in the browser.

![An approved pull request in the private Cedar Catalog repository.](/deploy/assets/images/forgejo/private-review.webp)

## Ask Your Agent

> **Ask your AI agent:** Deploy Forgejo on Blossom and help me push a private repo and review a pull request.
>
> Follow this guide: https://blossom88.com/deploy/forgejo/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and choose a Blossom Cloud Location when you log in. You can also use [Blossom BYOC (bring your own cloud)](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#blossom-byoc).

## Review a Change in a Private Repository

Create a private repository and invite a collaborator. Push a feature
branch over HTTPS, open a pull request, and review it with a separate
account.

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

Run the [official Forgejo image](https://forgejo.org/docs/latest/admin/installation/docker/)
on one Persistent Service with a Volume at `/data`. Link Blossom Managed
PostgreSQL and map its connection to the image’s `FORGEJO__database__*`
settings. Set Forgejo’s root URL to the generated HTTPS address. Use port
3000 and `/api/healthz` for readiness.

Keep the workspace behind Blossom Account access. Create the initial
accounts while it is gated, then close open registration. For Git over
HTTPS, send a [Blossom access token](https://docs.blossom88.com/docs/apps/environment-access/#environment-access-tokens)
in Git's `http.extraHeader` for this host and authenticate to Forgejo
with your Git credentials.

    blossom profile:show
    blossom app:create --data app.yml
    blossom environment:create --data environment.yml
    blossom database_instance:create --data postgres.yml
    blossom environment_link:create --data postgres-link.yml
    blossom service:create --data web.yml
    blossom env_var:push --environment environment-100 --file .env.runtime
    blossom environment:deploy --id environment-100 --follow

</details>

## What You Get

- A private Git workspace for pushing branches and reviewing code
- Repository files on a Persistent Volume and review history in managed PostgreSQL
