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.

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:

snippet.bash
wget https://build.yunohost.org/yunohost-buster-4.1.7.1-lime1-stable.img.zip

Download the GPG key of Yunohost:

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

Download the GPG signature:

snippet.bash
wget https://build.yunohost.org/yunohost-buster-4.1.7.1-lime1-stable.img.zip.sig

Verify the GPG signature:

snippet.bash
gpg --verify yunohost-buster-4.1.7.1-lime1-stable.img.zip.sig

Uncompress the Yunohost image:

snippet.bash
unzip yunohost-buster-4.1.7.1-lime1-stable.img.zip

/!\ For lime1 board, the image filename will look like this (note the lime instead of lime1):

yunohost-buster-4.1.7.1-lime-stable.img

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=yunohost-buster-4.1.7.1-lime-stable.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 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.

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.

Connect to your Cube via SSH as admin:

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) The admin password of your Cube is the same as the one for the admin panel.

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

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

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

This translation is older than the original page and might be outdated. See what has changed.
en/cube/install.1623177995.txt.gz · Last modified: 2021/06/08 20:46 by hgo