|
|
# La Foresta Local Network wiki
|
|
|
|
|
|
## Contents
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
## Introduction
|
|
|
|
|
|
This is the documentation for La Foresta's MAZI Zone. The MAZI project provides a toolkit for building local, community wireless networks. It combines wireless technology, low-cost hardware and free/libre/open source (FLOSS) software applications.
|
|
|
|
|
|
The MAZI Zone has two "views":
|
|
|
- The captive portal to which those connected to the MAZI Zone are directed
|
|
|
- The administrator panel that allows the owner of the MAZI Zone to customise the captive portal view
|
|
|
|
|
|
This guide only contains information specific to La Foresta. For more information on the MAZI project itself, including instructions on how to create a new Zone, go to http://www.mazizone.eu/toolkit_guidelines/. There is also detailed documentation on the project's Github: https://github.com/mazi-project/portal/wiki
|
|
|
|
|
|
<!-- ## TODO: Why build a DIY network for La Foresta?
|
|
|
|
|
|
- local awareness
|
|
|
- local-first
|
|
|
- private
|
|
|
- self-hosted -->
|
|
|
|
|
|
## How to access the network
|
|
|
|
|
|
The MAZI Zone has already been set up on a Raspberry Pi 3B+, which is a very cheap, credit-card sized computer that runs Linux. You can read more about Raspbery Pi's here: https://www.raspberrypi.org
|
|
|
|
|
|
Plug the Raspberry Pi into a power socket and turn it on. Wait a few minutes for it to boot up. The WiFi network `LaForestaLocal` should appear.
|
|
|
|
|
|
> Important:
|
|
|
Once it has been turned on, do not unplug the Pi without shutting it down first. The SD card (on which everything is installed) is delicate, so it needs to be shut down correctly. For instructions on how to do this, see: [Shutting down the Pi](## Shutting down the Pi)
|
|
|
|
|
|
Make sure you're connected to the `LaForestaLocal` network. A splash page should appear automatically. Click `Enter`.
|
|
|
|
|
|
If it doesn't appear, open your browser and navigate to http://local.mazizone.eu:4567/splash
|
|
|
|
|
|
Open your browser and navigate to http://laforesta.space. (It may redirect automatically to http://local.mazizone.eu/la-foresta-portal/). This public homepage portal has been customised to be more simple and in line with La Foresta's visual language.
|
|
|
|
|
|
<!-- TODO fix URL so it doesn't redirect -->
|
|
|
|
|
|
For information on how to customise and update the homepage portal, see [Updating the custom homepage.](## Updating the custom homepage)
|
|
|
|
|
|
## Using the Portal
|
|
|
|
|
|
This MAZI zone is set to offline mode, so you can't use it to browse the Internet. There are four applications currently installed:
|
|
|
- Guestbook
|
|
|
- Library
|
|
|
- Etherpad
|
|
|
- Nextcloud
|
|
|
|
|
|
There is no password to access these applications, so remember that anything you add will be visible to anyone else who connects to the network.
|
|
|
|
|
|
### Guestbook
|
|
|
|
|
|
The Guestbook is where visitors can post short texts or images. You could encourage visitors to use this to suggest what they'd like to see in the physical space, or on the MAZI Zone itself.
|
|
|
|
|
|
### Library
|
|
|
|
|
|
This is actually a direct link to a folder in the local Nextcloud, specifically for sharing books. Always check the license before uploading a book.
|
|
|
|
|
|
<!-- TODO remove the books that are currently there -->
|
|
|
|
|
|
### Etherpad
|
|
|
|
|
|
An Etherpad is a collaborative document editor. It's basically a private, locally hosted, open source version of Google Docs.
|
|
|
|
|
|
<!-- TODO why use Etherpad instead of Google Docs -->
|
|
|
|
|
|
There are currently three active pads listed on the index pad:
|
|
|
- Chatroom: http://local.mazizone.eu:9001/p/chatroom
|
|
|
- Latest meeting agenda: http://local.mazizone.eu:9001/p/agenda
|
|
|
- Latest meeting notes: http://local.mazizone.eu:9001/p/meeting_notes
|
|
|
|
|
|
To make a new pad, go to http://local.mazizone.eu:9001/
|
|
|
|
|
|
One cool thing about Etherpad is that it can create a new pad directly from a URL. Just type http://local.mazizone.eu:9001/p/[your-title-here] and then click on the link.
|
|
|
|
|
|
Remember to add the URL of any pads that you create to the index pad, if you want others to be able to access it.
|
|
|
|
|
|
### Nextcloud
|
|
|
|
|
|
Nextcloud is a locally hosted, open source cloud – basically an alternative to Google Drive or Dropbox. It is only accessible when connected to the local network. As with Etherpad, the reason for using a locally hosted version is that you own and have control over your own data. You can use it to share files with others in the space.
|
|
|
|
|
|
You can also add new folders. The current folders are:
|
|
|
- Documents
|
|
|
- Library
|
|
|
- Photos
|
|
|
|
|
|
Remember that everything inside these folders is public to anyone connected to the network. This also means that anyone can edit or delete files, so keep a backup of any files that are particularly important.
|
|
|
|
|
|
<!-- TODO look into file recovery for Nextcloud -->
|
|
|
<!-- TODO check Android photo upload bug -->
|
|
|
|
|
|
## Accessing the admin panel
|
|
|
|
|
|
The second part of the MAZI Zone is the Admin Panel. This is where you can:
|
|
|
- Manage the installed Applications
|
|
|
- Configure the MAZI Zone network
|
|
|
- Moderate the guestbook
|
|
|
- Add/remove notifications on the portal
|
|
|
- Export/import snapshots
|
|
|
|
|
|
To access the panel, navigate to: http://laforesta.space/admin_login and enter the login and password.
|
|
|
|
|
|
> login: mazi_admin
|
|
|
password: ask Fabio or Giorgio what this is
|
|
|
|
|
|
There are detailed instructions on how to use this here: https://github.com/mazi-project/guides/wiki/Administrator-panel
|
|
|
|
|
|
For the purpose of this guide, we'll just look at the aspects that are custom for La Foresta. The MAZI project is very well documented and user friendly, so you should be able to find any answers to your questions by searching their wiki. You can also reach this wiki by clicking "Documentation" in the side panel of the Admin Panel.
|
|
|
|
|
|
## Managing applications from the Admin Panel
|
|
|
|
|
|
Navigate to Applications via the sidebar.
|
|
|
|
|
|
There are two sections on this page: _Application Instances_ and _Installed Applications_.
|
|
|
|
|
|
The homepage has been set to a custom portal, which means that changing Application Instances here won't have an effect on how the portal actually looks. You can revert to the default homepage by switching off the toggle "Home page".
|
|
|
|
|
|
If you feel comfortable using the Terminal, you can manually install new custom applications. More details can be found here: https://github.com/mazi-project/guides/wiki/Manual-installation-of-applications
|
|
|
|
|
|
### Managing the Guestbook
|
|
|
|
|
|
Basic customisation options for the Guestbook can be found here: http://laforesta.space/admin_guestbook
|
|
|
|
|
|
This allows you to:
|
|
|
- moderate content
|
|
|
- update the welcome message
|
|
|
- change the background image (recommended size is 1080px x 445px)
|
|
|
- add tag options
|
|
|
- change file size limits and required fields
|
|
|
|
|
|
## Connecting to the Raspberry Pi via ssh
|
|
|
|
|
|
For more advanced customisation options, you'll need to connect directly to the Raspberry Pi via SSH.
|
|
|
|
|
|
1. Make sure you're on the `LaForestaLocal` network
|
|
|
2. Open the Terminal and type `ssh pi@mazizone.local`
|
|
|
3. Enter the password
|
|
|
> ask Fabio or Giorgio what this is
|
|
|
|
|
|
Now you're connected to the pi. It should say `pi@mazizone`.
|
|
|
|
|
|
## Updating the custom splash page
|
|
|
|
|
|
There is a captive splash page which pops up when a visitor first connects to the network. It explains how to access the network and the available applications. This has been customised for La Foresta.
|
|
|
|
|
|
This is the path to the splash page:
|
|
|
`/root/portal/views/splash.erb`
|
|
|
|
|
|
You can update the custom splash page by copying it to your local machine:
|
|
|
|
|
|
`scp pi@10.0.0.1:/root/portal/views/splash.erb ./`
|
|
|
|
|
|
From here you can edit it. It's built with Ruby and is importing some variables (such as the name of the network and custom URL) directly from the Admin Panel. It's best not to edit these, but you can change the surrounding content and basic styling. The browser support for this captive page is very limited, so it should be kept as simple and default as possible.
|
|
|
|
|
|
To move it back to the pi:
|
|
|
`scp /path/to/file pi@10.0.0.1:/home/pi/`
|
|
|
|
|
|
You can only copy it to the home folder of the Pi. From here, you'll need to move it back to the correct directory:
|
|
|
1. Go to the home folder: `cd ~/home/pi`. You should see `splash.erb`
|
|
|
2. Move it to the correct folder: `mv /splash.erb /root/portal/views/`
|
|
|
|
|
|
## Updating the custom homepage
|
|
|
|
|
|
The La Foresta portal is a custom Application which has been set to be the homepage.
|
|
|
|
|
|
It can be found on the Pi at this directory:
|
|
|
`root/var/www/html/la-foresta-portal`
|
|
|
|
|
|
Inside you have the following files – it's just a basic webpage built with HTML and CSS:
|
|
|
`404.html css favicon.ico fonts img index.html`
|
|
|
|
|
|
To edit this, you'll need to follow the same process as above, copying the files to your local machine and then back to the Pi.
|
|
|
|
|
|
## Adding a new application to the homepage
|
|
|
|
|
|
You have two options here: either adding an application that has already been installed on the Pi, or adding a custom application.
|
|
|
|
|
|
In both cases, you'll also need to manually update the `index.html` file of the homepage in order to access the application from the public portal.
|
|
|
|
|
|
### To add an already installed application
|
|
|
|
|
|
1. Go to the MAZI Admin panel
|
|
|
2. Navigate to Applications in the sidebar
|
|
|
3. Under Application Instances, click the green "+" button
|
|
|
4. Choose from the available application options (e.g. Wordpress) from the dropdown menu and fill out the other fields. You will see the new application in the list of Application Instances.
|
|
|
5. Copy the URL (e.g. http://local.mazizone.eu/wordpress)
|
|
|
6. On your local machine, open the `index.html` file that you have copied from the Pi
|
|
|
7. Create a new `tile` div
|
|
|
8. Link it to the URL that you have copied from the MAZI Admin panel
|
|
|
9. Copy the new `index.html` file back to the Pi: `scp /path/to/file pi@10.0.0.1:/home/pi/`
|
|
|
10. Move it to the correct folder: `mv /index.html /var/www/html/la-foresta-portal`
|
|
|
|
|
|
You can follow the same process to update the CSS and other files.
|
|
|
|
|
|
### To add a new custom application
|
|
|
|
|
|
Detailed instructions can be found on the Mazi Project wiki here:
|
|
|
|
|
|
You'll first need to create a new folder in `/var/www/html/` and then move your application files to this folder.
|
|
|
|
|
|
Once you've done this, you'll need to install your custom application:
|
|
|
1. Go to the MAZI Admin panel
|
|
|
2. Navigate to Applications
|
|
|
3. Under Installed Applications, click the green "+" button
|
|
|
4. Fill out the form. The URL will be http://local.mazizone.eu/name-of-app-folder
|
|
|
5. Click `Create`
|
|
|
|
|
|
Then you'll need to add it to Application Instances and to the custom homepage, as outlined above.
|
|
|
|
|
|
## Updating the guestbook
|
|
|
|
|
|
For more advanced customisation options of the Guestbook, you can edit the files found on the Pi here:
|
|
|
`/var/www/html/mazi-board/src/www`
|
|
|
|
|
|
This can be customised moving to your local machine and back again, following the same process outlined above.
|
|
|
|
|
|
The Guestbook can also be set to Slideshow View, but this has not yet been styled correctly: http://portal.mazizone.eu:8081/#projection
|
|
|
|
|
|
<!-- TODO style this view -->
|
|
|
|
|
|
## Shutting down the Pi
|
|
|
|
|
|
It's very important to shut down the Pi before unplugging it. To do so:
|
|
|
1. Go to the Admin Panel
|
|
|
2. Click the "Admin" dropdown menu in the top right
|
|
|
3. Select "Shut Down"
|
|
|
4. Wait for a few moments and then unplug the Pi |
|
|
\ No newline at end of file |