NewOut Plane raises funding, backed by Maza VenturesRead the announcement
DevTools

Gitea

Overview

Deploy Gitea on Out Plane — a lightweight, self-hosted Git service written in Go. Gitea is a community-maintained GitHub alternative that provides repository hosting, pull requests, code review, issue tracking, project boards, and CI/CD through Gitea Actions — all in a single, resource-efficient binary.

Gitea includes a container registry, package registry (npm, PyPI, Maven, NuGet, and more), wiki, and built-in Git LFS support. Authentication supports LDAP, OAuth2, SAML, and two-factor authentication. Self-hosting on Out Plane means your source code, CI/CD pipelines, and artifacts remain on your own infrastructure.

Ideal for teams and organizations that need a self-hosted GitHub alternative for source code management, code review, CI/CD automation, and artifact storage with minimal resource requirements.


Gitea Docker Setup: Self-Host Gitea with PostgreSQL

Updated

Gitea is a lightweight, open source Git service written in Go, with pull requests, issues, packages and Actions. To self-host Gitea on Out Plane, deploy the official Gitea Docker image gitea/gitea:28.3.0 on port 3000, mount a volume at /data for your repositories, and connect a managed PostgreSQL database through GITEA__database__* environment variables.

This guide follows the official Docker install docs and maps each setting to the Out Plane console. It also covers the install page, SSH cloning, upgrades and backups. For other apps, see all templates.

What You Need

  • An Out Plane plan. Starter and Pro both start with a 14 day free trial.
  • An instance. op-34 (1 vCPU, 2 GB) is the size we list for Gitea.
  • A volume of 10 to 50 GB at /data. Gitea keeps repositories in /data/git/repositories, Git LFS objects in /data/git/lfs, and its config, attachments, avatars and packages under /data/gitea. A volume's size is fixed when you create it, so leave room for LFS files and container images. We use 20 GB below.
  • A managed PostgreSQL database for users, issues and pull requests. Gitea supports PostgreSQL 12 and newer, and Out Plane offers versions 14 to 18. SQLite also works, see the FAQ.

Because the app has a volume, it runs as a single instance.

Deploy Gitea on Out Plane

  1. Create the database. Open Create → Database, name it gitea-db, keep the default region, Frankfurt, which is closest to apps in Germany, and keep version 17.
  2. Add a role and database. On the database's Access tab, create a role named gitea, then a database named gitea owned by that role.
  3. Copy the connection values. In the Connection panel, pick the gitea role and database and copy the .env format. You need PGHOST and PGPASSWORD.
  4. Create the app. Create an application, choose the Image source, enter gitea/gitea:28.3.0 and name it gitea.
  5. Set the port. Add port 3000, protocol HTTP, with Public on.
  6. Add the volume. Under Volumes, select Create volume, size 20 GB, mount path /data.
  7. Paste the environment variables. Replace the placeholders and acme with your team's slug:
bash
GITEA__database__DB_TYPE=postgres
GITEA__database__HOST=<PGHOST>:5432
GITEA__database__NAME=gitea
GITEA__database__USER=gitea
GITEA__database__PASSWD=<PGPASSWORD>
GITEA__database__SSL_MODE=require
GITEA__server__ROOT_URL=https://gitea-3000-acme.outplane.app/
GITEA__server__DISABLE_SSH=true
  1. Deploy. Pick op-34 under Compute and select Deploy app. The console shows the final URL after the first deployment. If it differs from ROOT_URL, update the variable and deploy again.
  2. Finish the install page at once. Open the URL. Gitea shows its install page with the database settings from your variables. Under Administrator Account Settings, create your admin user and submit. Until you do, anyone who opens the URL can complete the setup.

The same setup with the outplane CLI:

bash
outplane volume create gitea-data --size 20 --json --fields id
outplane app create gitea --image gitea/gitea:28.3.0 \
  --port 3000:http:public --size op-34 --volume <VOLUME_ID>:/data \
  --env GITEA__database__DB_TYPE=postgres \
  --env GITEA__database__HOST=<PGHOST>:5432 \
  --env GITEA__database__NAME=gitea \
  --env GITEA__database__USER=gitea \
  --env GITEA__database__PASSWD=<PGPASSWORD> \
  --env GITEA__database__SSL_MODE=require \
  --env GITEA__server__ROOT_URL=https://gitea-3000-acme.outplane.app/ \
  --env GITEA__server__DISABLE_SSH=true
outplane app get gitea

From Gitea Docker Compose to Out Plane

The official docker-compose.yml maps to the console like this:

Compose settingOn Out Plane
image: docker.gitea.com/gitea:28.3.0Image source. Docker Hub carries the same tags as gitea/gitea.
ports: "3000:3000"Port 3000, HTTP, Public
ports: "222:22"Optional TCP port 22, see SSH below
volumes: ./gitea:/dataVolume mounted at /data
GITEA__... environment linesApp environment variables
USER_UID=1000, USER_GID=1000Not needed. The container sets ownership of /data/gitea and /data/git at start.
db service with postgres:18Managed PostgreSQL, no database container to run

Stay on the default rootful image. The Gitea docs say the rootful and rootless images are not compatible, so do not switch to a -rootless tag on the same volume later.

Gitea Docker Environment Variables

Any app.ini setting can be set as GITEA__section__KEY. The container writes these into /data/gitea/conf/app.ini on every start, so the console stays the source of truth. The file also holds the SECRET_KEY Gitea generated at install. Losing it means Gitea can no longer decrypt data such as 2FA secrets, so keep the volume.

Settings worth adding:

  • GITEA__service__DISABLE_REGISTRATION=true once your admin exists. The Docker image writes DISABLE_REGISTRATION = false into its first config, so anyone can sign up on a public URL until you change it.
  • GITEA__server__ROOT_URL with a trailing slash. Links in emails and webhooks use it.
  • Mail, for password resets and notifications: GITEA__mailer__ENABLED=true, GITEA__mailer__PROTOCOL=smtps, GITEA__mailer__SMTP_ADDR, GITEA__mailer__SMTP_PORT, GITEA__mailer__FROM, GITEA__mailer__USER and GITEA__mailer__PASSWD.

Set them in Settings → Environment and select Save & deploy. The full list is in the config cheat sheet.

Clone Over SSH

HTTPS cloning works through the public URL with no extra setup. For SSH, add port 22 as a TCP port with Public on. After the next deployment it shows an assigned host and port. Set GITEA__server__SSH_DOMAIN and GITEA__server__SSH_PORT to those values and change GITEA__server__DISABLE_SSH to false, so Gitea prints clone URLs that work. Deleting the variable is not enough, because the old value stays in app.ini. OpenSSH inside the container keeps listening on 22.

Custom Domain and HTTPS

  1. Open Domains → Add domain, enter git.example.com without a scheme, and pick the gitea app and port 3000.
  2. Open the DNS dialog. A subdomain needs a CNAME and an apex domain needs an A record named @, both with the value shown. DNS takes 5 to 30 minutes, then HTTPS is issued automatically.
  3. Set GITEA__server__ROOT_URL=https://git.example.com/ and select Save & deploy.

From the CLI, run outplane domain add git.example.com --app gitea --port 3000, then outplane domain dns git.example.com. TCP ports cannot take a custom domain, so SSH keeps its assigned host.

Update and Back Up Gitea

Updates. Image apps never deploy on their own. Read the release notes, then open the app's Deployments tab, select Deploy and enter the full new reference, such as gitea/gitea:<new-version>. From the CLI:

bash
outplane deploy create gitea --image gitea/gitea:<new-version> --wait

Gitea migrates its database on the first start of a new minor or major version, and an older version cannot run on the migrated database. Per the upgrade docs, going back means restoring a backup, so take one first. Expect a short interruption while the single instance is replaced.

Backups. Managed PostgreSQL includes automated backups, which cover users, issues and pull requests. Out Plane does not snapshot volumes, so repositories, LFS objects and attachments are yours to copy. Open the app's Shell tab and run gitea dump as the git user:

bash
cd /tmp && su-exec git gitea dump -c /data/gitea/conf/app.ini

It writes a gitea-dump-<timestamp>.zip with repositories, config, data files and a SQL dump. Gitea's docs say a dump is only fully consistent while Gitea is stopped, so run it when nobody is pushing. /tmp is lost when the instance restarts, so copy the file off right away, for example to an Out Plane bucket with a presigned upload URL you sign on your machine:

bash
curl --upload-file /tmp/gitea-dump-<timestamp>.zip "<presigned-put-url>"

For your most important repositories, Gitea's push mirrors keep a second copy on another Git remote.

What Gitea Costs on Out Plane

Compute is billed per instance-minute. op-34 costs $0.0004167 per minute, which is $18.00 for a 30 day month. Add $6.00 for the 20 GB volume ($0.30 per GB) and $6.00 for the managed database, and usage comes to $30.00 a month.

  • Starter, $9 a month with $9 of usage included: about $30 a month.
  • Pro, $29 a month with $15 included: about $44 a month.

Starter and Pro both start with a 14 day free trial. Bandwidth, HTTPS certificates and custom domains are not billed. Rates are on the pricing page.

FAQ

Is Gitea free to self-host?

Yes. Gitea is open source under the MIT license, with no limit on users or repositories. You pay only for where it runs, about $30 a month in the setup above.

Can Gitea run without PostgreSQL?

Yes. Without the GITEA__database__* variables, the Docker image uses SQLite at /data/gitea/gitea.db on the volume. That drops the $6 database, so usage is about $24 a month. The database then lives on the volume, so your own dumps are its only backup.

How do I install Gitea with Docker Compose?

The official guide uses a compose file with a server service and an optional db service. On Out Plane there is no compose file. Each line becomes a console setting, as in the table above, and the db service becomes managed PostgreSQL.

Can I switch to the rootless Gitea image later?

No. The Gitea docs say the rootful and rootless images are not compatible. Pick one when you first deploy and keep it.



Start deploying in minutes

Connect your GitHub repository and deploy your first application today. Start with a 14-day free trial.

Start 14-day free trial