en:cube:install
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:cube:install [2021/06/17 12:28] – [Create the first user] celo | en:cube:install [2022/09/16 13:07] (current) – [After the install] celo | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| # Install a cube | # Install a cube | ||
| - | This procedure explains how to setup an Internet Cube and configure it with the Neutrinet VPN. | + | This procedure explains how to setup an Internet Cube (Olimex [Lime2](https:// |
| ## Generate the VPN certificates | ## Generate the VPN certificates | ||
| - | In order to use our VPN, you need to follow [this registration process](en: | + | In order to use our VPN, you need to follow [this registration process](en: |
| In case, for some reason, you are reinstalling a cube and you want to reuse your VPN certificate, | In case, for some reason, you are reinstalling a cube and you want to reuse your VPN certificate, | ||
| - | ##Generate a cube file | + | ## Generate a cube file |
| To configure Yunohost' | To configure Yunohost' | ||
| Line 35: | Line 35: | ||
| ./ | ./ | ||
| ``` | ``` | ||
| - | |||
| - | |||
| Line 63: | Line 61: | ||
| ### Download the Yunohost image | ### Download the Yunohost image | ||
| - | Download the latest version of Yunohost for internet cubes (Olimex Lime1 or Lime2) from https:// | + | Download the latest version of Yunohost for internet cubes (Olimex Lime1 or Lime2) from [[https:// |
| - | For instance, for a Lime1: | + | For instance, for a Lime2 board: |
| ```bash | ```bash | ||
| - | wget https://github.com/ | + | wget https://build.yunohost.org/internetcube-buster-4.1.7.4_v2021.04.01-lime2-stable.img.gz |
| + | ``` | ||
| + | |||
| + | Import the Yunohost GPG key: | ||
| + | ```bash | ||
| + | gpg --keyserver keyserver.ubuntu.com --recv-keys 1904C5B42E4856DCD4E9CF96360AAF3259A3E6FF | ||
| + | ``` | ||
| + | |||
| + | Download the image' | ||
| + | ```bash | ||
| + | wget https://build.yunohost.org/internetcube-buster-4.1.7.4_v2021.04.01-lime2-stable.img.gz.sig | ||
| + | ``` | ||
| + | |||
| + | Verify the image' | ||
| + | ```bash | ||
| + | gpg --verify internetcube-buster-4.1.7.4_v2021.04.01-lime2-stable.img.gz.sig | ||
| ``` | ``` | ||
| Uncompress the Yunohost image: | Uncompress the Yunohost image: | ||
| ```bash | ```bash | ||
| - | gunzip | + | gunzip |
| ``` | ``` | ||
| ### Flash the SD card | ### Flash the SD card | ||
| + | |||
| + | Read the Yunohost documentation for graphical methods: [[https:// | ||
| First, find the device name of your SD card: | First, find the device name of your SD card: | ||
| Line 85: | Line 100: | ||
| Install the image on your SD card (all data on the SD card will be lost). | Install the image on your SD card (all data on the SD card will be lost). | ||
| ```bash | ```bash | ||
| - | sudo dd if=internetcube_4.1.7.1_v2021.02_lime.img of=/ | + | sudo dd if=internetcube-buster-4.1.7.4_v2021.04.01-lime2-stable.img of=/ |
| ``` | ``` | ||
| + | :!: Ensure that the SD card is *not* mounted during the copy process! | ||
| Remove the SD card from your computer when it's done. | Remove the SD card from your computer when it's done. | ||
| Line 111: | Line 127: | ||
| In your terminal, run: | In your terminal, run: | ||
| ```bash | ```bash | ||
| - | ./install-sd.sh -l | + | for interface in $(ip link show up | grep "state UP" | cut -d ':' |
| + | sudo arp-scan | ||
| + | done | ||
| ``` | ``` | ||
| - | The script can be download here : [[https:// | + | The output should |
| - | + | ||
| - | The output should | + | |
| ``` | ``` | ||
| - | Internet Cubes found on the network: | + | 192.168.1.46 |
| - | + | ||
| - | 1. YunoHost Admin: | + | |
| - | SSH Access: | + | |
| - | | + | |
| ``` | ``` | ||
| - | In this example, the IP address | + | These are IP addresses |
| - | 192.168.1.46 | + | |
| - | If the script | + | If you cannot find your cube, try again a couple of minutes later. |
| - | ## Run the Yunohost postinstall | + | ## Run the Internet Cube installer |
| Connect to https:// | Connect to https:// | ||
| - | (Please replace 192.168.1.46 with the IP address of your Cube found in the previous step) | + | (Please replace |
| - | Start the Yunohost postinstall and provide: | + | Provide |
| * The main domain name | * The main domain name | ||
| - | * The admin password | + | * First user name |
| - | You will be able to change the admin password | + | * First user password (this will be your admin password |
| + | * Your cube file generated in a previous step | ||
| + | * Your Wifi hotspot credentials (optional) | ||
| - | ### Create the first user | + | You will be able to change your passwords later on if you want. |
| - | In the admin panel, go to Users and create the first user by providing: | + | ### Install |
| - | * 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 | + | Your VPN certificate will be valid for 1 year. |
| - | In the admin panel, go to Applications and click on the Install button. | + | Connect |
| + | ```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) | ||
| - | Search for `VPN Client` app, then install it. | ||
| - | Copy the .cube file you generated earlier. From your machine, run: | + | Install the Neutrinet app for Yunohost in order to let the cube automatically renew the certificate before expiration: |
| ```bash | ```bash | ||
| - | scp neutrinet.cube admin@192.168.1.46:/ | + | sudo yunohost app install |
| + | ``` | ||
| + | You can keep the default values. | ||
| + | |||
| + | ## Configure the DNS records of your domain | ||
| + | |||
| + | See [this page](dns). | ||
| + | |||
| + | ## Configure IPv6 for the Hotspot Wifi | ||
| + | |||
| + | If you installed the hotspot Wifi, you need an extra step to configure IPv6. | ||
| + | |||
| + | Connect to https:// | ||
| + | |||
| + | 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 | ||
| + | |||
| + | 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 | ||
| + | |||
| + | 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 | ||
| + | |||
| + | ### During the install | ||
| + | |||
| + | #### Debian repositories changed from stable to oldstable | ||
| + | |||
| + | See also https:// | ||
| + | |||
| + | At the very first step of the internet | ||
| + | ``` | ||
| + | E: Repository ' | ||
| + | E: Repository ' | ||
| + | E: Repository ' | ||
| + | Command ' | ||
| ``` | ``` | ||
| - | (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: | + | Connect |
| ```bash | ```bash | ||
| - | ssh admin@192.168.1.46 | + | ssh root@192.168.1.46 |
| ``` | ``` | ||
| + | Enter `yunohost` as password. | ||
| - | Configure the VPN client: | + | Then, just run: |
| ```bash | ```bash | ||
| - | ynh-vpnclient-loadcubefile.sh -u raoul -c / | + | apt update |
| ``` | ``` | ||
| - | (Please replace raoul and neutrinet with the username and password of the first user) | + | And then answer yes to the questions. |
| - | Check that your cube is connected to the VPN: | + | #### VPN install failed |
| - | - 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 | + | See also https:// |
| - | Your VPN certificate | + | In case there are special characters in your VPN account password:, the install will fail with the following error: |
| + | ``` | ||
| + | Running: yunohost app addaccess vpnclient -u ' | ||
| + | ' | ||
| + | ' | ||
| + | allowed_users: | ||
| + | vpnclient: ****** | ||
| + | Running: yunohost app setting vpnclient service_enabled -v 1 | ||
| + | Running: ynh-vpnclient-loadcubefile.sh -u ' | ||
| + | [VPN] Error: Configuration updated but service reload failed | ||
| + | Command ' | ||
| + | ``` | ||
| - | Install the Neutrinet app for Yunohost in order to let the cube automatically renew the certificate before expiration: | + | Connect |
| ```bash | ```bash | ||
| - | sudo yunohost app install neutrinet | + | ssh admin@192.168.1.46 |
| ``` | ``` | ||
| - | You can keep the default values. | + | Enter your admin password. |
| - | ## Configure | + | Then, run the command that failed: |
| + | ```bash | ||
| + | sudo ynh-vpnclient-loadcubefile.sh -u "< | ||
| + | ``` | ||
| + | (Please replace `< | ||
| - | See [this page](dns). | + | :!: Make sure to keep the quotes! |
| - | ## Troubleshootings | + | On the internet cube installer, retry the last step by clicking on the yellow button. |
| - | ### Issues with `/tmp` in RAM | + | #### The loading bar freeze |
| + | |||
| + | If the loading bar freeze during the install, set the debug mode button to up. | ||
| + | |||
| + | You will then see the details of the install and what the install procedure is doing. | ||
| + | |||
| + | #### iptables/ | ||
| + | |||
| + | See https:// | ||
| + | |||
| + | This is due to a kernel update: you just need to reboot the cube. | ||
| + | |||
| + | Then, connect to the internet cube installer and retry the last step. | ||
| + | |||
| + | ### After the install | ||
| + | |||
| + | #### 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](https:// | 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](https:// | ||
| Line 200: | Line 286: | ||
| ```bash | ```bash | ||
| sudo sed s/ | sudo sed s/ | ||
| + | sudo sed s/ | ||
| sudo sed ' | sudo sed ' | ||
| ``` | ``` | ||
| - | If you have issues, or maybe you were able to find a fix for an issue, do not hesitate | + | |
| + | Then, reboot the cube: | ||
| + | ```bash | ||
| + | sudo reboot | ||
| + | ``` | ||
| + | |||
| + | #### Unable to access some websites from the cube | ||
| + | |||
| + | When your cube is connected to the Neutrinet VPN in IPv6, you might be unable to access some websites, although | ||
| + | |||
| + | Connect with SSH to the cube: | ||
| + | ```bash | ||
| + | ssh admin@192.168.1.46 | ||
| + | ``` | ||
| + | |||
| + | You need to reduce the MTU used to connect to the VPN: | ||
| + | ```bash | ||
| + | sudo nano /etc/openvpn/ | ||
| + | ``` | ||
| + | In the section `neutrinet` or `Custom`, add the line: | ||
| + | ``` | ||
| + | mssfix 1400 | ||
| + | ``` | ||
| + | |||
| + | Then, restart the VPN client: | ||
| + | ```bash | ||
| + | sudo systemctl stop openvpn@client.service | ||
| + | sudo systemctl start ynh-vpnclient-checker | ||
| + | ``` | ||
| + | |||
| + | #### Roundcube fails to install on Lime 1 | ||
| + | |||
| + | Roundcube require more than 500M to install. On lime 1, it's necessary to add swap. You can do it by running the following : | ||
| + | |||
| + | ```bash | ||
| + | sudo fallocate -l 1G /swapfile | ||
| + | sudo chmod 600 /swapfile | ||
| + | sudo mkswap /swapfile | ||
| + | sudo swapon /swapfile | ||
| + | ``` | ||
| + | You can verify that swap is available : | ||
| + | |||
| + | ```bash | ||
| + | sudo swapon --show | ||
| + | ``` | ||
| + | |||
| + | This should return a line about the swap. | ||
| + | |||
| + | Then edit your fstab file to activate the swap on startup : | ||
| + | |||
| + | ```bash | ||
| + | sudo nano / | ||
| + | ``` | ||
| + | |||
| + | Add the line : | ||
| + | ```bash | ||
| + | /swapfile none swap sw 0 0 | ||
| + | ``` | ||
en/cube/install.1623925719.txt.gz · Last modified: by celo
