- Development
- Linux VPS
- Ubuntu 24.04
Self-host Gitea on a VPS
Gitea runs well on a GhostRDP Linux VPS Basic plan with 2 vCPU and 6 GB RAM in Germany or the Netherlands, from €5.99/mo.
Gitea is a lightweight, open-source Git service with repositories, issues, pull requests and CI. Your code stays on your own server. This guide runs it with Docker Compose and its built-in SQLite database.
Git hosting
Repositories, issues, pull requests and a wiki.
Light on resources
Gitea runs comfortably on a small server.
Private code
Your repositories stay on your own server.
Plans for Gitea
Gitea is light: Basic serves a small team. Pick Standard or Pro for many users, big repositories or Gitea Actions runners on the same server.
Linux VPS Basic
€5.99/mo
€5.09/mo billed yearly, save €10/year
- 2 vCPU
- 6 GB ECC RAM
- 40 GB NVMe
- 1 Gbps port
Linux VPS Standard
€12.99/mo
€11.04/mo billed yearly, save €23/year
- 4 vCPU
- 8 GB ECC RAM
- 70 GB NVMe
- 1 Gbps port
Linux VPS Pro
€25.99/mo
€22.09/mo billed yearly, save €46/year
- 6 vCPU
- 12 GB ECC RAM
- 90 GB NVMe
- 1 Gbps port
What you need
- Operating systemLinux VPS with Ubuntu 24.04
- Minimum resources1 vCPU and 1 GB RAM for a small team
- SoftwareDocker with the Compose plugin (installed in step 3)
Official site: docs.gitea.com
How to install Gitea
Written for Ubuntu 24.04 from the official instructions. Run the commands as root and replace YOUR_SERVER_IP with your server's address.
- 1
Connect to your server over SSH
Use the IP address and root password from your welcome email (the server page has a Copy SSH command button). Windows 10 and 11, macOS and Linux all include an SSH client in the terminal.
Shell ssh root@YOUR_SERVER_IP - 2
Update the system
Install the latest security updates before you add anything else.
Shell apt update && apt -y upgrade - 3
Install Docker
Docker's official convenience script adds Docker's own package repository and installs Docker Engine with the Compose plugin.
Shell curl -fsSL https://get.docker.com -o get-docker.sh sh get-docker.sh docker --version - 4
Write the Compose file
Based on Gitea's basic Docker example: the web interface on port 3000, Git over SSH on port 222, data in /opt/gitea/gitea.
Shell mkdir -p /opt/gitea && cd /opt/gitea cat > compose.yaml <<'EOF' services: server: image: docker.gitea.com/gitea:latest container_name: gitea environment: - USER_UID=1000 - USER_GID=1000 restart: always volumes: - ./gitea:/data ports: - "3000:3000" - "222:22" EOF - 5
Start Gitea
Downloads the image and starts the container.
Shell docker compose up -d docker compose ps - 6
Run the setup wizard
Open http://YOUR_SERVER_IP:3000, keep SQLite as the database, set the server domain to your IP or domain and the SSH port to 222, and create the administrator account.
After installing
- Cloning over SSHAdd your SSH key in your Gitea settings; clone URLs use port 222 (ssh://git@YOUR_SERVER_IP:222/user/repo.git).
- HTTPSFor a domain with HTTPS, put Caddy or nginx in front of port 3000 and update ROOT_URL in Gitea's settings.
- BackupsServer backups are not included. Back up /opt/gitea/gitea, or use gitea dump inside the container.
Gitea questions
Which plan do I need for Gitea?
Basic for personal use or a small team. Standard or Pro for many users or CI runners on the same server.
Can I use MySQL or PostgreSQL instead of SQLite?
Yes. Gitea's Docker docs include Compose examples with MySQL and PostgreSQL. SQLite is the simplest start.
Does Gitea have CI?
Yes, Gitea Actions. Runners are a separate program (act_runner) that you register with your Gitea.
Is Gitea free?
Gitea is open source under the MIT license.
Related apps
Docker
Docker Engine and Compose on a fresh Linux server
DevelopmentFrom €5.99/mo
Coolify
Self-hosted platform to deploy apps, databases and services
DevOpsFrom €12.99/mo
Portainer
Web interface to manage Docker containers
DevOpsFrom €5.99/mo
More on GhostRDP
Run Gitea on your own server.
Online in minutes. Pay with crypto, no ID needed.