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

guide

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

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

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

Gitea is a lightweight, self-hosted Git service thatโ€™s perfect for developers looking to manage their code repositories. This guide will walk you through the steps to install Gitea on a Linode VPS, providing you with a robust version control system tailored for your projects.

Why Choose Linode for Gitea?

Linode is chosen for its reliability and competitive pricing. At just 5 USD/mo, you can get a high-performance instance (1 GB RAM, 1 CPU, 25 GB SSD) suitable for Gitea hosting. Below is a quick comparison of popular VPS providers to help you see why Linode stands out:

ProviderMonthly PriceRAMCPUSSD StorageLink
Contabo VPS5.99 EUR4 GB1200 GBContabo
Hetzner Cloud4.15 EUR2 GB120 GBHetzner
DigitalOcean6 USD1 GB125 GBDigitalOcean
Vultr6 USD1 GB125 GBVultr
Linode5 USD1 GB125 GBLinode

For a full VPS comparison, visit our best VPS providers page.

Prerequisites

Before diving into the installation process, ensure you have:

  1. A Linode VPS instance up and running (a basic 1 GB plan is sufficient).
  2. Access to the terminal via SSH. (You can use tools like PuTTY or the terminal on Linux/Mac.)
  3. A domain name (optional but recommended).
  4. Basic Linux command line knowledge.

Step-by-Step Installation of Gitea on Linode

Step 1: Connect to Your Linode Instance

First, connect to your Linode VPS:

ssh root@your-linode-ip

Replace your-linode-ip with your VPSโ€™s IP address.

Step 2: Install Required Dependencies

Before installing Gitea, you need to set up some dependencies:

sudo apt update
sudo apt install -y git mariadb-server nginx

Step 3: Configure MariaDB

Next, set up a database for Gitea:

  1. Log in to MariaDB:

    sudo mysql -u root -p
  2. Create a new database and a user:

    CREATE DATABASE gitea;
    CREATE USER 'giteauser'@'localhost' IDENTIFIED BY 'your_password';
    GRANT ALL PRIVILEGES ON gitea.* TO 'giteauser'@'localhost';
    FLUSH PRIVILEGES;
    EXIT;

Replace your_password with a strong password.

Step 4: Download Gitea

Now, download and install Gitea:

export GITEA_VERSION=$(curl -s https://api.github.com/repos/go-gitea/gitea/releases/latest | grep tag_name | cut -d '"' -f 4)
wget https://dl.gitea.io/gitea/${GITEA_VERSION}/gitea-${GITEA_VERSION}-linux-amd64 -O gitea
chmod +x gitea
sudo mv gitea /usr/local/bin/

Step 5: Create Gitea User

Run Gitea under its own user:

sudo adduser --system --home /var/lib/gitea --shell /bin/bash --gecos 'Gitea' gitea
sudo mkdir /var/lib/gitea/{custom,data,log}
sudo chown -R gitea:gitea /var/lib/gitea/

Step 6: Configure Gitea

Create the configuration file:

sudo cp /usr/local/bin/gitea /etc/init.d/
sudo update-rc.d gitea defaults

Edit the gitea configuration file to set the database and other settings needed for your setup.

Step 7: Set Up Nginx

Configure Nginx to serve Gitea:

  1. Create a new configuration file for Gitea:

    sudo nano /etc/nginx/sites-available/gitea
  2. Paste the configuration below:

    server {
        listen 80;
        server_name your-domain.com;
    
        location / {
            proxy_pass http://localhost:3000;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    }
  3. Enable the site:

    sudo ln -s /etc/nginx/sites-available/gitea /etc/nginx/sites-enabled/
    sudo nginx -t
    sudo systemctl restart nginx

Step 8: Start Gitea

You can now start Gitea:

sudo -u gitea /usr/local/bin/gitea web

Step 9: Access Gitea

Open your web browser and navigate to http://your-domain.com (or your VPS IP). Follow the web interface instructions to complete the setup.

FAQs

What is Gitea and why should I self-host it?

Gitea is an open-source, self-hosted Git service that provides a simple and efficient way to manage and collaborate on Git repositories. Self-hosting allows you to have complete control over your source code, including privacy, customization, and security configurations. This is particularly beneficial for developers who want a robust version control system without the limitations of traditional hosting options.

How much does it cost to host Gitea on Linode?

Hosting Gitea on a Linode VPS costs 5 USD/month for the basic plan. This plan includes 1 GB of RAM, adequate for running Gitea efficiently for small to medium-sized projects. If you need more resources, Linode offers flexible pricing plans that accommodate different requirements, so you can upgrade your instance as necessary.

Can I use a custom domain with Gitea on Linode?

Yes, you can use a custom domain with Gitea on Linode. In the Nginx configuration file, you can set the server_name directive to your domain name. Make sure to point your domainโ€™s DNS records to your Linodeโ€™s IP address. This allows you to access your Gitea installation through your custom domain easily.

By following these steps, youโ€™ll have a fully functional Gitea instance running on Linode, ready for managing your code repositories effectively. Happy hosting!