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

guide

How to Self-Host Forgejo on Vultr (2026 Guide)

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

How to Self-Host Forgejo on Vultr (2026 Guide)

Forgejo is an open-source software development platform, a fork of Gitea that allows you to self-host a collaborative coding environment. In this detailed guide, weโ€™ll cover how to install and configure Forgejo on Vultr, one of the best VPS providers for developers. With plans starting at just 6 USD per month, Vultr offers robust infrastructure for your self-hosting needs.

Prerequisites

Before getting started, ensure you have the following:

Step 1: Create a Vultr Instance

  1. Log in to your Vultr account.
  2. Click on Deploy Now.
  3. Choose an operating system. For Forgejo, we recommend you use Ubuntu 22.04.
  4. Select the server size. The $6/month plan is suitable for small projects.
  5. Choose a server location that is geographically close to your audience.
  6. Click on Deploy Now and wait for the instance to be ready.

Step 2: Connect to Your Server

Once your server is up and running, connect via SSH. Open your terminal and use the following command:

ssh root@your_server_ip

Replace your_server_ip with the actual IP address of your Vultr instance.

Step 3: System Preparation

Update and upgrade your package list with the following commands:

sudo apt update
sudo apt upgrade -y

Install necessary dependencies:

sudo apt install -y git curl build-essential

Step 4: Install Docker

Docker is the easiest way to get Forgejo up and running. Install Docker by executing:

curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

Add your user to the Docker group:

sudo usermod -aG docker $USER

Log out and back into your server to apply the group changes.

Verify installing Docker:

docker --version

Step 5: Set Up Forgejo

Now, letโ€™s pull the Forgejo Docker image and create a container:

docker run -d --name forgejo \
  -p 3000:3000 \
  -p 222:22 \
  -v /srv/forgejo:/data \
  forgejo/forgejo:latest

You can modify the ports depending on your existing setup. The default port for web access will be 3000, while SSH will run on port 222.

Now, you can access Forgejo by visiting http://your_server_ip:3000 in your web browser.

Step 6: Configure Forgejo

Upon accessing Forgejo, you will be guided through the initial setup:

  1. Database Configuration: If you need a database, you may use PostgreSQL or MySQL.
  2. Admin Account Setup: Create an administrative user account for managing your instance.
  3. Webhooks and Integrations: Configure any necessary webhooks to integrate with CI/CD tools or other services.

Step 7: Securing Your Installation

After setting up Forgejo, you should consider securing your instance. Here are some best practices:

Comparison Table of VPS Providers

ProviderMonthly PriceRAMCPUStorage
Contabo VPS5.99 EUR4GB2 Cores100GB
Hetzner Cloud4.15 EUR2GB1 Core20GB
DigitalOcean6 USD1GB1 Core25GB
Vultr6 USD1GB1 Core25GB
Linode5 USD2GB1 Core50GB

For a full VPS comparison, check out this link.

FAQs

What is Forgejo used for?

Forgejo is a self-hosted Git service that offers a collaborative platform for developers to manage their code repositories. It provides tools for version control, project management, and integrations with CI/CD pipelines. This allows teams and individuals to host their projects securely while maintaining control over their code and workflows. Forgejo emphasizes performance and user experience, making it suitable for both small and large development teams.

How does Docker streamline the installation process of Forgejo?

Using Docker to install Forgejo simplifies the deployment process significantly. Docker containers allow you to package the application along with its dependencies, ensuring consistency across different environments. You donโ€™t need to worry about installing libraries or dependencies manually, as everything required runs in an isolated environment. This not only speeds up installation but also makes it easier to manage updates and rollbacks.

Can I install Forgejo on other VPS providers besides Vultr?

Yes, you can absolutely install Forgejo on other VPS providers. The setup steps remain largely the same, provided the server runs a compatible operating system like Ubuntu. Providers such as Contabo, Hetzner, DigitalOcean, and Linode also offer affordable plans suitable for self-hosting applications like Forgejo. Always ensure that you meet the minimum system requirements and have Docker installed for a smooth installation process.

With this guide, you should be well on your way to self-hosting Forgejo on Vultr and enjoying the benefits of a personalized coding platform. Happy coding!