[{"data":1,"prerenderedAt":143},["ShallowReactive",2],{"seo-verification":3,"blog-host-gitea-on-your-own-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"slugs":9,"title":12,"excerpt":13,"readTime":14,"views":15,"isPinned":16,"publishedAt":17,"category":18,"categories":24,"featuredImage":26,"bgImage":27,"posterImage":28,"relatedSolution":29,"intro":32,"sections":33,"ctaTitle":87,"ctaBody":88,"ctaButton":89,"ctaUrl":90,"relatedPosts":91},74,"host-gitea-on-your-own-vps",{"fr":10,"en":8,"ar":11},"heberger-gitea","استضافة-gitea-على-خادم-vps-الخاص-بك","Host Gitea on your own VPS","Deploy Gitea on a VPS with Docker, reverse proxy and SSL. A lightweight, fast Git forge, 100% under your control.",4,0,false,"2026-04-07T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},7,"Self-hosting","self-hosting","bg-indigo-500\u002F10 text-indigo-400","cloud",[25],{"id":19,"name":20,"slug":21,"color":22,"icon":23},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fheberger-gitea-poster.svg",{"categorySlug":30,"appSlug":31},"development","gitea","Gitea is a self-hosted Git forge written in Go, renowned for being lightweight and fast. Deploying it on your own VPS gives you a private GitHub with no per-user subscription and no limit on private repositories. Here is how to install it cleanly with Docker, a reverse proxy and an SSL certificate.",[34,38,48,51,76,79,82,84],{"type":35,"title":36,"body":37},"h2","Why self-host Gitea on a VPS","Gitea uses barely 200 to 300 MB of RAM at idle, making it one of the most efficient Git forges to self-host. On a VPS, you keep full control of your source code: no data is analyzed by a third party, no arbitrary limit on the number of private repositories or collaborators, and no cost that climbs with your team. For an agency or an independent developer in Morocco, a single VPS can host all client projects with permissions partitioned by organization. Gitea natively includes CI\u002FCD compatible with GitHub Actions workflows (Gitea Actions), a package registry and a web editor, which covers almost the entire development cycle with no external dependency.",{"type":39,"title":40,"items":41},"ul","Concrete benefits of a self-hosted Gitea",[42,43,44,45,46,47],"Minimal memory footprint: runs comfortably on a 2 GB RAM VPS even with several dozen users.","Private repositories without per-seat billing or imposed limits, unlike SaaS offerings.","Gitea Actions built in to run your CI\u002FCD pipelines without an external service.","Package registry (Docker, npm, Composer, Maven) hosted on the same instance.","Fine-grained authentication: LDAP, OAuth2, personal access tokens and per-user SSH keys.","Trivial backup: everything fits in one data volume and a database.",{"type":35,"title":49,"body":50},"Hardware and software prerequisites","Gitea is very frugal. For a small team (up to 20 users), a VPS with 2 vCPU and 2 GB of RAM is more than enough; count on 4 GB if you enable Gitea Actions with local runners that compile code. Plan for at least 20 to 40 GB of SSD storage depending on the size of your repositories. On the software side: Docker Engine and the Docker Compose plugin installed, a domain name (or a subdomain such as `git.yourdomain.com`) pointing to the VPS IP via an A record, and port 22 reserved for the server's SSH — Gitea will expose its own SSH on another port to avoid the conflict.",{"type":52,"title":53,"steps":54},"steps","Deploy Gitea with Docker and SSL",[55,58,61,64,67,70,73],{"title":56,"body":57},"Prepare the VPS and Docker","Connect via SSH, update the system then install Docker and the Compose plugin. Create a dedicated directory: `mkdir -p \u002Fopt\u002Fgitea && cd \u002Fopt\u002Fgitea`. Also create a data volume that will survive container updates.",{"title":59,"body":60},"Write the docker-compose.yml","Define two services: `gitea` (image `gitea\u002Fgitea:latest`) and a `postgres:16` database. Mount `.\u002Fgitea:\u002Fdata` for persistence, set `USER_UID`\u002F`USER_GID` to 1000, and map Gitea's SSH to host port 2222: `\"2222:22\"`. Leave the HTTP port 3000 internal; it will be served by the reverse proxy.",{"title":62,"body":63},"Launch the containers","Run `docker compose up -d` then `docker compose logs -f gitea` to follow the initialization. Check that the connection to PostgreSQL succeeds before continuing.",{"title":65,"body":66},"Configure the reverse proxy","With Caddy, a single line is enough: `git.yourdomain.com { reverse_proxy localhost:3000 }`. Caddy automatically obtains and renews the Let's Encrypt certificate. With Nginx, create a `server` that proxies to `http:\u002F\u002F127.0.0.1:3000` and use `certbot --nginx` for SSL.",{"title":68,"body":69},"Finalize the web installation","Open `https:\u002F\u002Fgit.yourdomain.com`, complete the wizard by filling in the HTTPS base URL and the database host (`db:5432`). Set `ROOT_URL` correctly, otherwise the clone links will be wrong.",{"title":71,"body":72},"Secure repository SSH","Configure your clients to clone via `ssh:\u002F\u002Fgit@git.yourdomain.com:2222\u002F...`, or add a `Host` block in `~\u002F.ssh\u002Fconfig` to hide the port. Disable public sign-up in the admin if the instance is private.",{"title":74,"body":75},"Logging in for the first time","Open the URL: Gitea shows its installation page, with the database section already pre-filled — leave it alone. Expand \"Optional Settings > Administrator Account Settings\", create your admin account there, then submit.",{"type":77,"body":78},"tip","Enable Gitea Actions right from installation by adding `[actions] ENABLED = true` to `app.ini`, then register an `act_runner` runner in a separate container on the same VPS. Cap its RAM via `mem_limit` so that a heavy build does not choke Gitea itself. For heavy pipelines (compilation, integration tests), dedicate a second VPS to the runner instead and connect it with the registration token — you keep the forge responsive even during builds.",{"type":35,"title":80,"body":81},"Upgrading to Gitea 1.27 without losing SSH access","Version 1.27 changes the internal path of the `gitea` binary referenced inside `authorized_keys`. During the upgrade, existing entries still point to the old path: any clone or push over SSH silently fails with `Permission denied (publickey)`, without any server-side error message pointing to the upgrade. The Gitea service responds normally over HTTPS, which masks the problem. The cause is not the user's key but the command wrapper that Gitea injects into `authorized_keys`. After every upgrade to 1.27 (or to any version that changes this path), run inside the container: `docker exec -u git gitea gitea admin regenerate keys`. The command rewrites all `authorized_keys` entries with the correct binary path. Verify that a `git clone` over SSH succeeds before declaring the upgrade complete.",{"type":77,"body":83},"`JWT_SECRET_URI` and `JWT_SECRET` must not coexist in `app.ini`. If both keys are present, Gitea loads one or the other depending on read order, silently invalidating all OAuth2 and Gitea Actions tokens issued before the upgrade. Users see intermittent authentication errors with no message pointing to `app.ini` as the cause. Choose one mechanism: `JWT_SECRET` (plaintext value) or `JWT_SECRET_URI` (path to a secret file), then remove the other. Restart the container after the change.",{"type":77,"title":85,"body":86},"The official documentation","For advanced configuration and options specific to the tool, refer to the \u003Ca href=\"https:\u002F\u002Fdocs.gitea.com\" target=\"_blank\" rel=\"noopener noreferrer\">official Gitea documentation\u003C\u002Fa>. This guide covers going live on a VPS; the vendor's docs remain the reference for fine-tuning, major upgrades and specific use cases.","Deploy Gitea in minutes on a ServOrbit Cloud VPS","Our Cloud VPS, delivered with Docker preconfigured, lets you set up your Gitea forge with automatic SSL, without system tinkering. Dedicated resources, snapshots and a fixed IP included.","Launch my Cloud VPS","\u002Fvps-cloud",[92,107,123],{"id":93,"slug":94,"slugs":95,"title":98,"excerpt":99,"readTime":100,"views":101,"isPinned":16,"publishedAt":102,"category":103,"categories":104,"featuredImage":26,"bgImage":27,"posterImage":106,"relatedSolution":26},75,"host-forgejo-on-your-own-vps",{"fr":96,"en":94,"ar":97},"heberger-forgejo","استضافة-forgejo-على-خادم-vps-الخاص-بك","Self-Host Forgejo on Your VPS: Complete 2025 Guide","Deploy Forgejo on your VPS with Docker, SSL, Actions runners and hardened security. Step-by-step guide for a sovereign Git forge.",10,1,"2026-04-06T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[105],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fheberger-forgejo-poster.svg",{"id":108,"slug":109,"slugs":110,"title":113,"excerpt":114,"readTime":115,"views":15,"isPinned":16,"publishedAt":116,"category":117,"categories":118,"featuredImage":26,"bgImage":27,"posterImage":120,"relatedSolution":121},71,"hosting-nextcloud-on-your-own-vps",{"fr":111,"en":109,"ar":112},"heberger-nextcloud","استضافة-nextcloud-على-خادمك-الـvps-الخاص","Self-Host Nextcloud on VPS: Complete Guide, NC 34 and Security","Deploy Nextcloud 34.0.2 on your VPS with Docker and Redis. Complete guide: missing NC 34.0.0 apps, PostgreSQL oc_filecache_extended constraint, and 2FA CVEs.",12,"2026-04-10T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[119],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fheberger-nextcloud-poster.svg",{"categorySlug":21,"appSlug":122},"nextcloud",{"id":124,"slug":125,"slugs":126,"title":129,"excerpt":130,"readTime":131,"views":15,"isPinned":16,"publishedAt":132,"category":133,"categories":138,"featuredImage":26,"bgImage":27,"posterImage":140,"relatedSolution":141},43,"deploy-a-nodejs-application-on-a-vps",{"fr":127,"en":125,"ar":128},"deployer-nodejs-vps","نشر-تطبيق-nodejs-على-vps","Deploy a Node.js Application on a VPS","Deploy a Node.js application to production on a VPS: PM2, Nginx reverse proxy, Let's Encrypt SSL, and automatic startup at boot.",3,"2026-05-08T00:00:00+00:00",{"id":14,"name":134,"slug":135,"color":136,"icon":137},"Development","developpement","bg-warning\u002F10 text-warning","dev",[139],{"id":14,"name":134,"slug":135,"color":136,"icon":137},"\u002Fblog\u002Fcovers\u002Fdeployer-nodejs-vps-poster.svg",{"categorySlug":30,"appSlug":142},"nodejs-stack",1787580998729]