How To Install Gitea On Ubuntu, Debian, and Fedora?

Looking to set up Gitea on your Ubuntu, Debian, or Fedora system? You’ve come to the right place! In this guide, we’ll walk you through the installation process step by step, ensuring you have Gitea up and running in no time.

Introduction To Gitea

Gitea is a lightweight, open-source self-hosted Git service that provides a user-friendly interface with features similar to other popular Git hosting platforms. Whether you’re an individual developer or part of a team, Gitea makes it easy to manage your repositories, collaborate with others, and track changes to your codebase.

We’ll cover everything you need, from installing the required dependencies to configuring the Gitea server and accessing it via a web browser. No prior experience is necessary, as we’ll explain each step in a beginner-friendly manner.

So, if you’re ready to take control of your version control and streamline your development workflow, let’s dive into the world of Gitea and get it installed on your Ubuntu, Debian, or Fedora machine.

System Requirements for Installing Gitea

Before we get started with the installation process, let’s ensure that your system meets the necessary requirements for running Gitea.

Gitea has relatively low system requirements, making it suitable for a wide range of machines. Here are the minimum requirements:

Operating System: Ubuntu 16.04 or later, Debian 8 or later, Fedora 27 or later.
Processor: 1 GHz or faster.
RAM: 1 GB or more.
Storage: At least 200 MB of free disk space.

Make sure your system meets these requirements before proceeding with the installation. Once you’ve confirmed that your system is compatible, we can move on to the installation process.

Installing Gitea on Ubuntu

To install Gitea on Ubuntu, follow these steps:

  • Open a terminal window on your Ubuntu system.
  • Update the package list by running the following command:
    sudo apt update
  • Install the required dependencies by running the command:
    sudo apt install -y git postgresql postgresql-contrib certbot
  • Next, create a new user and database for Gitea by executing the following commands:
    sudo -u postgres createuser --pwprompt gitea
    sudo -u postgres createdb --owner=gitea gitea
  • Download the latest version of Gitea by visiting the official Gitea website and finding the download link for Ubuntu.
  • Once the download is complete, navigate to the directory where the Gitea binary is located.
  • Make the Gitea binary executable by running the command:
    chmod +x gitea
  • Start the Gitea service by executing the following command:
    ./gitea web
  • Open a web browser and enter http://localhost:3000 in the address bar.
  • Follow the on-screen instructions to complete the installation process.

Congratulations! You have successfully installed Gitea on your Ubuntu system. Now let’s move on to configuring Gitea.

Configuring Gitea on Ubuntu

After installing Gitea, you’ll need to configure it to suit your needs. Here are the steps to configure Gitea on Ubuntu:

  • Open a web browser and enter http://localhost:3000 in the address bar.
  • You will be prompted to create the first user account. Provide the necessary details and click “Submit”.
  • Set up the administrator account by entering the required information and clicking “Submit”.
  • Next, you’ll need to configure the database settings. Choose “PostgreSQL” as the database type and enter the database details you created during the installation process.
  • Review the other configuration options and modify them as needed.
  • Once you’re satisfied with the configuration, click “Install Gitea” to complete the setup.

That’s it! Gitea is now configured on your Ubuntu system. You can now start using it to manage your repositories and collaborate with others.

Installing Gitea on Debian

To install Gitea on Debian, follow these steps:

  • Open a terminal window on your Debian system.
  • Update the package list by running the following command:
    sudo apt update
  • Install the required dependencies by running the command:
    sudo apt install -y git postgresql postgresql-contrib certbot
  • Next, create a new user and database for Gitea by executing the following commands:
    sudo -u postgres createuser --pwprompt gitea
    sudo -u postgres createdb --owner=gitea gitea
  • Download the latest version of Gitea by visiting the official Gitea website and finding the download link for Debian.
  • Once the download is complete, navigate to the directory where the Gitea binary is located.
  • Make the Gitea binary executable by running the command:
    chmod +x gitea
  • Start the Gitea service by executing the following command:
    ./gitea web
  • Open a web browser and enter http://localhost:3000 in the address bar.
  • Follow the on-screen instructions to complete the installation process.

Congratulations! You have successfully installed Gitea on your Debian system. Now let’s move on to configuring Gitea.

Configuring Gitea on Debian

After installing Gitea, you’ll need to configure it to suit your needs. Here are the steps to configure Gitea on Debian:

  • Open a web browser and enter http://localhost:3000 in the address bar.
  • You will be prompted to create the first user account. Provide the necessary details and click “Submit”.
  • Set up the administrator account by entering the required information and clicking “Submit”.
  • Next, you’ll need to configure the database settings. Choose “PostgreSQL” as the database type and enter the database details you created during the installation process.
  • Review the other configuration options and modify them as needed.
  • Once you’re satisfied with the configuration, click “Install Gitea” to complete the setup.

That’s it! Gitea is now configured on your Debian system. You can now start using it to manage your repositories and collaborate with others.

Installing Gitea on Fedora

To install Gitea on Fedora, follow these steps:

  • Open a terminal window on your Fedora system.
  • Update the package list by running the following command:
    sudo dnf update
  • Install the required dependencies by running the command:
    sudo dnf install git postgresql-server certbot
  • Next, create a new user and database for Gitea by executing the following commands:
    sudo -u postgres createuser --pwprompt gitea
    sudo -u postgres createdb --owner=gitea gitea
  • Download the latest version of Gitea by visiting the official Gitea website and finding the download link for Fedora.
  • Once the download is complete, navigate to the directory where the Gitea binary is located.
  • Make the Gitea binary executable by running the command:
    chmod +x gitea
  • Start the Gitea service by executing the following command:
    ./gitea web
  • Open a web browser and enter http://localhost:3000 in the address bar.
  • Follow the on-screen instructions to complete the installation process.

Congratulations! You have successfully installed Gitea on your Fedora system. Now let’s move on to configuring Gitea.

Configuring Gitea on Fedora

After installing Gitea, you’ll need to configure it to suit your needs. Here are the steps to configure Gitea on Fedora:

  • Open a web browser and enter http://localhost:3000 in the address bar.
  • You will be prompted to create the first user account. Provide the necessary details and click “Submit”.
  • Set up the administrator account by entering the required information and clicking “Submit”.
  • Next, you’ll need to configure the database settings. Choose “PostgreSQL” as the database type and enter the database details you created during the installation process.
  • Review the other configuration options and modify them as needed.
  • Once you’re satisfied with the configuration, click “Install Gitea” to complete the setup.

That’s it! Gitea is now configured on your Fedora system. You can now start using it to manage your repositories and collaborate with others.

Common Issues and Troubleshooting

While installing and configuring Gitea, you may encounter some common issues. Here are a few troubleshooting tips:

  • If you’re unable to access the Gitea web interface, make sure the Gitea service is running by executing the command: systemctl status gitea.
  • If you’re experiencing database connection issues, double-check the database settings in the Gitea configuration.
  • If you’re encountering SSL certificate errors, make sure you have a valid SSL certificate installed on your server.

If you’re still facing issues, refer to the official Gitea documentation or seek help from the Gitea community.

Conclusion

Congratulations on successfully installing and configuring Gitea on your Ubuntu, Debian, or Fedora system! You now have a powerful and user-friendly Git service at your disposal, allowing you to streamline your development workflow and collaborate with ease.

Remember to regularly update Gitea to benefit from the latest features and security patches. Additionally, explore the various customization options and integrations available to enhance your Gitea experience.