Independent testing Updated April 2026 387 self-hosting guides 5 VPS providers tested

guide

How to Self-Host Gitea on Contabo (2026 Guide)

Learn how to self-host Gitea on Contabo with a step-by-step 2026 guide covering setup, configuration, and recommended specs for a smooth deployment.

How to Self-Host Gitea on Contabo (2026 Guide)

Gitea is a lightweight and self-hosted Git service that is increasingly popular among developers for managing repositories. In this guide, you will learn how to install Gitea on a Contabo VPS, taking advantage of its efficient performance and affordable pricing. This installation is suited for homelabbers and developers who want a seamless Git experience.

Why Choose Contabo for Gitea Hosting?

Contabo offers reliable virtual private servers (VPS) at competitive prices, starting from just 5.99 EUR/month. With generous resources allocated for your server, you can deploy Gitea without worrying about performance bottlenecks. Below is a quick comparison of Contabo with other popular VPS providers to help you understand its advantages.

ProviderMonthly PriceRAMStorageData Center Locations
Contabo5.99 EUR4 GB400 GB SSDGermany, USA
Hetzner Cloud4.15 EUR4 GB20 GB SSDGermany
DigitalOcean6 USD4 GB80 GB SSDGlobal
Vultr6 USD4 GB80 GB SSDGlobal
Linode (Akamai)5 USD4 GB80 GB SSDGlobal

Prerequisites

  1. Contabo VPS: Sign up and provision a VPS instance from Contabo with at least 4 GB of RAM and SSD storage.
  2. Domain Name: Obtain a domain name if you wish to access Gitea via a custom URL.
  3. SSH Access: Ensure you have SSH access to the VPS.

Step 1: Access Your VPS

To begin, SSH into your Contabo VPS. Open a terminal and run:

ssh root@your_server_ip

Replace your_server_ip with the actual IP address of your Contabo VPS.

Step 2: Update the System

Ensure your system packages are up to date:

apt update && apt upgrade -y

Step 3: Install Required Packages

Gitea requires Git and a few additional libraries. Install them using the following command:

apt install git sqlite3 -y

For anyone wanting to use an external database like MySQL or PostgreSQL, make sure to install those as well.

Step 4: Create a Git User

For security reasons, create a dedicated user to run Gitea:

adduser --system --shell /bin/bash --gecos 'Git User' --group --disabled-password git

Step 5: Download Gitea

Next, download Gitea from the official repository:

wget -O gitea https://dl.gitea.io/gitea/1.18.0/gitea-1.18.0-linux-amd64

Make the downloaded file executable:

chmod +x gitea

Step 6: Move Gitea to the Userโ€™s Directory

Move the Gitea binary to the userโ€™s directory:

mv gitea /usr/local/bin/

Step 7: Configure Gitea

Create the necessary Gitea directories:

mkdir -p /var/lib/gitea/{custom,data,log}
chown -R git:git /var/lib/gitea/

Now create a configuration file:

nano /etc/systemd/system/gitea.service

Add the following configuration:

[Unit]
Description=Gitea
After=syslog.target
After=network.target

[Service]
User=git
Group=git
WorkingDirectory=/var/lib/gitea
ExecStart=/usr/local/bin/gitea web
Restart=always
Environment=USER=git HOME=/var/lib/gitea

[Install]
WantedBy=multi-user.target

Step 8: Start Gitea

Enable and start the Gitea service with the following commands:

systemctl enable gitea
systemctl start gitea

Step 9: Access Gitea

Open your web browser and navigate to:

http://your_server_ip:3000

Replace your_server_ip with the IP address of your VPS. You will see the Gitea setup page where you can configure your admin account and database.

FAQs

How do I set up a database for Gitea on Contabo?

To effectively run Gitea, you can set up a database like MySQL or PostgreSQL. Install the database server on your VPS and create a new database and user for Gitea. In the Gitea setup page, choose the database type and input the required details like user, password, and database name. Make sure to configure the database server to allow connections from your Gitea installation.

Can I use a domain name to access my self-hosted Gitea?

Yes, you can use a domain name. After purchasing your domain, configure your DNS settings to point to your Contabo VPS IP. In the Gitea setup, make sure to enter the domain name for the application. This will give you a cleaner URL and help with user accessibility.

How can I secure my Gitea installation?

To secure your Gitea installation, consider setting up an SSL certificate using Letโ€™s Encrypt. This is easily done by installing Certbot. After setting up SSL, ensure your Gitea configuration has the proper ROOT_URL to use https://. Regularly update Gitea and its dependencies to address any security vulnerabilities.

For a comprehensive comparison of VPS providers, visit our full VPS comparison. With an affordable VPS from Contabo, you can successfully self-host Gitea and manage your repositories efficiently.