SSD Nodes Learn Hosting plans →
How to do am Matt ConnorBy Matt Connor · Updated 2026-11-07

Which self-hosted Git server fit run for 1 GB VPS?

See the honest RAM ranking for bare repos over SSH, cgit, Forgejo, Gitea and GitLab, plus which self-hosted Git server fit run on a 1 GB VPS.

Which self-hosted Git server you suppose run

Self-hosted Git server no be just one product, and the RAM (random access memory) wey your VPS get na im go decide which version you fit run. Git no need im own daemon: one bare repository plus SSH (secure shell) account don be working server already for the smallest box wey you fit rent. Everything wey come top that one na web application wey you dey choose to run join am, and every step wey you go up dey cost memory wey small VPS fit no get. If you still no sure where Git stop and GitHub start, how Git, GitHub and your own Git server dey different don explain that difference before you pick your tier.

Four steps dey. One bare repository over SSH, wey no get anything wey dey listen wey no bin dey listen before. cgit, one fast read-only web view wey no get database. Forgejo or Gitea, one full forge wey get accounts, issues and pull requests inside few hundred megabytes. GitLab, wey dey expect server wey big pass the others many times.

Decide based on the work wey you want do, then check the memory figure against the plan wey you dey pay for.

How much RAM each option really needs

Only two of these projects publish a hardware figure. Treat a published figure as a floor rather than a promise, and measure your own instance once it runs, with systemd-cgtop or ps -o rss= -C forgejo.

ChartRAM the projects document, official docs, October 2026
Di data wey dey behind dis chart
[
  {
    "label": "Gitea, small team",
    "ram_gb": 1
  },
  {
    "label": "GitLab, memory constrained",
    "ram_gb": 8
  },
  {
    "label": "GitLab, single node baseline",
    "ram_gb": 16
  }
]

Gitea documents 1 GB of RAM with 2 CPU cores as typically sufficient for small teams and projects, and names a Raspberry Pi 3 as enough for small workloads. GitLab documents 16 GB as the baseline for a single node installation, and 8 GB as the low end for what its own page calls a memory constrained environment. Forgejo's installation documentation gives no RAM figure. It is a fork of Gitea and behaves like one, so the Gitea figure is the closest published guide you have.

Wetin this mean for a 1 GB VPS: bare repositories and cgit fit with room left over, because neither one dey run resident service. Forgejo or Gitea go start and serve small team on SQLite, but you dey on the documented floor, so leave PostgreSQL and the CI (continuous integration) runner off that box. If the web interface disappear without error, run sudo dmesg -T | grep -Ei 'oom|out of memory|killed process' and look for line like Out of memory: Killed process 1181 (forgejo). This mean say kernel out of memory killer don stop am. GitLab for 1 GB box no be tuning problem. E no go run.

Tier 0: bare repository over SSH

Git no get network daemon wey you need start. git push over SSH dey run git-receive-pack for the other side as normal Unix process, so any account wey you fit reach with key don already be Git remote. Create one account for the repositories, and keep the repositories outside the account home directory, so web view wey you add later no need access to that home directory.

sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' \
  --group --disabled-password --home /home/git git
sudo install -d -m 0755 -o git -g git /srv/git
sudo -u git git init --bare /srv/git/project.git

--bare dey create repository wey no get working copy, and na this kind repository server dey hold. Pushing go checked-out branch for repository wey get working copy dey refused by default with refusing to update checked out branch: refs/heads/main. Na this be the commonest mistake for this tier.

Now give the account one key and clone am.

sudo -u git install -d -m 700 /home/git/.ssh
sudo -u git tee -a /home/git/.ssh/authorized_keys <<'EOF'
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIexamplekeyhere alice@laptop
EOF
sudo -u git chmod 600 /home/git/.ssh/authorized_keys
git remote add origin git@vps.example.com:/srv/git/project.git
git push -u origin main

First push wey work dey end with * [new branch] main -> main. If e end with git@vps.example.com: Permission denied (publickey), authentication never happen, so read server log with sudo journalctl -u ssh -n 20. Line wey dey read Authentication refused: bad ownership or modes for file /home/git/.ssh/authorized_keys mean say ownership or file mode no correct, because sshd dey reject key file wey owner no trusted or permissions allow other users write to am.

