
Self-hosting Forgejo the easy way
Yulei ChenForgejo is a lightweight, open-source software forge. Think of it as your own self-hosted GitHub: Git hosting, pull requests, issue tracking, CI/CD with Forgejo Actions, and more. It's a community-driven fork of Gitea, focused on staying truly free and open.
Sliplane is a managed container platform that makes self-hosting painless. With one-click deployment, you can get Forgejo 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.
- Click the deploy button above
- Select a project
- Select a server. If you just signed up you get a 48-hour free trial server
- Click Deploy!
About the preset
The one-click deploy above uses Sliplane's Forgejo preset. Here's what it includes:
- Forgejo 8 image (
codeberg.org/forgejo/forgejo:8) - check Codeberg for newer versions - Persistent storage mounted to
/datafor repositories, database, and configuration - Healthcheck configured on the web UI port
- Ready for HTTPS out of the box via Sliplane's automatic TLS
Next steps
Once Forgejo is running, open the domain Sliplane provided (e.g. forgejo-xxxx.sliplane.app).
Initial setup
On your first visit, Forgejo shows an installation page. Most settings are pre-configured, but you'll want to:
- Set the Site Title to whatever you like
- Create an Administrator Account at the bottom of the page
- Click Install Forgejo
After that, you're logged in and ready to create repositories.
Configuration
Forgejo stores its configuration in /data/gitea/conf/app.ini inside the container. You can customize behavior through environment variables using the FORGEJO__section__key format. For example:
| Variable | Description |
|---|---|
FORGEJO__server__ROOT_URL | The public URL of your instance |
FORGEJO__mailer__ENABLED | Enable email notifications (true/false) |
FORGEJO__service__DISABLE_REGISTRATION | Disable public sign-ups after creating your admin account |
See the Forgejo configuration cheat sheet for the full list of options.
SSH access
The preset runs Forgejo's built-in SSH server. If you need SSH-based Git access, you can configure it through the Forgejo admin panel or environment variables. For most users, HTTPS cloning works out of the box with the domain Sliplane provides.
Logging
By default, Forgejo logs to STDOUT, which works well with Sliplane's built-in log viewer. You can adjust the log level by setting the FORGEJO__log__LEVEL variable to debug, info, warn, or error. For general Docker log tips, check out our post on how to use Docker logs.
Cost comparison
Here's how self-hosting Forgejo on different platforms compares:
| Provider | vCPU Cores | RAM | Disk | Estimated Monthly Cost | Notes |
|---|---|---|---|---|---|
| Sliplane | 2 | 2 GB | 40 GB | €9 | charge per server |
| Render | 1 | 2 GB | 40 GB | ~$35-$45 | VM Small |
| Fly.io | 2 | 2 GB | 40 GB | ~$20-$25 | VM + volume |
| Railway | 2 | 2 GB | 40 GB | ~$15-$66 | Usage-based |
FAQ
Can Forgejo replace GitHub for my team?
For most small-to-medium teams, yes. Forgejo supports Git hosting, pull requests, code review, issue tracking, a package registry, and CI/CD via Forgejo Actions. You won't get GitHub's massive ecosystem of integrations, but for day-to-day development workflows, Forgejo covers the essentials.
How do I disable public registration?
Set the environment variable FORGEJO__service__DISABLE_REGISTRATION to true and redeploy. This is recommended after you've created your admin account and invited your team.
How do I update Forgejo?
Change the image tag in your service settings (e.g. from forgejo:8 to a newer version) and redeploy. Check Codeberg for the latest stable release. Forgejo handles database migrations automatically on startup.
What's the difference between Forgejo and Gitea?
Forgejo is a hard fork of Gitea, created in 2022 when the Gitea community had governance concerns. Both share the same codebase roots, but Forgejo is run by a community-driven organization and focuses on staying fully open source. Feature-wise, they're very similar.
Can I migrate repositories from GitHub or GitLab?
Yes. Forgejo has a built-in migration tool that can import repositories (including issues, pull requests, and labels) from GitHub, GitLab, Gitea, and other platforms. You can find it under New Migration in the UI.