Skip to content

Gitea on a VPS

Lightweight Git service

Category
Dev / Tools
Author
Gitea
License
MIT
Version
28.0.0

The script is free · VPS from $3.19 per month · installs in about 60 seconds

Install over SSH

root@vps:~# command -v docker >/dev/null || curl -fsSL https://get.docker.com | sh; docker run -d --name gitea --restart always -p 3000:3000 -p 222:22 -e USER_UID=1000 -e USER_GID=1000 -v gitea-data:/data docker.gitea.com/gitea:latest

  • SystemUbuntu 24.04 · x86_64ok
  • Sourcegithub.com/go-gitea/giteaok
  • Version28.0.0ok
  • Port3000/tcplisten
  • Port222/tcplisten

✓ Gitea 28.0.0 installed · about 60 seconds

root@vps:~#

Install command from the library. Output is shortened and may differ on your server.

What it is

  • Git
  • CI/CD
  • Repositories
  • Self-hosted

Gitea is a lightweight Git service, your own GitHub or GitLab alternative: repositories, issues, pull requests, wiki and releases. Written in Go and runs even on the smallest server.

You need your own Git server when code can't live in someone else's cloud or you want your own CI/CD processes. Gitea Actions is compatible with GitHub Actions syntax, and there's also a package and Docker image registry.

The command runs the official Docker image with an SQLite database. For a larger team you can connect PostgreSQL or MySQL.

  • Repositories, issues, pull requests and code review
  • Gitea Actions, compatible with GitHub Actions
  • Package registry: npm, PyPI, Docker and more
  • Repository mirroring from GitHub and GitLab
  • Wiki, releases and projects

Recommended plan

For Gitea: at least 1 vCPU, 3 GB RAM and 30 GB NVMe.

Minimum to run
1 vCPU · 1 GB RAM · 10 GB disk
Systems
Ubuntu 22.04 · Ubuntu 24.04 · Debian 12

How to install

Three steps in the bot or one command over SSH; installation takes about 60 seconds.

  1. 01

    Choose a plan in the bot

    Open @ExpressHost_bot and pay for a VPS. The server will be ready in about 60 seconds.

  2. 02

    Add Gitea

    At the “Add-ons” step pick the script from the library, or run it later: Server settings → Scripts.

  3. 03

    Open http://server-IP:3000 and complete the initial setup

    The bot will send the server address and login details to the chat.

Manually over SSH

Connect to the server as root and run the command. Supported systems: Ubuntu 22.04, Ubuntu 24.04, Debian 12.

Install command
command -v docker >/dev/null || curl -fsSL https://get.docker.com | sh; docker run -d --name gitea --restart always -p 3000:3000 -p 222:22 -e USER_UID=1000 -e USER_GID=1000 -v gitea-data:/data docker.gitea.com/gitea:latest

Ports

Gitea ports
PortProtocolPurpose
3000tcpWeb UI and HTTP(S) cloning
222tcpSSH for git clone/push (port 22 in the container)

After installation

  1. 1.Open http://server-IP:3000 and complete the initial setup
  2. 2.In the settings, set the server base URL and SSH port 222
  3. 3.Create the admin and your first repository

Gitea FAQ

Didn’t find an answer? Message @ExpressHost_SupportBot.

How many users can a plan handle?

A small team works comfortably on 1 vCPU and 3 GB. If you run Actions runners on the same server, get more CPU and RAM.

How do I update Gitea?

docker pull docker.gitea.com/gitea:latest, then recreate the container with the same command. Back up the volume before a major update.

Where is the data stored?

In the gitea-data Docker volume (folder /data in the container): repositories, database and app.ini.

Gitea installs at checkout — in the bot.