User Tools

Site Tools


en:cube:install

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/fr/install/hardware:internetcube

For instance, for a Lime1:

snippet.bash
wget https://github.com/YunoHost/arm-images/releases/download/v2021.02/internetcube_4.1.7.1_v2021.02_lime.img.gz

Uncompress the Yunohost image:

snippet.bash
gunzip internetcube_4.1.7.1_v2021.02_lime.img.gz

Flash the SD card

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_4.1.7.1_v2021.02_lime.img of=/dev/mmcblk0 status=progress

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
./install-sd.sh -l

The script can be download here : https://github.com/labriqueinternet/install.labriqueinter.net/blob/master/install-sd.sh

The output should look like this:

Internet Cubes found on the network:

  1. YunoHost Admin:    https://192.168.1.46
     SSH Access:        ssh root@192.168.1.46
     HyperCube Debug:   http://192.168.1.46:2468/install.html

In this example, the IP address of your Cube on the local network is: 192.168.1.46

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

Run the Yunohost postinstall

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)

Start the Yunohost postinstall and provide:

  • The main domain name
  • The admin password

You will be able to change the admin password later on if you want.

If your main domain is something like cube.yourdomain.tld and you want to add yourdomain.tld as a second domain, add your second domain now, before creating the first user.

Create the first user

In the admin panel, go to Users and create the first user by providing:

  • username
  • firstname
  • lastname
  • password

This user is a bit special because it will be linked to the root@domain.tld mail address.

Install the VPN client

In the admin panel, go to Applications and click on the Install button.

Search for VPN Client app, then install it.

Copy the .cube file you generated earlier. From your machine, run:

snippet.bash
scp neutrinet.cube admin@192.168.1.46:/tmp/neutrinet.cube

(Please replace 192.168.1.46 with the IP address of your Cube found in the previous step) The admin password of your Cube is the same as the one for the admin panel.

Connect to your Cube via SSH as admin:

snippet.bash
ssh admin@192.168.1.46

Configure the VPN client:

snippet.bash
ynh-vpnclient-loadcubefile.sh -u raoul -c /tmp/neutrinet.cube -p neutrinet

(Please replace raoul and neutrinet with the username and password of the first user)

Check that your cube is connected to the VPN: - Run ip a from the cube and check if there is a tun0 interface - Connect to the IP in your web browser

Install the Neutrinet app

Your VPN certificate will be valid for 1 year.

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.

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

en/cube/install.txt · Last modified: 2021/06/17 12:32 by celo