Forgejo/Gitea on a VPS (2026): Private Git Hosting

Self-hosted Git is fast and simple with Forgejo or Gitea.
Table of Contents
- Why self-host Git
- VPS specs
- Install overview
- CI basics
- Backups
1. Why self-host Git
Control access, privacy, and performance.
2. VPS specs
Minimal CPU and SSD storage are enough.
3. Install overview
Use Docker; secure reverse proxy.
4. CI basics
Run lightweight CI or webhooks for builds.
5. Backups
Backup repos and user data weekly.
See /vps-hosting for plans.
Quick 2026 Answer
Forgejo/Gitea on a VPS (2026): Private Git Hosting is safest when you keep the VPS setup small, documented and easy to restore. A beginner should know how to update, reboot, restore a backup and read logs before adding more services. That routine matters more than installing every tool at once.
VPS Operator Checklist
- Create a non root user for daily work.
- Turn on SSH key login where possible.
- Enable basic firewall rules before exposing apps.
- Make a snapshot before risky upgrades.
- Keep app data and config paths written down.
- Test restore steps before you need them.
What Beginners Usually Miss
The hidden risk is not the first install. It is the second month, when packages need updates and nobody remembers where the config lives. Write down ports, service names, data folders and backup commands in one note.
Also watch disk space. Logs, Docker images, media files and old backups can fill a VPS quietly. A full disk can break databases and make a healthy service look broken.
Where to Go Next
For plans and safer operation, use VPS hosting, VPS SSH security hardening, VPS snapshot rollback guide. Good supporting screenshots are a firewall rule list, a snapshot screen and a simple folder map showing where the app stores data.
Real Test Routine
The safest way to handle Forgejo/Gitea on a VPS (2026): Private Git Hosting is to test the change, document it and make sure you can reverse it. A VPS can run many different services, but every service adds ports, logs, updates and backups. Keep the setup clear enough that you can fix it when tired.
Before making a change, check disk space, memory, active services and open ports. After the change, restart only the service you touched if possible. Then check logs, confirm the port is reachable and make sure the data folder still has the expected files. If the change involves packages or the kernel, make a snapshot first.
For beginners, the best VPS habit is writing down the service name, config path, data path, backup command and restore command. This turns a panic moment into a checklist. It also helps if someone else needs to help later.
When to Split Services
A single VPS is fine for learning and small projects. Split services when one app can fill disk space, use all memory or need a different update schedule. Databases, media libraries, game servers and public web apps often deserve separate backups even if they live on the same machine.
Screenshot or Generated Image Target
A useful supporting image for this page should show the actual setting, console, panel or workflow being discussed. Avoid a generic stock image if possible. A simple generated diagram is fine when it explains the flow better than a screenshot.
- Capture the main settings screen or config file.
- Add one close crop of the important value.
- Add one result screenshot after the fix or setup is working.
- Keep private IPs, tokens, emails and customer names hidden.
Simple Monthly VPS Check
A VPS should get one monthly check even if the app looks healthy. Review updates, disk space, backup age, open ports and service status. Most serious VPS problems start quietly, then become urgent only after disk fills or an old package is exploited.
Keep a small recovery note for every service. It should include the service name, data folder, config folder, restart command and backup location. This matters more than memorizing commands because you will need the note when something is already broken.
If the VPS hosts customer data, game worlds or private repositories, test restoring a backup to a temporary folder at least once. A backup that was never tested is only a hope.
Final Owner Note
Keep this page useful by adding one real screenshot from your own setup after the next update. A real panel, console or config screenshot gives Google and readers a stronger reason to trust the guide than another generic image.
