User Tools

Site Tools


en:cube:install

**This is an old revision of the document!**

Install a cube

This procedure explains how to setup an Internet Cube and configure it with the Neutrinet VPN.

Generate the VPN certificates

In order to use our VPN, you need to follow this registration process. You will generate a private key and obtain a personal VPN certificate.

In case, for some reason, you are reinstalling a cube and you want to reuse your VPN certificate, you can find them on a running (or dead) cube as user.crt, user.key, ca-server.crt and credentials in /etc/openvpn/keys.

Generate a cube file

To configure Yunohost's VPN app, you will need a cube file which contains your VPN credentials and certificates. Put all the VPN files in the same folder.

You will also need a file with the credentials chosen while the registration process :

snippet.bash
cd <path/to/foler>
nano auth

In the file, write your credentials, for example :

snippet.bash
a.mail@address.xyz
Password or Passphrase

In the same folder, download Neutrinet's script to create a .cube :

snippet.bash
wget https://git.domainepublic.net/Neutrinet/scripts/-/raw/master/cubefile/faire_un_point_cube.sh

Run the script :

snippet.bash
./faire_un_point_cube.sh 

Components

This is the strict minimum you need:

  • a computer (preferably running a Linux/Unix/BSD system) to perform the install
  • a A20-OLinuXino-LIME board
  • a microSD card where the Cube operating system (Yunohost/Debian) will be stored
  • a MOD-WIFI-R5370-ANT WiFi Antenna (optional)
  • a 5V DC power adapter
  • a Neutrinet VPN account

You can find details about the components and buy them here

Others

You'll also need:

  • An Internet connection to download the Yunohost image.
  • An ethernet cable to connect the Cube to your home router (i.e. your ISP internet box)

Install Yunohost on the SD Card

Download the Yunohost image

Download the latest version of Yunohost for internet cubes (Olimex Lime1 or Lime2) from https://yunohost.org/en/administrate/install/hardware:internetcube

For instance, for a Lime2 board:

snippet.bash
wget https://build.yunohost.org/internetcube-buster-4.1.7.4_v2021.04.01-lime2-stable.img.gz

Import the Yunohost GPG key:

snippet.bash
gpg --keyserver keyserver.ubuntu.com --recv-keys 1904C5B42E4856DCD4E9CF96360AAF3259A3E6FF

Download the image's signature:

snippet.bash
wget https://build.yunohost.org/internetcube-buster-4.1.7.4_v2021.04.01-lime2-stable.img.gz.sig

Verify the image's signature:

snippet.bash
gpg --verify internetcube-buster-4.1.7.4_v2021.04.01-lime2-stable.img.gz.sig

Uncompress the Yunohost image:

snippet.bash
gunzip internetcube-buster-4.1.7.4_v2021.04.01-lime2-stable.img.gz

Flash the SD card

Read the Yunohost documentation for graphical methods: https://yunohost.org/en/administrate/install/hardware:internetcube#flash-the-image-type-image

First, find the device name of your SD card:

snippet.bash
lsblk

Usually, it's mmcblk0

Install the image on your SD card (all data on the SD card will be lost).

snippet.bash
sudo dd if=internetcube-buster-4.1.7.4_v2021.04.01-lime2-stable.img of=/dev/mmcblk0 status=progress

FIXME Ensure that the SD card is not mounted during the copy process!

Remove the SD card from your computer when it's done.

Start your Cube

Prepare it

  • Make sure the Cube is not connected to a power source (e.g: the power cable should be unplugged)
  • Insert the WiFi antenna into the USB port of the Cube's board
  • Insert the SD card into your Cube
  • Connect your Cube to an ethernet cable that is connected to your home router (i.e your ISP internet box)
  • Make sure your computer is connected (via WiFi or ethernet) to your home router too (you will connect to your Cube via the local network)

Boot it

  • Connect the power cable to the Cube to start it
  • Wait a couple of minutes to let the Cube start and connect to the network

Find it on the network

In order to connect to your Cube, you need to find its IP address on your local network.

In your terminal, run:

snippet.bash
for interface in $(ip link show up | grep "state UP" | cut -d ':' -f 2); do
  sudo arp-scan -l --interface "$interface" | grep -P '\t02' | cut -f 1
done

The output should give you a list of IP addresses:

192.168.1.46

These are IP addresses of Internet Cubes connected on the local network.

If you cannot find your cube, try again a couple of minutes later.

Run the Internet Cube installer

Connect to https://192.168.1.46 (Please replace 192.168.1.46 with the IP address of your Cube found in the previous step)

Provide the following details:

  • The main domain name
  • First user name
  • First user password (this will be your admin password as well)
  • Your cube file generated in a previous step
  • Your Wifi hotspot credentials (optional)

You will be able to change your passwords later on if you want.

Install the Neutrinet app

Your VPN certificate will be valid for 1 year.

Connect to your Cube with SSH:

snippet.bash
ssh admin@192.168.1.46

(Please replace 192.168.1.46 with the IP address of your Cube found in the previous step)

Install the Neutrinet app for Yunohost in order to let the cube automatically renew the certificate before expiration:

snippet.bash
sudo yunohost app install neutrinet

You can keep the default values.

Configure the DNS records of your domain

See this page.

Configure IPv6 for the Hotspot Wifi

If you installed the hotspot Wifi, you need an extra step to configure IPv6.

Connect to https://user.neutrinet.be/ and enter your VPN credentials. You can find them in your cube file or in /etc/openvpn/keys/credentials on your internet cube.

Go to your client details by clicking on the entry with mail address.

You should see IPv6 subnet lease (the row with a /64 IPv6).

In case you don't have a IPv6 subnet lease yet, click on Modify IP lease assignment.

Then click on your mail address and click Add IPv6 subnet lease.

Choose a range of 64, and click on the Assign button.

You can then go back to the home page to see your new IPv6 subnet lease.

Connect to Wifi Hotspot admin of your internet cube: https://192.168.1.46/wifiadmin/

Then, under the tab IPv6, paste the IPv6 subnet lease to the delegated prefix field.

Click on the button Save and reload to apply your changes.

Troubleshootings

Issues with /tmp in RAM

By default, the files /tmp folder are stored in RAM, which isn't a good idea when you have less than 1Gb available in a cube. See tmpfs / armbian

You can disable this by running the following:

snippet.bash
sudo sed s/^ENABLED=true/ENABLED=false/ /etc/default/armbian-zram-config -i
sudo sed 's/^tmpfs/# tmpfs/' /etc/fstab -i

If you have issues, or maybe you were able to find a fix for an issue, do not hesitate to contact us : https://chat.neutrinet.be

This translation is older than the original page and might be outdated. See what has changed.
en/cube/install.1628978998.txt.gz · Last modified: 2021/08/15 00:09 by hgo