Setup and install Gitea on Ubuntu 22.04. Gitea is a lightweight, self-hosted Git service that provides a simple and powerful platform for managing Git repositories, project collaboration, and code review. An alternative to GitHub, GitLab, and Bitbucket. Built to be fast and easy to set up, Gitea offers a web-based interface for repository hosting and management, making it ideal for teams of all sizes. Deploy on any of the cloud IaaS platforms using our Gitea server image from the marketplace. Deployment links below.
Cloud Gitea Self-Hosted
Gitea on Azure
Deploy Gitea on Ubuntu 22.04 on Azure
Gitea on AWS
Coming soon..
Gitea on GCP
Coming soon..
Getting Started with Gitea Server
Once your Gitea server has been deployed, the following links explain how to connect to a Linux VM:
Once connected and logged in, the following section explains how to start using Gitea server.
Setup Gitea MySQL Database
Step 1: Set MySQL Root Password
First step is to set the MySQL root password:
sudo mysql_secure_installation
This command will guide you through a series of prompts:
Set root password: If you haven’t set a password, it will prompt you to do so. The current password is blank, simply hit enter when it asks for the current password.
Other security-related options: You can choose to remove anonymous users, disable root login remotely, and remove the test database.
Step 2: Create a Gitea Database and User
After setting the MySQL root password, follow these steps to create a dedicated database and user for Gitea:
Log in to MySQL:
sudo mysql -u root -p
2. Create a database for Gitea:
CREATE DATABASE gitea;
3. Create a user for Gitea and grant privileges: Replace <password> with a secure password for the Gitea user.
CREATE USER 'giteauser'@'localhost' IDENTIFIED BY '';
GRANT ALL PRIVILEGES ON gitea.* TO 'giteauser'@'localhost';
FLUSH PRIVILEGES;
4. Exit MySQL:
EXIT;
Accessing Gitea Web Interface
Once Gitea is running, you can access the web interface using a browser.
Open a browser and go to:
http://:3000
Replace <your-server-ip> with the public or private IP address of your server.
2. Initial Setup Screen:
The first time you access Gitea, you will see the Initial Setup screen. Here, you can configure basic settings.
Initial Configuration of Gitea
On the Initial Configuration page, you need to set up some essential settings for Gitea:
2.1 Database Settings:
Database Type: Choose MySQL (MariaDB).
Host: 127.0.0.1:3306
Database Name: gitea
User: giteauser
Password: The MySQL giteauser user password we created earlier.
SSL Mode: disable (unless you’re using SSL for the database connection).
If you need assistance with getting your VM setup and working please contact us for support requests.
Disclaimer: Gitea is licensed under the MIT License. The license comes with a “no warranty” clause, meaning the software is provided “as-is” without any guarantees or liability for issues that may arise.
Cloud Solution Architect. Helping customers transform their business to the cloud. 20 years experience working in complex infrastructure environments and a Microsoft Certified Solutions Expert on everything Cloud.
00votes
Article Rating
Subscribe
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.