Self-hosting Gitea the easy way

Self-hosting Gitea the easy way

Yulei Chen - Content-Engineerin bei sliplane.ioYulei Chen
4 min

Gitea is a lightweight, self-hosted Git service. Think of it as your own private GitHub - code hosting, pull requests, issue tracking, and CI/CD - all in one package. GitHub and GitLab are great, but they can get expensive for teams or come with limitations on private repos and CI minutes.

Sliplane is a managed container platform that makes self-hosting painless. With one-click deployment, you can get Gitea up and running in minutes - no server setup, no reverse proxy config, no infrastructure to maintain.

Prerequisites

Before deploying, ensure you have a Sliplane account (free trial available).

Quick start

Sliplane provides one-click deployment with presets.

SliplaneDeploy Gitea >
  1. Click the deploy button above
  2. Select a project
  3. Select a server. If you just signed up you get a 48-hour free trial server
  4. Click Deploy!

About the preset

The one-click deploy above uses Sliplane's Gitea preset. The preset is built for a clean, stable default setup:

  • Official gitea/gitea image
  • Specific version tag (1.25.5) for stability - check Docker Hub for the latest stable version
  • Persistent storage mounted to /data for repositories, database, and configuration
  • PORT=3000 so Sliplane routes traffic to Gitea's web interface (the image also exposes SSH on port 22)
  • USER_UID and USER_GID set to 1000 for proper file permissions

Next steps

Once Gitea is running on Sliplane, access it using the domain Sliplane provided (e.g. gitea-xxxx.sliplane.app).

Initial setup

On first visit, Gitea shows you an installation wizard. Most defaults work fine. The key things to check:

  • Site Title: Set your instance name
  • Server Domain: This is already set to your Sliplane domain
  • Administrator Account: Create your admin user at the bottom of the page

After that, click Install Gitea and you're good to go.

Key environment variables

You can customize Gitea's behavior through environment variables. Gitea uses the GITEA__ prefix with section and key names. For example, to change the app name:

VariableDescriptionExample
GITEA__DEFAULT__APP_NAMEInstance name shown in the UIMy Git Server
GITEA__server__ROOT_URLFull public URL of your instancehttps://$SLIPLANE_DOMAIN
GITEA__service__DISABLE_REGISTRATIONDisable new user signupstrue
GITEA__mailer__ENABLEDEnable email notificationstrue

The full list of configuration options is in the Gitea Configuration Cheat Sheet.

Logging

By default, Gitea logs to STDOUT, which works perfectly with Sliplane's built-in log viewer. You can adjust the log level through environment variables:

VariableDescriptionExample
GITEA__log__LEVELLog verbosityinfo, debug, warn

For general Docker log tips, check out our post on how to use Docker logs.

Troubleshooting

If you run into issues, bump the log level to debug by setting GITEA__log__LEVEL=debug and redeploy. This gives you detailed output about what Gitea is doing. Common issues include:

  • 502 errors right after deploy: Gitea might still be initializing. Give it a minute
  • Permission errors: Make sure USER_UID and USER_GID match the volume ownership (the preset sets both to 1000)

Cost comparison

Of course you can also self-host Gitea with other cloud providers. Here is a pricing comparison for the most common ones:

ProvidervCPU CoresRAMDiskEstimated Monthly CostNotes
Sliplane22 GB40 GB€9charge per server
Render12 GB40 GB~$35-$45VM Small
Fly.io22 GB40 GB~$20-$25VM + volume
Railway22 GB40 GB~$15-$66Usage-based

FAQ

What can I use Gitea for?

Gitea gives you code hosting with Git repositories, pull requests, issue tracking, a package registry, and even built-in CI/CD with Gitea Actions (compatible with GitHub Actions). It's a full development platform you own and control.

How do I disable public registration?

Set the environment variable GITEA__service__DISABLE_REGISTRATION=true and redeploy. This restricts account creation to admins only, which is recommended if you're running a private instance.

How do I update Gitea?

Change the image tag in your service settings to the newer version and redeploy. Check Docker Hub for the latest stable version. Gitea handles database migrations automatically on startup.

Are there alternatives to Gitea?

Yes. Popular self-hosted options include Forgejo (a Gitea fork focused on community governance), GitLab CE (feature-rich but heavier), and Gogs (minimal and fast). For managed services, there's GitHub, GitLab.com, and Bitbucket.

Can I use Gitea Actions for CI/CD?

Yes. Gitea Actions is compatible with GitHub Actions workflows. You'll need to set up an act runner - you can deploy one as a separate service on Sliplane and connect it to your Gitea instance through Sliplane's internal networking.

Self-host Gitea now - It's easy!

Sliplane gives you everything you need to run your own Git service without server hassle.