Skip to main content

Gogs - Packages and further information

Category: Git

Installation using packages
The gogs developers are distributing packages via for Debian, Ubuntu and CentOS. Updates can be easily handled that way.

Using mailer with G-Suite-Account
I ran into some trouble with smtp-authentifaction. Configuring the SMTP-Relays solved this problem.

Configuring Apache as Reverse-Proxy
Listed below my vhost-config:

<VirtualHost *:80>

    ProxyPreserveHost On
    ProxyRequests off
    ProxyPass /
    ProxyPassReverse /

    RewriteEngine on
    RewriteCond %{SERVER_NAME}
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]

Using SSL-Certificates
Because the user running Gogs does not have access to the certificates, those are served by Apache. I'll may change this later. 

Changing Port
When using packages from, you need to make changes to /etc/default/gogs for defining a custom port.

//dafür ändern wir die Zeile
export PORT=${PORT:=6000}
export PORT=3000

Migrating existing repositories
Migration of existing GitHub-Repositories worked surprisingly easy and well.

To Repository