• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Debian

Setup Gogs on Linux

How VPS by How VPS
November 1, 2019
in Debian
0
0
SHARES
17
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Using a Different System?
  2. Introduction
  3. Requirements
  4. Install pre-requirements
  5. Download Gogs
  6. Run Gogs
  7. Setup Nginx
  8. Configuring Gogs
  9. Want to contribute?

Using a Different System?

  • Setup Gogs on Debian 9 or Ubuntu 16.04

Are we missing a guide for your target system? Request one, or submit your own!


Introduction

Gogs ( Go Git Service ) is a painless self-hosted Git service. The setup is very easy and it runs on almost every platform that supports Go. Gogs is fully written in the Go-Lang and published as open source.

Requirements

  • Nginx ( reverse proxy )
  • Go-Lang installed or self-compiled
  • MySQL or SQLite Database

Install pre-requirements

apt-get update
apt-get install golang nginx

Download Gogs

cd /opt/
wget https://dl.gogs.io/gogs_v0.9.13_linux_amd64.zip
unzip gogs_v0.9.13_linux_amd64.zip

Run Gogs

After downloading Gogs, we can already start running it using the included webserver.

 cd /opt/gogs/
 ./gogs web -port 10000

Setup Nginx

Because we don’t want to use the included Gogs webserver, we’ll use Nginx as forwarding proxy. Copy the default Nginx config server-block ( /etc/nginx/sites-enabled/default ) to /etc/nginx/sites-enabled/gogs and remove this part:

    location / {
            # First attempt to serve request as file, then
            # as directory, then fall back to displaying a 404.
            try_files $uri $uri/ /index.html;
            # Uncomment to enable naxsi on this location
            # include /etc/nginx/naxsi.rules
    }

Because Nginx would do nothing, we have to add the reverse-proxy part:

   location / {
            proxy_pass http://127.0.0.1:10000;
    }

After these steps, we can customize server-name, listen, or anything else we want in the Nginx config.

Configuring Gogs

After starting Gogs and Nginx, it redirects us to a setup page. We need a working MySQL Server for Gogs, because it stores the users in a database. We installed MySQL earlier, so let’s create a new database called “gogs” and a new user called “gogs” and use those credentials in the Gogs configuration. But keep in mind, Gogs also supports other database types, MySQL is just the easiest one to setup.

Enjoy your new Gogs setup on Debian!

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How to Install Omeka Classic 2.4 CMS on a Debian 9 LAMP VPS

Next Post

How to Install Open Web Analytics on Debian 9

Next Post

How to Install Open Web Analytics on Debian 9

Leave a Reply Cancel reply

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

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet