From 0e6285a1ea6fead68d9ce67b870d713be1585749 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 12 Nov 2016 23:36:55 +0000 Subject: [PATCH] Separate gogs documentation --- doc/EN/app_gogs.org | 31 ++++ doc/EN/apps.org | 1 + doc/EN/usage.org | 24 +--- src/freedombone-app-gogs | 20 +++ website/EN/app_gogs.html | 300 +++++++++++++++++++++++++++++++++++++++ website/EN/apps.html | 141 +++++++++--------- website/EN/usage.html | 112 +++++---------- 7 files changed, 462 insertions(+), 167 deletions(-) create mode 100644 doc/EN/app_gogs.org create mode 100644 website/EN/app_gogs.html diff --git a/doc/EN/app_gogs.org b/doc/EN/app_gogs.org new file mode 100644 index 00000000..b9470069 --- /dev/null +++ b/doc/EN/app_gogs.org @@ -0,0 +1,31 @@ +#+TITLE: +#+AUTHOR: Bob Mottram +#+EMAIL: bob@freedombone.net +#+KEYWORDS: freedombone, gogs +#+DESCRIPTION: How to use Gogs +#+OPTIONS: ^:nil toc:nil +#+HTML_HEAD: + +#+BEGIN_CENTER +[[file:images/logo.png]] +#+END_CENTER + +#+BEGIN_EXPORT html +
+

Gogs

+
+#+END_EXPORT + +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 [[https://gogs.io][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. + +Navigate to your git 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: + +#+begin_src bash :tangle no +sudo username@domainname -p 2222 +#+end_src + +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. diff --git a/doc/EN/apps.org b/doc/EN/apps.org index 85d85f51..5a335003 100644 --- a/doc/EN/apps.org +++ b/doc/EN/apps.org @@ -43,6 +43,7 @@ Federated social network. You can "/remote follow/" other users within the GNU S * Gogs Lightweight git project hosting system. You can mirror projects from Github, or if Github turns evil then just host your own projects while retaining the familiar /fork-and-pull/ workflow. If you can use Github then you can also use Gogs. +[[./app_gogs.html][How to use it]] * HTMLy Databaseless blogging system. Quite simple and with a markdown-like format. diff --git a/doc/EN/usage.org b/doc/EN/usage.org index 468ad9e6..e0a5fed1 100644 --- a/doc/EN/usage.org +++ b/doc/EN/usage.org @@ -30,7 +30,7 @@ | [[./app_tox.html][Tox]] | | [[./app_mumble.html][Mumble]] | | [[./app_rss.html][RSS Reader]] | -| [[Git Projects]] | +| [[./app_gogs.html][Git Projects]] | | [[Adding or removing users]] | | [[Blocking Ads]] | @@ -100,28 +100,6 @@ ssh username@address.onion -p 2222 #+END_SRC Subsequently even if dynamic DNS isn't working you may still be able to administer your system. Using the onion address also gives you some degree of protection against corporate or government metadata analysis, since it becomes more difficult to passively detect which systems are communicating. -* Git Projects -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 happens. - -A Git hosting system called [[https://gogs.io][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. - -Navigate to your git 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: - -#+begin_src bash :tangle no -sudo username@domainname -p 2222 -#+end_src - -Select *Exit to the comand line*. - -#+begin_src bash :tangle no -sudo su -sed -i "s|DISABLE_REGISTRATION =.*|DISABLE_REGISTRATION = true|g" /home/gogs/custom/conf/app.ini -sed -i "s|SHOW_REGISTRATION_BUTTON =.*|SHOW_REGISTRATION_BUTTON = false|g" /home/gogs/custom/conf/app.ini -systemctl restart gogs -exit; exit -#+end_src - -This will stop any spam accounts being created by random strangers or bots. You might want to mirror existing repos, and at any time a mirror can be converted into the main repo. * Adding or removing users Log into the system with: diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs index 127eaa96..9175e877 100755 --- a/src/freedombone-app-gogs +++ b/src/freedombone-app-gogs @@ -64,6 +64,26 @@ function install_interactive_gogs { APP_INSTALLED=1 } +function configure_interactive_gogs { + dialog --title $"Gogs" \ + --backtitle $"Freedombone Control Panel" \ + --defaultno \ + --yesno $"\nAllow registration of new users?" 10 60 + sel=$? + case $sel in + 0) + sed -i "s|DISABLE_REGISTRATION =.*|DISABLE_REGISTRATION = false|g" /home/gogs/custom/conf/app.ini + sed -i "s|SHOW_REGISTRATION_BUTTON =.*|SHOW_REGISTRATION_BUTTON = true|g" /home/gogs/custom/conf/app.ini + ;; + 1) + sed -i "s|DISABLE_REGISTRATION =.*|DISABLE_REGISTRATION = true|g" /home/gogs/custom/conf/app.ini + sed -i "s|SHOW_REGISTRATION_BUTTON =.*|SHOW_REGISTRATION_BUTTON = false|g" /home/gogs/custom/conf/app.ini + ;; + 255) return;; + esac + systemctl restart gogs +} + function change_password_gogs { echo -n '' } diff --git a/website/EN/app_gogs.html b/website/EN/app_gogs.html new file mode 100644 index 00000000..caa26b20 --- /dev/null +++ b/website/EN/app_gogs.html @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+

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. +

