How to Install Gitea Git Service on Debian 11

 

 

Gitea is a lightweight, self-hosted Git service that provides a simple and easy way to manage your Git repositories. In this guide, we will walk you through the installation of Gitea on Debian 11.

Step 1: Update Your System

Start by ensuring your system is up to date:

sudo apt update && sudo apt upgrade -y

Step 2: Install Required Packages

Install the required packages for Gitea:

sudo apt install git sqlite3 -y

Step 3: Create a User for Gitea

Create a new user for running Gitea:

sudo adduser --system --group --shell /bin/bash gitea

Step 4: Download Gitea

Download the latest version of Gitea:

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

Make the downloaded file executable:

chmod +x gitea

Step 5: Move Gitea to the Right Directory

Move the Gitea binary to the correct directory:

sudo mv gitea /usr/local/bin/

Step 6: Create Gitea Directories

Create the required directories for Gitea:

sudo mkdir -p /var/lib/gitea/{custom,data,log}

Set the ownership of these directories:

sudo chown -R gitea:gitea /var/lib/gitea/

Step 7: Create a Systemd Service File

Create a systemd service file for Gitea:

sudo nano /etc/systemd/system/gitea.service

Paste the following configuration into the file:

[Unit]
Description=Gitea
After=network.target

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

[Install]
WantedBy=multi-user.target

Step 8: Start and Enable Gitea Service

Reload the systemd daemon and start the Gitea service:

sudo systemctl daemon-reload
sudo systemctl start gitea
sudo systemctl enable gitea

Step 9: Access Gitea Web Interface

You can now access the Gitea web interface by navigating to http://your-server-ip:3000 in your web browser.

Conclusion

You have successfully installed Gitea on Debian 11. This self-hosted Git service will help you manage your repositories efficiently.

If you're looking for a reliable hosting solution for your Gitea service, consider using Windows VPS UK. With Windows VPS, you can efficiently host your applications and ensure high performance. Whether you need VPS UK Windows or Windows Virtual Private Servers, you'll find a solution that fits your requirements.

For larger deployments or enterprise needs, explore Windows Virtual Dedicated Server Hosting or Virtual Private Server Hosting Windows. Whether you're located in the UK, Italy, or elsewhere, Windows VPS Italy and UK VPS Windows offer reliable hosting options. Visit Windows VPS Hosting UK to discover the best hosting solutions for your needs.

  • 0 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Понудени резултати

Boost Your Ubuntu System's Performance with a Swap File: A Step-by-Step Guide

What is a Swap File? A swap file in Ubuntu serves as dedicated virtual memory on your hard...

How to Migrate ISPConfig 2, ISPConfig 3.x, Confixx, CPanel or Plesk to ISPConfig 3.2 (single server)

Introduction Migration from other control panels like ISPConfig 2, ISPConfig 3.x, Confixx,...

How to Install and Configure Zabbix Server and Client on Rocky Linux 9

Introduction Zabbix is an open-source monitoring solution that provides real-time...

How to Install CockroachDB Cluster on Debian 12

Introduction CockroachDB is a distributed SQL database built to handle large-scale,...

How to Install Joomla with Apache and Let's Encrypt SSL on AlmaLinux 9

Introduction Joomla is a popular open-source content management system (CMS) used to build...