Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install Gogs from binary on VestaCP panel

Install Gogs from binary on VestaCP

This tutorial was written based on Ubuntu 14.04 with VestaCP.

For this example, I created user cooler, domain and database cooler_repo on VestaCP panel.

To install Gogs, you will need to use user with admin rights, on my tutorial I'm using default admin user from VestaCP.

1 - install supervisor.

$ sudo apt-get -y install supervisor

2 - Go to your domain root and download latest Gogs binary. To see latest build, go to and get correct link.

$ cd /home/coller/web/
/home/coller/web/$ sudo wget
/home/coller/web/$ sudo tar -zxvf gogs_v0.9.13_linux_amd64.tar.gz

3 - Create folder to contain git repositories and apply correct user permissions.

/home/coller/web/$ sudo mkdir gogs-repositories
/home/coller/web/$ sudo chown cooler. gogs gogs-repositories

4 - Create supervisor config for Gogs with your favorite editor.

$ sudo vim /etc/supervisor/conf.d/gogs.conf

Note: look that in my config I'm using my user cooler and domain examples.

command=/home/cooler/web/ web
environment = HOME="/home/cooler", USER="cooler"
user = cooler

5 - Create reverse proxy config for Gogs on your domain with your favorite editor.

$ sudo vim /home/cooler/conf/web/
ProxyRequests Off
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/

6 - Enable apache proxy modules and restart apache and supervisor.

$ sudo a2enmod proxy
$ sudo a2enmod proxy_http
$ sudo service supervisor restart
$ sudo service apache2 restart

7 - Open domain in your browser and configure your Gogs as example below:

Gogs 1

8 - After this, click on "Install Gogs" and done, your Gogs is ready as example below:

Gogs 2

Copy link

khyoz commented Jun 4, 2018


Copy link

joubertredrat commented Jun 22, 2018

@khyoz need help?

Copy link

ameeno commented Sep 26, 2018

getting error 500's and stuff, it does not work well. will try gittea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment