How to Install Gogs on Ubuntu 18.04


Easily deploy your favorite applications in seconds at an unbeatable price for your next projects.

Installing Gogs on Ubuntu 18.04

Gogs is a self-hosted Git service written in Go. It is lightweight and can be deployed on your own server, allowing you to have full control over your repositories and user management. Gogs supports all major operating systems and provides a web interface that includes essential features like repository management, collaborative pull requests, user/team management, and more.

Installation Steps:

Follow the steps below to install Gogs on Ubuntu 18.04:

sudo apt update
sudo apt upgrade
sudo apt install git mysql-server apt-transport-https
sudo mysql
CREATE DATABASE gogs CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'gogs'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON gogs.* TO 'gogs'@'localhost';
wget https://dl.gogs.io/0.12.3/gogs_0.12.3_linux_amd64.tar.gz
tar -xvf gogs_0.12.3_linux_amd64.tar.gz
cd gogs
cp custom/conf/app.ini{.sample,}
nano custom/conf/app.ini

Within the file, modify the following configuration:

DOMAIN = localhost (or your domain)
HTTP_PORT = 3000
ROOT_URL = http://localhost:3000/
sudo nano /etc/systemd/system/gogs.service

Paste the following content into the file:


ExecStart=/path/to/gogs/gogs web


Replace "/path/to/gogs" with the actual path to your Gogs installation directory.

sudo systemctl start gogs
sudo systemctl enable gogs

Follow the on-screen instructions to complete the Gogs setup process, including setting up an administrator account and connecting to the MySQL database.

  1. Update the system:
  2. Install Git, MySQL server, and other dependencies:
  3. Create a MySQL database and user:
  4. Download the Gogs binary:
  5. Extract the downloaded archive:
  6. Modify the app.ini file:
  7. Create a Gogs service:
  8. Start and enable the Gogs service:
  9. Open your browser and access your Gogs instance:
  10. After setup, you can access the Gogs interface and start creating repositories and managing users.

You have successfully installed Gogs on Ubuntu 18.04. Enjoy hosting your own Git service!

Refer A Friend
Get $25

Installing Gogs
Gogs installation
Gogs on Ubuntu 18.04
Ubuntu 18.04 Gogs installation
Gogs setup guide
How to install Gogs on Ubuntu 18.04
Gogs installation steps
Step-by-step Gogs installation on Ubuntu 18.04
Install Gogs on Ubuntu 18.04
Gogs installation tutorial

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.