If the project origin already dey point to GitHub, git remote add origin go stop with error: remote origin already exists.. Adding this server as second push URL for that remote go allow one git push update both.

Then remove shell access from the account.

command -v git-shell | sudo tee -a /etc/shells
sudo chsh -s "$(command -v git-shell)" git

git-shell dey accept only the few commands wey Git dey send over SSH, so interactive login now go stop with message instead of prompt:

fatal: Interactive git shell is not enabled.
hint: ~/git-shell-commands should exist and have read and execute access.

Na everything wey server need be that. No database dey, and no web process wey you need upgrade. Wetin you lose na everything forge dey provide: no browsing, no issue tracker, no pull requests, and no per-user permission. Every key for that file fit read and write every repository wey the git user own.

Tier 1: cgit dey give you web view without database

cgit na CGI (common gateway interface) program wey dem write for C. Web server dey run am once for every request, e dey read repositories directly from disk, and e no store any state by itself. Ubuntu 24.04 get am for universe component.

sudo apt update
sudo apt install -y cgit fcgiwrap nginx
sudo install -d -o www-data -g www-data /var/cache/cgit

Point am to the repository directory for /etc/cgitrc:

root-title=Git on example.com
css=/cgit.css
logo=/cgit.png
cache-size=1000
cache-root=/var/cache/cgit
snapshots=tar.gz zip
scan-path=/srv/git

scan-path dey scan that directory and list every repository wey e find, so new bare repo go appear without extra configuration. cache-size na the number of cached pages, and caching go remain off while e dey zero. Read wetin your package don already put for /etc/cgitrc before you add lines, because Debian and Ubuntu package dey ship some defaults of their own.

Each entry dey show the first line of the repository description file, so fresh bare repo go list itself as Unnamed repository; edit this file 'description' to name the repository. Fix am once for every repository:

echo 'Project X, internal tooling' | sudo -u git tee /srv/git/project.git/description
The nginx site file, and how to check am
server {
    listen 80;
    server_name git.example.com;
    root /usr/share/cgit;

    try_files $uri @cgit;

    location @cgit {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi;
        fastcgi_param PATH_INFO $uri;
        fastcgi_param QUERY_STRING $args;
        fastcgi_param HTTP_HOST $server_name;
        fastcgi_pass unix:/run/fcgiwrap.socket;
    }
}
sudo systemctl enable --now fcgiwrap.socket
sudo nginx -t && sudo systemctl reload nginx
systemctl show fcgiwrap.socket -p Listen

root /usr/share/cgit dey serve cgit.css and cgit.png as plain files, while try_files dey hand everything else to the CGI at /usr/lib/cgit/cgit.cgi. A 502 page wey get connect() to unix:/run/fcgiwrap.socket failed (2: No such file or directory) inside /var/log/nginx/error.log means say the socket unit no dey run, or e dey listen on another path. The systemctl show line dey print the path wey e actually dey use.

You need know two limits before you build on top of am. cgit na read-only and e no get login for this configuration, so everything under scan-path dey public: keep private repository away from that directory, or put HTTP basic authentication in front of the whole site. And CGI dey run as the web server user, so that user need permission to traverse /srv/git and read every repository. If directory no allow am enter, e go show as empty index instead of error.

Tier 2: Forgejo or Gitea for issues and pull requests

Forgejo and Gitea na the same kind idea: one Go binary wey dey serve web forge with users, organisations, issues, pull requests, releases, package registry and built-in CI system. Binary plus SQLite na the complete install, na why dem fit run for hardware wey GitLab no go touch. The Compose file below na the one for Forgejo documentation, with the image tag wey e name as of 24 October 2026.

networks:
  forgejo:
    external: false

services:
  server:
    image: codeberg.org/forgejo/forgejo:17
    container_name: forgejo
    environment:
      - USER_UID=1000
      - USER_GID=1000
    restart: always
    networks:
      - forgejo
    volumes:
      - ./forgejo:/data
      - /etc/localtime:/etc/localtime:ro
    ports:
      - '3000:3000'
      - '222:22'

