In this tutorial, we will show you how to install Gitea on Ubuntu 18.04 LTS. For those of you who didn’t know, Gitea is a free, open-source and self-hosted version control system alternative to GitHub and GitLab. Gitea comes with a rich set of features including time tracking, repository branching, issues tracking, file locking, merging, and much more. Gitea can be installed on all popular operating systems like Windows, macOS, Linux, and ARM.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Mono on Ubuntu 18.04 server.
Install Gitea on Ubuntu 18.04 LTS
Step 1. First, make sure that all your system packages are up-to-date by running these following apt commands in the terminal.
Install Git on your server using the following command:
First, you will need to download the latest version of the Gitea binary from Git repository. You can download it with the following command:
Copy the binary to a global location:
Make the binary executable:
Next, create the directories and set the required permissions and ownership:
Next, you will need to create a systemd service file to manage the Gitea service. You can create it with the following command:
sudowgethttps://raw.githubusercontent.com/go-gitea/gitea/master/contrib/systemd/gitea.service -P /etc/systemd/system/
Then, enable and start the Gitea service:
By default, Gitea listens for connections on port 3000 on all network interfaces, Open your browser, type http://YOUR_DOMAIN_OR_IP_ADDRESS:3000
- Database Type: SQLite3
- Path: Use an absolute path,
Application General Settings:
- Site Title: Enter your organization name.
- Repository Root Path: Leave the default
- Git LFS Root Path: Leave the default
- Run As Username: git
- SSH Server Domain: Enter your domain or server IP address.
- SSH Port: 22, change it if SSH is listening on other Port
- Gitea HTTP Listen Port: 3000
- Gitea Base URL: Use http and your domain or server IP address.
- Log Path: Leave the default
Once installation complete, hit the “Install Gitea” button. The installation is instant. When completed you will be redirected to the login page.
Congratulations! You have successfully installed Gitea. Thanks for using this tutorial for installing Gitea on your Ubuntu 18.04 LTS system. For additional help or useful information, we recommend you to check the official Gitea website.