+ +

+Navigate to your git 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. +

+
+
+ + + + +
+ + diff --git a/website/EN/apps.html b/website/EN/apps.html index 1ec8ad17..99cedb11 100644 --- a/website/EN/apps.html +++ b/website/EN/apps.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -257,9 +257,9 @@ The base install of the system just contains an email server and Mutt client, bu -
-

DLNA

-
+
+

DLNA

+

Enables you to use the system as a music server which any DLNA compatible devices can connect to within your home network.

@@ -269,45 +269,45 @@ Enables you to use the system as a music server which any DLNA compatible device

-
-

Dokuwiki

-
+
+

Dokuwiki

+

A databaseless wiki system.

-
-

Emacs

-
+
+

Emacs

+

If you use the Mutt client to read your email then this will set it up to use emacs for composing new mail.

-
-

Etherpad

-
+
+

Etherpad

+

Collaborate on creating documents in real time. Maybe you're planning a holiday with other family members or creating documentation for a Free Software project along with other volunteers. Etherpad is hard to beat for simplicity and speed. Only users of the system will be able to access it.

-
-

Ghost

-
+
+

Ghost

+

Modern looking blogging system.

-
-

GNU Social

-
+
+

GNU Social

+

Federated social network. You can "remote follow" other users within the GNU Social federation.

@@ -317,27 +317,30 @@ Federated social network. You can "remote follow" other users within the

-
-

Gogs

-
+
+

Gogs

+

Lightweight git project hosting system. You can mirror projects from Github, or if Github turns evil then just host your own projects while retaining the familiar fork-and-pull workflow. If you can use Github then you can also use Gogs.

-
-
-
-

HTMLy

- +
+
+

HTMLy

+

Databaseless blogging system. Quite simple and with a markdown-like format.

-
-

Hubzilla

-
+
+

Hubzilla

+

Web publishing platform with social network like features and good privacy controls so that it's possible to specify who can see which content. Includes photo albums, calendar, wiki and file storage.

@@ -347,9 +350,9 @@ Web publishing platform with social network like features and good privacy contr

-
-

IRC Server (ngirc)

-
+
+

IRC Server (ngirc)

+

Run your own IRC chat channel which can be secured with a password and accessible via an onion address. A bouncer is included so that you can receive messages sent while you were offline. Works with Hexchat and other popular clients.

@@ -359,36 +362,36 @@ Run your own IRC chat channel which can be secured with a password and accessibl

-
-

Jitsi Meet

-
+
+

Jitsi Meet

+

Experimental WebRTC video conferencing system, similar to Google Hangouts. This may not be fully functional, but is hoped to be in the near future.

-
-

Lychee

-
+
+

Lychee

+

Make your photo albums available on the web.

-
-

Mailpile

-
+
+

Mailpile

+

Modern email client which supports GPG encryption.

-
-

Mumble

-
+
+

Mumble

+

The popular VoIP and text chat system. Say goodbye to old-fashioned telephony conferences with silly dial codes. Also works well on mobile.

@@ -398,36 +401,36 @@ The popular VoIP and text chat system. Say goodbye to old-fashioned telephony co

-
-

PI-Hole

-
+
+

PI-Hole

+

The black hole for web adverts. Block adverts at the domain name level within your local network. It can significantly reduce bandwidth, speed up page load times and protect your systems from being tracked by spyware.

-
-

PostActiv

-
+
+

PostActiv

+

An alternative federated social networking system compatible with GNU Social. It includes some optimisations and fixes currently not available within the main GNU Social project.

-
-

Radicale

-
+
+

Radicale

+

Calendar system compatible with CalDAV and CardDAV. Manage your calendar events easily across all your devices.

-
-

tt-rss

-
+
+

tt-rss

+

Private RSS reader. Pulls in RSS/Atom feeds via Tor and is only accessible via an onion address. Have "the right to read" without the Surveillance State knowing what you're reading. Also available with a user interface suitable for viewing on mobile devices via a browser such as OrFox.

@@ -437,9 +440,9 @@ Private RSS reader. Pulls in RSS/Atom feeds via Tor and is only accessible via a

-
-

Syncthing

-
+
+

Syncthing

+

Possibly the best way to synchronise files across all of your devices. Once it has been set up it "just works" with no user intervention needed.

@@ -449,9 +452,9 @@ Possibly the best way to synchronise files across all of your devices. Once it h

-
-

Tox

-
+
+

Tox

+

Client and bootstrap node for the Tox chat/VoIP system.

