---
title: "Forgejo"
description: "Forgejo is a lightweight, self-hosted Git forge and a community fork of Gitea."
url: https://exe-staging.dev/deploy/forgejo
category: "Developer tools"
updated: 2026-10-17
---

# Forgejo

Self-hosted Git forge with exe.dev SSO

- **Software:** Forgejo (https://forgejo.org)
- **Source:** https://codeberg.org/forgejo/forgejo
- **License:** GPL-3.0-or-later
- **Example VM name:** `my-forgejo` (yours will differ; on the VM, `hostname` prints it)
- **Machine-readable:** https://exe-staging.dev/deploy/forgejo/manifest.json

## What you get

- Forgejo behind exe.dev's [HTTPS proxy](/docs/proxy), on port 8000
- nginx translating `X-ExeDev-UserID` and `X-ExeDev-Email` into `X-WEBAUTH-USER` and `X-WEBAUTH-EMAIL`
- Auto-registration, so any exe.dev user you share the VM with gets a Forgejo account the first time they visit

Running on the VM:

- **Forgejo**: The Forgejo binary, managed by systemd, port 3000, data in `/var/lib/forgejo`
- **nginx**: Translates the exe.dev headers into the names Forgejo expects, port 8000

How it is reached:

- https://my-forgejo.exe.xyz/ (private): Forgejo, for you and anyone you [share](/docs/sharing) the VM with

## Deploy with Shelley

Open https://exe-staging.dev/new?idea=forgejo to create a VM whose agent, Shelley, follows this recipe. From a terminal:

```sh
curl -fsSL https://exe-staging.dev/deploy/forgejo/prompt.txt | ssh exe.dev new --prompt=/dev/stdin
```

Or follow the steps below by hand.

Run [Forgejo](https://forgejo.org/) on an exe.dev VM.

Forgejo is a lightweight, self-hosted Git forge and a community fork of Gitea. It works well as a private Git server, a team forge, or a mirror for GitHub repositories.

## Quick start

Create a new Forgejo VM from the [Forgejo starter](https://exe.dev/new?idea=forgejo).

## How it works

exe.dev's [HTTPS proxy](/docs/proxy) handles TLS and forwards requests to port 8000 on your VM.

For authenticated users, exe.dev adds the `X-ExeDev-UserID` and `X-ExeDev-Email` headers. See [Login with exe.dev](/docs/login-with-exe) for details.

Forgejo can use reverse proxy authentication with `X-WEBAUTH-USER` and `X-WEBAUTH-EMAIL`. nginx translates the exe.dev headers into the names Forgejo expects.

With auto-registration enabled, any exe.dev user you [share](/docs/sharing) the VM with gets a Forgejo account the first time they visit.

## Mirroring from GitHub

Forgejo can mirror repositories from GitHub.

In the Forgejo UI, choose **New Migration**, then **GitHub**. Enter the repository URL and a [personal access token](https://github.com/settings/tokens) with read access. Forgejo will clone the repo and keep it in sync.

For private repos, use a fine-grained GitHub PAT with read-only **Contents** permission for the repos you want to mirror.

## Forgejo vs Gitea

Forgejo and [Gitea](/deploy/gitea) are very similar on exe.dev.

Forgejo is a community fork of Gitea. Both use the same config format, the same reverse proxy auth flow, and the same basic setup. Pick the project you prefer.

## Related

- [Gitea](https://exe-staging.dev/deploy/gitea.md): Self-hosted Git forge with exe.dev SSO
- [VS Code in your browser, with code-server](https://exe-staging.dev/deploy/code-server.md): Your editor in a tab. Your projects right where you left them.
- [Dev, Test, Prod: Choose One, Two, or Three](https://exe-staging.dev/deploy/dev-test-prod.md): You can build, test, and deploy on exe.dev.
- [Running a self-hosted GitHub Actions Runner](https://exe-staging.dev/deploy/github-actions-runner.md): Log in easily into your CI environment
- [Spinning up a Marimo Notebook](https://exe-staging.dev/deploy/marimo.md): An open source reactive notebook
- [Self-host n8n](https://exe-staging.dev/deploy/n8n.md): Connect your apps. Let the boring bits run themselves.