That 17 tag dey follow the v17 line. Forgejo v17.0.1, wey dem release 26 October 2026, na the current stable release, and Forgejo support v17 until 28 January 2027. The older v16 line lose support on 29 October 2026, so any existing install wey still dey use 16 tag need upgrade now. Moving from one major version go another one later na manual upgrade, so e cheaper to start with the current one.

docker compose up -d
docker compose ps
curl -sI http://127.0.0.1:3000 | head -1

The curl line suppose print HTTP status line. Before you complete the first-run setup, e fit be redirect to /install, and that still mean say the service dey up. If the container exit instead, the usual cause na ownership: ./forgejo directory must belong to the UID (user id) for USER_UID, or the process no go fit write for its own data directory. Docker Compose for VPS explain that file layout and volume ownership rule complete.

Two answers for the setup page decide whether clone URLs go work. The SSH port must be the host side of the SSH mapping, wey for the Compose file above na 222, because e map host port 222 to container port 22. Nothing say you must use 222: any free host port go work, as long as the mapping and this answer match. Also, the domain must be the name wey people go actually type. If either one wrong, every repository page go show clone command wey go fail for anybody wey copy am. Both dey inside [server] section of app.ini afterwards, as SSH_PORT, SSH_DOMAIN and ROOT_URL.

For public instance, publish the web port for loopback address only ('127.0.0.1:3000:3000'), then put nginx in front of am for TLS (transport layer security). Gitea installs the same way from the docker.gitea.com/gitea image wey its documentation use, or as one binary with one systemd unit and one app.ini. Its current stable release na v28.3.0, published 1 November 2026. When v28.0.0 come out at the end of September, the project drop the old 1. prefix, so the release after 1.27 na 28, no be 1.28.

Stay with SQLite as long as you fit. E keep the instance to one process and one file, and e survive reboot without any extra service to supervise. PostgreSQL justify the extra cost when several people dey write at the same time, because SQLite dey serialise writes and long CI runs dey write constantly. Both projects fit move an existing instance to PostgreSQL later, so this no be decision wey lock you permanently.

Forgejo or Gitea: wetin really different

The lineage na shared one. Gitea fork from Gogs in 2016. For late 2022, control of the Gitea domain and trademark pass to company, Gitea Ltd, and some maintainers together with Codeberg start Forgejo. Forgejo community dey develop am under Codeberg e.V., a non-profit association registered for Germany wey hold the project's domains, while governance remain with Forgejo own contributors. E move from MIT licence to GPLv3 (GNU general public license version 3) in 2024. Gitea remain MIT licensed and commercial backing dey behind its development.

For everyday use, the feature sets dey close. But the path between dem no be close. Forgejo v10.0, from January 2025, na the last release wey fit take Gitea database directly, and only from Gitea v1.22 or older. Gitea dey on v28.3.0 as of 2 November 2026, so current Gitea instance no get supported in-place switch to Forgejo. Choose one before you fill am with data, and treat any later move as export and re-import.

A short rule for choosing. If governance matter to you, or you want project wey dey under non-profit umbrella, run Forgejo. If you want the bigger install base and commercial support option, run Gitea. Dem both dey maintained openly and dey release often: Forgejo dey release stable version every three months and one LTS (long term support) release every year, with v17.0.1 as current and v15.0.11 as the LTS as of 29 October 2026. Forgejo support v17 reach 28 January 2027 and v15 reach 15 July 2027, while support for v16 end on 29 October 2026, so check the releases page before you pin a major version. If neither rule settle am, the complete comparison of Forgejo and Gitea explain how their Actions and package registries differ, and na this detail you need settle before your data make switching expensive.

Tier 3: wetin GitLab dey cost before e do anything

GitLab CE na different kind software. One instance na group of services wey dey work together: Puma for the web application, Sidekiq for background jobs, PostgreSQL, Redis, Gitaly for repository access, and nginx for front. The Omnibus package install all of dem together, so installation dey simple but memory requirement dey high.