@@ -461,18 +464,18 @@ Client and bootstrap node for the Tox chat/VoIP system.

-
-

Vim

-
+
+

Vim

+

If you use the Mutt client to read your email then this will set it up to use vim for composing new mail.

-
-

XMPP

-
+
+

XMPP

+

Chat server which can be used together with client such as Gajim or Conversations to provide end-to-end content security and also onion routed metadata security. Includes advanced features such as client state notification to save battery power on your mobile devices, support for seamless roaming between networks and message carbons so that you can receive the same messages while being simultaneously logged in to your account on more than one device.

diff --git a/website/EN/usage.html b/website/EN/usage.html index 8cda914b..db61a075 100644 --- a/website/EN/usage.html +++ b/website/EN/usage.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -255,15 +255,15 @@ for the JavaScript code in this tag. -Readme +Readme -Improving ssh security +Improving ssh security -Administrating the system via an onion address (Tor) +Administrating the system via an onion address (Tor) @@ -311,22 +311,22 @@ for the JavaScript code in this tag. -Git Projects +Git Projects -Adding or removing users +Adding or removing users -Blocking Ads +Blocking Ads -
-

Readme

-
+
+

Readme

+

After the system has installed a README file will be generated which contains passwords and some brief advice on using the installed systems. You can read this with the following commands:

@@ -346,9 +346,9 @@ To exit you can either just close the terminal or use CTRL-x CTRL-c follo

-
-

Improving ssh security

-
+
+

Improving ssh security

+

To improve ssh security you can generate an ssh key pair on your system and then upload the public key to the Freedombone.

@@ -398,9 +398,9 @@ If you wish to only use ssh keys then log in to the Freedombone, become the root
-
-

Administrating the system via an onion address (Tor)

-
+
+

Administrating the system via an onion address (Tor)

+

You can also access your system via the Tor system using an onion address. To find out what the onion address for ssh access is you can do the following:

@@ -442,47 +442,9 @@ Subsequently even if dynamic DNS isn't working you may still be able to administ

-
-

Git Projects

-
-

-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 happens. -

- -

-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. -

- -

-Navigate to your git 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 Exit to the comand line. -

- -
-
sudo su
-sed -i "s|DISABLE_REGISTRATION =.*|DISABLE_REGISTRATION = true|g" /home/gogs/custom/conf/app.ini
-sed -i "s|SHOW_REGISTRATION_BUTTON =.*|SHOW_REGISTRATION_BUTTON = false|g" /home/gogs/custom/conf/app.ini
-systemctl restart gogs
-exit; exit
-
-
- -

-This will stop any spam accounts being created by random strangers or bots. You might want to mirror existing repos, and at any time a mirror can be converted into the main repo. -

-
-
-
-

Adding or removing users

-
+
+

Adding or removing users

+

Log into the system with:

@@ -510,9 +472,9 @@ control
-
-

Blocking Ads

-
+
+

Blocking Ads

+

Everyone except for advertisers hates adverts. Not only are they annoying, but they can consume a lot of bandwidth, be a privacy problem in terms of allowing companies to track your browsing habits and also any badly written scripts they contain may introduce exploitable security holes. Also if you're poor then adverts often make you want things that you can't have.

@@ -526,9 +488,9 @@ Also don't expect perfection. Though many ads may be blocked by this system some

-
-

Set a static IP address

-
+
+

Set a static IP address

+

Ensure that your system has a static local IP address (typically 192.168..) using the option on the control panel. You will also need to know the IP address of your internet router, which is usually 192.168.1.1 or 192.168.1.254.

@@ -539,9 +501,9 @@ When that's done select About this system from the control panel and see
-
-

On each client system within your local network

-
+
+

On each client system within your local network

+
sudo chattr -i /etc/resolv.conf
 sudo nano /etc/resolv.conf
@@ -568,9 +530,9 @@ Normally resolv.conf will be overwritten every time your reboot, but you
 
-
-

On your internet router

-
+
+

On your internet router

+

If you can access the settings on your local internet router then this is the simplest way to provide ad blocking for all devices which connect to it. Unfortunately some router models don't let you edit the DNS settings and if that's the case you might want to consider getting a different router.

@@ -580,9 +542,9 @@ Edit the DNS settings and add the IPv4 address which you got from the control pa

-
-

LibreCMC

-
+
+

LibreCMC

+

On a router running LibreCMC from the Network menu select DHCP and DNS. Enter the static IP address of your Freedombone system within DNS Forwardings, then at the bottom of the page click on Save & Apply. Any devices which connect to your router will now have ad blocking.

@@ -590,9 +552,9 @@ On a router running LibreCMC from the Network menu select DHCP and DNS
-
-

Configuring block lists

-
+
+

Configuring block lists

+

You can configure the block lists which the system uses by going to the administrator control panel, selecting App Settings then choosing pihole. You can also add any extra domain names to the whitelist if they're being wrongly blocked or to the blacklist if they're not blocked by the current lists.