How to Install Gitea on Ubuntu? 

Install Gitea on Ubuntu 

Install SQLite 

sudo apt install sqlite3 

Check the version 

sudo sqlite3 –version 

Install Git 

Check for system updates and install them. 

sudo apt update 

sudo apt upgrade 

Install the Git package 

sudo apt install git 

Check the version of Git installed 

sudo git –version 

Create a Git user 

Create a Git user with username as git with limited privileges. 

sudo adduser –system –shell /bin/bash –gecos ‘Git Version Control’ –group –disabled-password –home  /home/git git 

Download the Gitea binary 

sudo wget -O /tmp/gitea 

Move the Gitea binary file to ‘/usr/local/bin’. 

sudo mv /tmp/gitea /usr/local/bin 

Make the binary executable. 

sudo chmod +x /usr/local/bin/gitea 

Create the directory structure and set the required permissions and ownership. sudo mkdir -p /var/lib/gitea/{custom,data,indexers,public,log} 

sudo chown git: /var/lib/gitea/{data,indexers,log} 

sudo chmod 750 /var/lib/gitea/{data,indexers,log} 

sudo mkdir /etc/gitea 

sudo chown root:git /etc/gitea

sudo chmod 770 /etc/gitea 

Download the file to the “/etc/systemd/system/” directory 

sudo wget -P  /etc/systemd/system/  

Reload and enable the Gitea service 

sudo systemctl daemon-reload 

sudo systemctl enable gitea 

Check the status of the Gitea service 

sudo systemctl status gitea 

sudo systemctl start gitea 

IP address of the server 

sudo ip addr show 

Navigate to your browser. http://yourserver-ip-address:3000 


Database Settings: 

Database Type: SQLite3 

Path: Use an absolute path, /var/lib/gitea/data/gitea.db 

Application General Settings: 

Site Title: Enter your preferred site name or your company name here. 

Repository Root Path: default 

Git LFS Root Path: default 

Run As Username: default 

Server Domain: Enter your domain name or the IP address of the server. 

SSH Port: default 

Gitea HTTP Listen Port: default 

Gitea Base URL: Use http with your domain name or server IP address (example: 

Log Path: default

Optional Settings: 

Create an Administrator user account.

Click on Install button to Install and Configure Gitea

Once the installation completes, you will be logged in as the Administrator and navigated to dashboard.

Leave a Comment

Your email address will not be published. Required fields are marked *