How to Install Gitea on Ubuntu 26.10
Gitea is a lightweight, open-source Git hosting platform that provides Git repositories, issue tracking, pull requests, code reviews, and project wikis.
This guide explains how to install the latest stable Gitea release, configure SQLite, set up a systemd service, and complete the initial installation through a web browser.
Prerequisites
- Ubuntu 26.10 VPS with root or sudo access.
- A public IP address or domain name.
- Git and
wget. - Port 3000 accessible during the initial setup.
Update the System
Update the package lists and install the required packages.
apt update
apt upgrade -y
apt install -y git wget sqlite3
Check the Git version:
git --version
Output:
git version 2.55.0
Download and Install Gitea
Download the latest stable release. The version used in this guide is Gitea 1.27.3.
cd /tmp
wget -O gitea https://dl.gitea.com/gitea/1.27.3/gitea-1.27.3-linux-amd64
Make the binary executable and install it:
chmod +x gitea
install -m 0755 gitea /usr/local/bin/gitea
Verify the installation:
gitea --version
Output:
gitea version 1.27.3 built with go1.26.7-X:jsonv2 : bindata
Create the Git User
Create a dedicated system user to run Gitea.
id git >/dev/null 2>&1 || adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git
Create the Git user's home directory if required:
mkdir -p /home/git
chown git:git /home/git
Create the Required Directories
Create the directories used by Gitea for application data, repositories, logs, and configuration.
mkdir -p /var/lib/gitea/{custom,data,indexers,log}
chown -R git:git /var/lib/gitea
chmod -R 750 /var/lib/gitea
Create the configuration directory:
mkdir -p /etc/gitea
chown root:git /etc/gitea
chmod 770 /etc/gitea
The configuration directory is temporarily writable by the git group so the web installer can create /etc/gitea/app.ini. Restrict its permissions after completing the installation.
Configure the Gitea Systemd Service
Download the official systemd service file from the Gitea repository.
wget https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/service/systemd/gitea.service -O /etc/systemd/system/gitea.service
Reload systemd and enable the service:
systemctl daemon-reload
systemctl unmask gitea
systemctl enable gitea
Start Gitea:
systemctl start gitea
Check the service status:
systemctl status gitea --no-pager
If the service fails because /etc/gitea/app.ini does not exist or cannot be accessed, confirm that the directory permissions are set to 770 and that it is owned by root:git. Then restart the service:
systemctl reset-failed gitea
systemctl restart gitea
Do not create an empty app.ini file. The web installer will create the configuration file.
Configure the Firewall
If UFW is enabled, allow the initial web interface port:
ufw allow 3000/tcp
If your VPS uses an external firewall, security group, or provider-level filtering, allow TCP port 3000 there as well.
Complete the Gitea Installation
Open the following URL in your browser, replacing YOUR_SERVER_IP with your VPS IP address:
http://YOUR_SERVER_IP:3000
The Gitea installation page should appear.
Configure the following settings.
Database Settings
- Database Type: SQLite3
- Path:
/var/lib/gitea/data/gitea.db

SQLite is suitable for small installations and does not require a separate database server.
General Settings
- Site Title: Gitea
- Repository Root Path:
/var/lib/gitea/data/gitea-repositories - Git LFS Root Path:
/var/lib/gitea/data/lfs - Run As Username:
git - Server Domain: Your VPS IP address or domain name
- SSH Server Port:
22, if using the system SSH server - HTTP Listen Port:
3000 - Gitea Base URL:
http://YOUR_SERVER_IP:3000/

If you are using a domain name, enter that domain in the server domain field and set the base URL to the corresponding URL. If you intend to use HTTPS through a reverse proxy, configure the HTTPS URL instead.
Keep the remaining settings at their defaults unless your deployment requires otherwise.
Review the settings and click Install Gitea.
Create the Administrator Account
After the installation finishes, create the first administrator account on the Gitea interface.
Use a strong password and a valid email address. The first account can be created through the initial setup interface.

Once complete, sign in to access the Gitea dashboard and create repositories.

Secure the Configuration File
After the web installer creates /etc/gitea/app.ini, restrict access to the configuration directory and file.
chown root:git /etc/gitea
chmod 750 /etc/gitea
chown root:git /etc/gitea/app.ini
chmod 640 /etc/gitea/app.ini
Ensure that Gitea can write to its data directories:
chown -R git:git /var/lib/gitea/data
chown -R git:git /var/lib/gitea/indexers
chown -R git:git /var/lib/gitea/log
Restart Gitea to apply the final configuration:
systemctl restart gitea
Verify the Installation
Check the service status:
systemctl status gitea --no-pager
Check whether Gitea is listening on port 3000:
ss -lntp | grep ':3000'
If the service is not running, inspect its logs:
journalctl -u gitea -n 50 --no-pager
Access Gitea
Open the following address in your browser:
http://YOUR_SERVER_IP:3000
You can now create Git repositories, manage users, and collaborate on software projects using Gitea.
Optional: Configure a Reverse Proxy
For production use, you can configure Nginx or another reverse proxy to provide HTTPS access through a domain name. Update Gitea's DOMAIN and ROOT_URL settings in /etc/gitea/app.ini to match your domain and public HTTPS URL.
After changing the configuration, restart Gitea:
systemctl restart gitea
Conclusion
Gitea is now installed on Ubuntu 26.10 and configured to run as a systemd service with SQLite. The service starts automatically at boot, and its repositories and application data are stored under /var/lib/gitea.
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS