From 2cc5b6987eb2eb7e8ea8f6fbe0a2493347fbc33f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Jan 2018 18:38:00 +0000 Subject: [PATCH 1/4] Enable font-awesome with fedwiki --- src/freedombone-app-fedwiki | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/freedombone-app-fedwiki b/src/freedombone-app-fedwiki index a08064f7..866cb350 100755 --- a/src/freedombone-app-fedwiki +++ b/src/freedombone-app-fedwiki @@ -54,8 +54,15 @@ fedwiki_variables=(FEDWIKI_DOMAIN_NAME MY_EMAIL_ADDRESS) function fedwiki_remove_bad_links { - if [ -f /usr/local/lib/node_modules/wiki/node_modules/wiki-security-friends/client/security.js ]; then - sed -i 's|maxcdn.bootstrapcdn.com|localhost|g' /usr/local/lib/node_modules/wiki/node_modules/wiki-security-friends/client/security.js + if [[ $ONION_ONLY == 'no' ]]; then + sed -i "s|link[href='https://maxcdn.bootstrapcdn.com.*|link[href='https://${FEDWIKI_DOMAIN_NAME}/fonts-font-awesome/css/font-awesome.min.css']\").length) {|g" /usr/local/lib/node_modules/wiki/node_modules/wiki-security-friends/client/security.js + + sed -i "s|\$('').appendTo(\"head\");|g" /usr/local/lib/node_modules/wiki/node_modules/wiki-security-friends/client/security.js + else + FEDWIKI_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_fedwiki/hostname) + sed -i "s|link[href='https://maxcdn.bootstrapcdn.com.*|link[href='http://${FEDWIKI_ONION_HOSTNAME}/fonts-font-awesome/css/font-awesome.min.css']\").length) {|g" /usr/local/lib/node_modules/wiki/node_modules/wiki-security-friends/client/security.js + + sed -i "s|\$('').appendTo(\"head\");|g" /usr/local/lib/node_modules/wiki/node_modules/wiki-security-friends/client/security.js fi if [ -f /usr/local/lib/node_modules/wiki/node_modules/localforage/docs/theme/style.css ]; then @@ -333,6 +340,10 @@ function fedwiki_setup_web { echo ' add_header X-Content-Type-Options nosniff;' >> $fedwiki_nginx_file echo ' add_header Strict-Transport-Security max-age=15768000;' >> $fedwiki_nginx_file echo '' >> $fedwiki_nginx_file + echo ' location /fonts-font-awesome/ {' >> $fedwiki_nginx_file + echo ' alias /usr/share/fonts-font-awesome/;' >> $fedwiki_nginx_file + echo ' }' >> $fedwiki_nginx_file + echo '' >> $fedwiki_nginx_file echo ' location / {' >> $fedwiki_nginx_file echo " proxy_pass http://localhost:${FEDWIKI_PORT};" >> $fedwiki_nginx_file echo ' proxy_set_header X-Real-IP $remote_addr;' >> $fedwiki_nginx_file @@ -354,6 +365,10 @@ function fedwiki_setup_web { echo ' add_header X-Frame-Options DENY;' >> $fedwiki_nginx_file echo ' add_header X-Content-Type-Options nosniff;' >> $fedwiki_nginx_file echo '' >> $fedwiki_nginx_file + echo ' location /fonts-font-awesome/ {' >> $fedwiki_nginx_file + echo ' alias /usr/share/fonts-font-awesome/;' >> $fedwiki_nginx_file + echo ' }' >> $fedwiki_nginx_file + echo '' >> $fedwiki_nginx_file echo ' location / {' >> $fedwiki_nginx_file echo " proxy_pass http://localhost:${FEDWIKI_PORT};" >> $fedwiki_nginx_file echo ' proxy_set_header X-Real-IP $remote_addr;' >> $fedwiki_nginx_file @@ -401,6 +416,8 @@ function install_fedwiki { function_check install_nodejs install_nodejs fedwiki + apt-get -yq install fonts-font-awesome + npm install -g wiki@$FEDWIKI_VERSION if [ ! "$?" = "0" ]; then echo $'Failed to install fedwiki' From 6ee54cde6f427494ed55c5e3f8bc06d75429c665 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Jan 2018 21:25:27 +0000 Subject: [PATCH 2/4] Federated wiki documentation --- doc/EN/app_fedwiki.org | 48 ++++++ doc/EN/apps.org | 4 + website/EN/app_fedwiki.html | 332 ++++++++++++++++++++++++++++++++++++ website/EN/apps.html | 248 ++++++++++++++------------- 4 files changed, 514 insertions(+), 118 deletions(-) create mode 100644 doc/EN/app_fedwiki.org create mode 100644 website/EN/app_fedwiki.html diff --git a/doc/EN/app_fedwiki.org b/doc/EN/app_fedwiki.org new file mode 100644 index 00000000..9e94bfb1 --- /dev/null +++ b/doc/EN/app_fedwiki.org @@ -0,0 +1,48 @@ +#+TITLE: +#+AUTHOR: Bob Mottram +#+EMAIL: bob@freedombone.net +#+KEYWORDS: freedombone, fedwiki +#+DESCRIPTION: How to use Federated Wiki +#+OPTIONS: ^:nil toc:nil +#+HTML_HEAD: + +#+BEGIN_CENTER +[[file:images/logo.png]] +#+END_CENTER + +#+BEGIN_EXPORT html +
+

Federated Wiki

+
+#+END_EXPORT + +Federated wikis are a relatively new concept. There can be multiple copies of the same page on different servers and it's then easy to pick which version you prefer, or make something new. It's like wiki meets mashup meets federation, and so is different from many previous web paradigms and may take some recalibration of how you think the web should work. + +* Installation +Log into your system with: + +#+begin_src bash +ssh myusername@mydomain -p 2222 +#+end_src + +Using cursor keys, space bar and Enter key select *Administrator controls* and type in your password. + +Select *Add/Remove Apps* then *fedwiki*. 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.html][FAQ]]. Typically the domain name you use will be a subdomain, such as /wiki.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. + + +* Usage +First you'll need to get the login password, which can be found on the *Administrator control panel* under *Passwords* then *fedwiki*. + +Navigate to your wiki site then click on the *lock icon* at the bottom of the screen and enter the password. It should then appear unlocked. If you don't unlock then any edits you make won't be saved. + +There are a few things to know about using the federated wiki. + + * You can edit by clicking on the *wiki* button at the bottom of the screen + * To edit a paragraph double click on it + * To remove a paragraph just delete all of its text + * Paragraphs can be dragged up and down to change their order, or moved between pages + * To add a new paragraph use the *+* button + * You can use left and right cursor keys to move through pages + * To claim/fork a page from another server click on the flag icon + * When done editing click on the *wiki* button again + * Different versions of the same page on different servers are represented by boxes at the bottom right of the screen. You can double click on them to see the different versions, and use the flag icon to fork if you prefer that version diff --git a/doc/EN/apps.org b/doc/EN/apps.org index 79fbb4b0..1b971881 100644 --- a/doc/EN/apps.org +++ b/doc/EN/apps.org @@ -49,6 +49,10 @@ If you use the Mutt client to read your email then this will set it up to use em 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. [[./app_etherpad.html][How to use it]] +* Federated wiki +A new approach to creating wiki content. + +[[./app_fedwiki.html][How to use it]] * Friendica Federated social network system. diff --git a/website/EN/app_fedwiki.html b/website/EN/app_fedwiki.html new file mode 100644 index 00000000..05a13b65 --- /dev/null +++ b/website/EN/app_fedwiki.html @@ -0,0 +1,332 @@ + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+

logo.png +

+
+
+ +
+

Federated Wiki

+
+ +

+Federated wikis are a relatively new concept. There can be multiple copies of the same page on different servers and it's then easy to pick which version you prefer, or make something new. It's like wiki meets mashup meets federation, and so is different from many previous web paradigms and may take some recalibration of how you think the web should work. +

+ +
+

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

+
+
+ + +
+

Usage

+
+

+First you'll need to get the login password, which can be found on the Administrator control panel under Passwords then fedwiki. +

+ +

+Navigate to your wiki site then click on the lock icon at the bottom of the screen and enter the password. It should then appear unlocked. If you don't unlock then any edits you make won't be saved. +

+ +

+There are a few things to know about using the federated wiki. +

+ +
    +
  • You can edit by clicking on the wiki button at the bottom of the screen
  • +
  • To edit a paragraph double click on it
  • +
  • To remove a paragraph just delete all of its text
  • +
  • Paragraphs can be dragged up and down to change their order, or moved between pages
  • +
  • To add a new paragraph use the + button
  • +
  • You can use left and right cursor keys to move through pages
  • +
  • To claim/fork a page from another server click on the flag icon
  • +
  • When done editing click on the wiki button again
  • +
  • Different versions of the same page on different servers are represented by boxes at the bottom right of the screen. You can double click on them to see the different versions, and use the flag icon to fork if you prefer that version
  • +
+
+
+
+
+ + + + +
+ + diff --git a/website/EN/apps.html b/website/EN/apps.html index ee6e43eb..fc4b454a 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"> - + @@ -265,9 +265,9 @@ The base install of the system just contains an email server and Mutt client, bu -
-

Akaunting

-
+
+

Akaunting

+

A web based accounts system for small businesses or freelancers.

@@ -277,9 +277,9 @@ A web based accounts system for small businesses or freelancers.

-
-

CryptPad

-
+
+

CryptPad

+

Collaborate on editing documents, presentations and source code, or vote on things. All with a good level of security.

@@ -289,9 +289,9 @@ Collaborate on editing documents, presentations and source code, or vote on thin

-
-

DLNA

-
+
+

DLNA

+

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

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

-
-

Dokuwiki

-
+
+

Dokuwiki

+

A databaseless wiki system.

@@ -313,9 +313,9 @@ 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.

@@ -325,9 +325,9 @@ If you use the Mutt client to read your email then this will set it up to use em

-
-

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.

@@ -337,9 +337,21 @@ Collaborate on creating documents in real time. Maybe you're planning a holiday

-
-

Friendica

-
+
+

Federated wiki

+
+

+A new approach to creating wiki content. +

+ +

+How to use it +

+
+
+
+

Friendica

+

Federated social network system.

@@ -349,9 +361,9 @@ Federated social network system.

-
-

Ghost

-
+
+

Ghost

+

Modern looking blogging system.

@@ -361,9 +373,9 @@ Modern looking blogging system.

-
-

GNU Social

-
+
+

GNU Social

+

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

@@ -373,9 +385,9 @@ Federated social network based on the OStatus protocol. You can "remote follo

-
-

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.

@@ -385,9 +397,9 @@ Lightweight git project hosting system. You can mirror projects from Github, or

-
-

HTMLy

-
+
+

HTMLy

+

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

@@ -397,9 +409,9 @@ 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.

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

-
-

Icecast media stream

-
+
+

Icecast media stream

+

Make your own internet radio station.

@@ -421,9 +433,9 @@ Make your own internet radio station.

-
-

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.

@@ -433,18 +445,18 @@ 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.

-
-

KanBoard

-
+
+

KanBoard

+

A simple kanban system for managing projects or TODO lists.

@@ -454,9 +466,9 @@ A simple kanban system for managing projects or TODO lists.

-
-

Key Server

-
+
+

Key Server

+

An OpenPGP key server for storing and retrieving GPG public keys.

@@ -466,9 +478,9 @@ An OpenPGP key server for storing and retrieving GPG public keys.

-
-

Koel

-
+
+

Koel

+

Access your music collection from any internet connected device.

@@ -478,9 +490,9 @@ Access your music collection from any internet connected device.

-
-

Lychee

-
+
+

Lychee

+

Make your photo albums available on the web.

@@ -490,9 +502,9 @@ Make your photo albums available on the web.

-
-

Mailpile

-
+
+

Mailpile

+

Modern email client which supports GPG encryption.

@@ -502,9 +514,9 @@ Modern email client which supports GPG encryption.

-
-

Matrix

-
+
+

Matrix

+

Multi-user chat with some security and moderation controls.

@@ -514,9 +526,9 @@ Multi-user chat with some security and moderation controls.

-
-

Mediagoblin

-
+
+

Mediagoblin

+

Publicly host video and audio files so that you don't need to use YouTube/Vimeo/etc.

@@ -526,9 +538,9 @@ Publicly host video and audio files so that you don't need to use YouTube/Vimeo/

-
-

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.

@@ -538,9 +550,9 @@ The popular VoIP and text chat system. Say goodbye to old-fashioned telephony co

-
-

NextCloud

-
+
+

NextCloud

+

Store files on your server and sync them with laptops or mobile devices. Includes many plugins including videoconferencing and collaborative document editing.

@@ -550,9 +562,9 @@ Store files on your server and sync them with laptops or mobile devices. Include

-
-

PeerTube

-
+
+

PeerTube

+

Peer-to-peer video hosting. Similar to Mediagoblin, but the P2P aspect better enables the streaming load to be shared across servers.

@@ -562,9 +574,9 @@ Peer-to-peer video hosting. Similar to Mediagoblin, but the P2P aspect better en

-
-

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.

@@ -574,9 +586,9 @@ The black hole for web adverts. Block adverts at the domain name level within yo

-
-

Pleroma

-
+
+

Pleroma

+

Pleroma is an OStatus-compatible social networking server, compatible with GNU Social, PostActiv and Mastodon. It is high-performance and so is especially well suited for running on low power single board computers without much RAM.

@@ -586,9 +598,9 @@ Pleroma is an OStatus-compatible social networking server, compatible with GNU S

-
-

PostActiv

-
+
+

PostActiv

+

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

@@ -598,9 +610,9 @@ An alternative federated social networking system compatible with GNU Social, Pl

-
-

Profanity

-
+
+

Profanity

+

A shell based XMPP client which you can run on the Freedombone server via ssh.

@@ -610,9 +622,9 @@ A shell based XMPP client which you can run on the Freedombone server via ssh.

-
-

Riot Web

-
+
+

Riot Web

+

A browser based user interface for the Matrix federated communications system, including WebRTC audio and video chat.

@@ -622,9 +634,9 @@ A browser based user interface for the Matrix federated communications system, i

-
-

SearX

-
+
+

SearX

+

A metasearch engine for customised and private web searches.

@@ -634,9 +646,9 @@ A metasearch engine for customised and private web searches.

-
-

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.

@@ -646,9 +658,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.

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

-
-

Tahoe-LAFS

-
+
+

Tahoe-LAFS

+

Robust and encrypted storage of files on one or more server.

@@ -670,9 +682,9 @@ Robust and encrypted storage of files on one or more server.

-
-

Tox

-
+
+

Tox

+

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

@@ -682,9 +694,9 @@ Client and bootstrap node for the Tox chat/VoIP system.

-
-

Turtl

-
+
+

Turtl

+

A system for privately creating and sharing notes and images, similar to Evernote but without the spying.

@@ -694,18 +706,18 @@ A system for privately creating and sharing notes and images, similar to Evernot

-
-

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.

-
-

Virtual Private Network (VPN)

-
+
+

Virtual Private Network (VPN)

+

Set up a VPN on your server so that you can bypass local internet censorship.

@@ -715,9 +727,9 @@ Set up a VPN on your server so that you can bypass local internet censorship.

-
-

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.

From 183478419166730d9b6d5cd0b02149e9a5092f58 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Jan 2018 21:39:19 +0000 Subject: [PATCH 3/4] Shorter password is easier to copy and paste --- src/freedombone-app-fedwiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-app-fedwiki b/src/freedombone-app-fedwiki index 866cb350..d228ad89 100755 --- a/src/freedombone-app-fedwiki +++ b/src/freedombone-app-fedwiki @@ -443,7 +443,7 @@ function install_fedwiki { FEDWIKI_ONION_HOSTNAME=$(add_onion_service fedwiki 80 ${FEDWIKI_ONION_PORT}) if [ ! $FEDWIKI_COOKIE ]; then - FEDWIKI_COOKIE="$(create_password 30)" + FEDWIKI_COOKIE="$(create_password 20)" fi echo '[Unit]' > /etc/systemd/system/fedwiki.service From a4fae488589bee65be779f665bc11f586ccb2f3a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Jan 2018 21:51:58 +0000 Subject: [PATCH 4/4] Restoring fedwiki password --- src/freedombone-app-fedwiki | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/freedombone-app-fedwiki b/src/freedombone-app-fedwiki index d228ad89..0d0630eb 100755 --- a/src/freedombone-app-fedwiki +++ b/src/freedombone-app-fedwiki @@ -150,6 +150,7 @@ function change_password_fedwiki { fi ${PROJECT_NAME}-pass -u $FEDWIKI_USERNAME -a fedwiki -p "$FEDWIKI_PASSWORD" sed -i "s|--cookieSecret .*|--cookieSecret '${FEDWIKI_PASSWORD}'|g" /etc/systemd/system/fedwiki.service + sed -i "s|\"secret\":.*|\"secret\": \"${FEDWIKI_PASSWORD}\"|g" ${FEDWIKI_DATA}/status/owner.json systemctl daemon-reload systemctl restart fedwiki write_config_param "FEDWIKI_COOKIE" "$FEDWIKI_PASSWORD" @@ -214,6 +215,11 @@ function restore_local_fedwiki { rm -rf $temp_restore_dir fi + FEDWIKI_PASSWORD=$(cat ${FEDWIKI_DATA}/status/owner.json | grep secret | awk -F '"' '{print $4}') + ${PROJECT_NAME}-pass -u $FEDWIKI_USERNAME -a fedwiki -p "$FEDWIKI_PASSWORD" + sed -i "s|--cookieSecret .*|--cookieSecret '${FEDWIKI_PASSWORD}'|g" /etc/systemd/system/fedwiki.service + write_config_param "FEDWIKI_COOKIE" "$FEDWIKI_PASSWORD" + systemctl daemon-reload systemctl start fedwiki restart_site fi @@ -262,6 +268,11 @@ function restore_remote_fedwiki { rm -rf $temp_restore_dir fi + FEDWIKI_PASSWORD=$(cat ${FEDWIKI_DATA}/status/owner.json | grep secret | awk -F '"' '{print $4}') + ${PROJECT_NAME}-pass -u $FEDWIKI_USERNAME -a fedwiki -p "$FEDWIKI_PASSWORD" + sed -i "s|--cookieSecret .*|--cookieSecret '${FEDWIKI_PASSWORD}'|g" /etc/systemd/system/fedwiki.service + write_config_param "FEDWIKI_COOKIE" "$FEDWIKI_PASSWORD" + systemctl daemon-reload systemctl start fedwiki restart_site }