freedomboneeee/doc/EN/app_gogs.org

3.0 KiB

/free/freedomboneeee/src/commit/1bfe5e96349c58585c40a96e25517e83307304bf/doc/EN/images/logo.png

Gogs

Github is ok, but it's proprietary and funded by venture capital. If you been around on the internet for long enough then you know how this story eventually works itself out - i.e. badly for the users. It's really only a question of time. If you're a software developer or do things which involve the Git version control system then it's a good idea to become accustomed to hosting your own repositories, before the inevitable Github shitstorm occurs.

A Git hosting system called Gogs can optionally be installed. This is very similar to Github in appearance and use. It's lightweight and so well suited for use on low power ARM servers.

Installation

Log into your system with:

ssh myusername@mydomain -p 2222

Using cursor keys, space bar and Enter key select Administrator controls and type in your password.

Select Add/Remove Apps then gogs. You will then be asked for a domain name and if you are using FreeDNS also the code for the domain which can be found under Dynamic DNS on the FreeDNS site (the random string from "quick cron example" which appears after update.php? and before >>). For more details on obtaining a domain and making it accessible via dynamic DNS see the FAQ. Typically the domain name you use will be a subdomain, such as code.mydomainname.net. It will need to be a domain which you have bought somewhere and own and not one of the FreeDNS subdomains, otherwise you won't be able to get a SSL/TLS certificate for it.

After the install has completed go to Security settings and select Create a new Let's Encrypt certificate and enter the domain name that you are using for Gogs. If you're using the "onion only" version of the system then you don't need to do this. If the certificate is obtained successfully then you will see a congratulations message.

Initial setup

If you have just obtained a Lets Encrypt certificate as above then go to About on the administrator control panel and you should see your Gogs domain listed there along with an onion address. You can then navigate to your site in a browser.

In a browser navigate to your Gogs site and click the Register button. The first user registered on the system becomes the administrator. Once you've done that then it's a good idea to disable further registrations. Currently that's a little complicated, but you can do it as follows:

sudo username@domainname -p 2222

Select Administrator controls then App Settings then gogs. You can then enable or disable registration of new users.

Disabling further registrations will stop any spam accounts being created by random strangers or bots.