GitLab requirements page document 16 GB of RAM and 8 vCPU as the baseline for single-node installation, with 8 GB named as the low end for environment wey memory dey limited. The same page tell you make you disable swap, because swapping under load dey make the instance perform badly. Na these published figures be this as of October 2026, and dem don increase over the years, so read the page again before you size server.

You get useful things for that budget: container registry, package registry, fine-grained permissions, and CI wey dem don test for large scale; compliance center and project or group audit trails require paid GitLab tier. If nobody for your team fit name one thing from that list wey dem need this quarter, you dey pay for bigger VPS without getting anything in return.

The SSH access model: one git user and many keys

For system OpenSSH, every tier for here dey authenticate the same way. Na one Unix account wey dem name git dey, and every public key dey inside that account's ~/.ssh/authorized_keys. Na the key be authentication. Authorisation na any options wey you write before the key for the same line.

Plain key line go give the person wey hold am anything wey that account fit do. For account wey still dey use /bin/bash as e login shell, forced command go limit am to Git:

restrict,command="git-shell -c \"$SSH_ORIGINAL_COMMAND\"" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIexamplekeyhere alice@laptop

restrict, wey dey available since OpenSSH 7.2, dey turn off port forwarding, agent forwarding, X11, and PTY (pseudo terminal) allocation with one word. command= dey replace anything wey client request with the one wey you specify, and Git still dey work because SSH server dey put the client's original command inside $SSH_ORIGINAL_COMMAND.

Forge dey write that file for you, and na this be the real difference between tier 0 and tier 2. When dem dey behind system OpenSSH server, wey be their default, Forgejo and Gitea dey rewrite authorized_keys with one line for every registered key. Each line get forced command wey name the key with its database id:

command="/usr/local/bin/forgejo --config=/etc/forgejo/app.ini serv key-3",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc,restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIexamplekeyhere alice

Na that forced command dey turn one shared Unix account into permission for each user: key-3 dey tell the forge which user dey connect, and e dey check that user against the repository before any objects move. No edit that file by hand for forge-managed box, because database go rewrite am and your line go disappear. If you enable the forge's built-in SSH server, or make OpenSSH ask the forge for keys through AuthorizedKeysCommand, the forge no need that file at all. For the second case, both projects tell you make you turn off its creation. Deploy keys dey use the same mechanism: deploy key na normal SSH key wey dem register against one repository, usually read-only. The forge dey do the check instead of sshd.

Two habits matter pass all the configuration wey we discuss above. Issue one key for each person or machine; never use shared key. If you revoke shared key, you must rotate am for everybody at the same time. Also remove keys the day person leave, because old key for that file na permanent login wey nobody dey monitor. Good SSH key management on a server dey explain key types and passphrases, and everything there still apply here without change. If the box new, the first ten minutes on a new VPS na the correct thing to do before you put repositories on am.

Mi fit run GitHub Actions for my own Git server?

You fit run workflows wey dem write with GitHub Actions syntax. You no fit run GitHub itself. Forgejo Actions dey enabled by default since Forgejo v1.21, and e dey read workflow files from .forgejo/workflows for each repository. Gitea Actions dey work the same way and e dey read .gitea/workflows. Both need another program, wey dem dey call runner. You must install am and register am against your instance with token from the admin settings. Plenty published actions go run without change.

Plan for two consequences. With the normal container labels, runner go start one container for every job. So e need container engine and separate memory budget. Na why e no suppose dey for the same 1 GB box with the forge. Both runners fit also run jobs directly on the host through label wey end with :host for Forgejo. This one no need engine, but e also mean say no container dey between the job and that machine. Runner go execute anything wey workflow file talk. Forgejo documentation talk am plainly: runner performs remote code execution. Give am separate host where you fit. If you no fit, at least give am separate unprivileged user and registration token wey scope to one repository.

If your repositories go remain for GitHub and you only want the compute to run for hardware wey you control, na different setup with different steps. a self-hosted GitHub Actions runner go attach to GitHub repository and e no need any of this. If you still dey consider wetin leaving go cost you, wetin GitHub actually dey give you separate Git hosting from the network around am.

Backups: repositories na half of the state

Bare repository na directory, so if you copy am, you don copy everything wey dey inside. Mirror clone from another machine na correct backup, and e dey refresh for the same place:

git clone --mirror git@vps.example.com:/srv/git/project.git
cd project.git && git remote update

That one go pull every ref and every object. E no dey pull server-side hooks or the description file, so make you keep file-level copy of the directory too if you dey use hooks.

Forge dey keep issues, pull requests, users, keys, and permissions for im database, and if you copy only repositories, you go lose all that one. Both projects get dump command wey dey write the database, repositories, configuration, and attachments inside one archive:

sudo -u git forgejo dump -c /etc/forgejo/app.ini -f /var/backups/forgejo-dump.zip

Under Docker, the same command dey run inside the container, and the configuration path depend on the image, so check well before you type:

docker compose exec server ls /data/gitea/conf
docker compose exec -u git server forgejo dump -c /data/gitea/conf/app.ini

Run am as the user wey get the data, and write the archive go directory wey that user get permission to write. Then copy the archive comot from the server, because backup wey dey only for the machine wey you dey back up no be backup. Restoring na the step wey people dey skip: unpack one dump for another machine now, so you go sabi the procedure when things dey calm, instead of when wahala don burst.

Choose base on wetin you want do

One pesin wey get laptop and one VPS, and no need browser: use bare repositories over SSH. No extra service dey run and nothing to upgrade.

The same thing, plus you want read code for browser and send link: add cgit. Still no database, and nothing dey run for background.

Team wey dey review each oda code and track issues: use Forgejo or Gitea, if you get 2 GB of RAM or more. Move the CI runner go second box once the jobs come heavy.

Organisation wey need container registry and audit trails, and get 16 GB to spend for server: use GitLab. If your budget no reach that one, no even start am.

To move from the first three tiers dey cheap, because for all of dem, the repositories na just normal Git directories for disk. Start from the lowest tier wey fit do the work. If you dey check wetin else fit stay for the same server, the shortlist of wetin dey worth self-hosting put Git server side-by-side with oda services wey dey compete for that RAM.

FAQ

One 1 GB VPS fit run Forgejo or Gitea?

Yes, for small team, if na SQLite dey use and nothing heavy dey run for the machine. Gitea documentation talk say 1 GB RAM and 2 CPU cores normally enough for small teams and projects, and Forgejo na fork of Gitea with similar requirements. No add PostgreSQL or CI runner to that machine. If the service disappear without error for its own log, run sudo dmesg -T | grep -Ei 'oom|out of memory|killed process': if line name the process wey dem kill, na kernel out of memory killer kill am, so you need bigger plan instead of tuning flag.

Wetin be difference between Forgejo and Gitea?

Dem get shared codebase history and most features. Gitea fork from Gogs for 2016, and Forgejo fork from Gitea for late 2022 after control of the Gitea trademark move go one company. Its community dey develop Forgejo under Codeberg e.V., wey be non-profit for Germany, and dem release am under GPLv3; Gitea remain MIT licensed with commercial backing. The practical difference na migration path. Forgejo v10.0, from January 2025, na the last release wey fit take Gitea database directly, and na only from Gitea v1.22 or older. So current Gitea instance no get supported in-place switch.

I fit run GitHub Actions workflows for self-hosted Git server?

Forgejo Actions and Gitea Actions both run workflows wey dem write with GitHub Actions YAML syntax, and dem read am from .forgejo/workflows and .gitea/workflows. You go install separate runner program and register am against your instance. Many published actions go work without changes. The runner dey execute arbitrary code from your repositories and, with the usual container labels, e dey start one container for each job. So give am its own host, or at least its own unprivileged user, and no run am for 1 GB server wey already dey run the forge.

How I fit back up self-hosted Git server?

For bare repositories, git clone --mirror from another machine go copy every ref and object, while git remote update inside that mirror go refresh am. For Forgejo or Gitea, repositories na only part of the state, because issues, pull requests, users and keys dey inside the database. Use the built-in dump, sudo -u git forgejo dump -c /etc/forgejo/app.ini, or run the same command inside the container for Docker installation. Copy the archive comot from the server, then restore one for spare machine once, so you fit confirm say the procedure dey work.

Dis article help you?

#git#self-hosting#forgejo#gitea#ssh