Skip to content

Latest commit

 

History

History
180 lines (112 loc) · 8.53 KB

02-install.md

File metadata and controls

180 lines (112 loc) · 8.53 KB

How to install the containers

Check prerequisites

Please check all prerequisites from Readme.md

Connect to Raspberry Pi

  1. To begin, log-in to your Raspberry Pi via ssh
    • If you use Windows, open PowerShell
    • If you use Linux or macOS, open Terminal
  2. Enter the following command:
    • change the "pi" to your username, if you changed it during installation
    • replace "home-server" with the hostname you set during installation
  1. On the first connection, you will get a warning, that you're connecting to an unknown device. To confirm that, enter "yes" and confirm by pressing Enter
  2. Type in your password and confirm by pressing Enter. Note: you will not see any input when you enter your password
  3. If the connection was successfully, you should see the following line in your command prompt:
pi@home-server:~ $
  1. If you connected successfully to the Raspberry Pi, elevate yourself to superuser using the following command:
sudo su

Start the Script

  1. Copy the following code into your Bash command line
cd /tmp; rm install.sh &> /dev/null; wget https://raw.githubusercontent.com/b-tomasz/Simplify-Home-Automation/main/install.sh &> /dev/null; bash install.sh
  1. After the script started, select "Install" and press Enter

Choose install

  1. The system will now check a few parameters. Like the following:
    • your systems architecture
    • if your system is up-to-date

  1. If one or multiple fail, you will get notified like this:

failed prerequisite

  1. In the next prompt, you will be asked to update the system. Select "Update" to start the process

Update system

  1. As soon as the update is finished, the script continues with some essential prompts.

    • Please enter fixed IP and IP of your router

Fixed ip piFixed ip router

  1. The next prompt is about the external domain, this will be used to connect to your system via this domain. If you select Yes, your port forwarding must be active to the Raspberry Pi as described in the script. Your external domain must resolve to your public IP. For example, you can use Bitwarden from everywhere. If you select no, Bitwarden, VPN and SSL can't be installed.

Domain info

  1. If you choose yes, you will get asked to type in your external domain and your e-mail address. Otherwise, this part will be skipped.

external domainE-Mail address

  1. Now the Raspberry Pi needs to reboot, to apply the configured settings. Reconnect to the Raspberry Pi as described earlier.

Ports that need to be forwarded to Raspberry Pi

If you use an external domain to use SSL-Certificates (what we strongly recommend) it is necessary that you forward the follwing ports to your Raspberry Pi

  • HTTP: 80 (tcp)
    • Used to generate SSL-Certificates and redirect http to https
  • HTTPS: 443 (tcp)
    • Used to access Bitwarden from outside your network
  • VPN: 10000 (udp)
    • Used to connect to your homenetwork via a VPN

How you have to enable the portforwording strongly depends on your router. If you couln't find it, then search on Google, how you can add a portforwarding on your router modell. Here we show how it is done with the Internet-Box routers of the provider Swisscom. On most routers it will work in a simmilar way.

We recommend that you do these steps after you set the fixed IP of your Raspberry Pi.

  1. Open the webinterface of your router by entering the IP address of your router in the webbrowser. If you didn't change the IP it will be 192.168.1.1

  2. Enable the "Expert mode on" the left side and then navigate to Network -> Settings -> Port forwarding

  3. Click on Add new rule

    Portforwarding1
  4. Enter HTTP as Name and 80 as the entry port

    Portforwarding2
  5. Select the protocol, under device select your Raspberry Pi. Make sure, that you select the fixed IP you set during installation, otherwise it may not work correctly

    Portforwarding3
  6. Repeate Step 3 - 5 for the HTTPS and VPN port

Continue with the script

  1. After you successfully reconnected to the Raspberry Pi and added the portforwarding, you need to restart the script using the following command:
cd /tmp; rm install.sh &> /dev/null; wget https://raw.githubusercontent.com/b-tomasz/Simplify-Home-Automation/main/install.sh &> /dev/null; bash install.sh
  1. Choose install. Now the docker installation begins. This is the prerequisite for all the following steps.

Docker installationDocker is installing

  1. As soon as docker is installed, the next prompt will ask what applications to install. You can navigate with the arrows and select with the space bar on the keyboard. Confirm your selection with Enter.

Choose Products

  1. If you choose either Portainer, Grafana, Database, VPN or Pi-hole you will get prompted to type in a default password. It will be the same for all applications, and you can change it on the webinterface after installation.

  2. If you complete this task successfully, the installation begins. Please be patient, this could take a while. As soon as the installation is completed, you will get notified.

Products are installingSuccessfully installed

  1. You can now close the Terminal or PowerShell. The installation is now finished.

Change DNS-Server

To access all tools with their DNS-Name, it is necessary that you change the DNS-Server to your Raspberry Pi. There are two options for doing this. You can either change the DNS-Setting localy on your computer or you change the DNS on your router. If you change this localy, it applies only for your computer, or you have to change this on every device.

Localy

This method applies only for the device you change it on. It is fine for testing purposes. For a final installation we recommend using the Network wide setting.

  1. Press the Windows Key + R

  2. Enter ncpa.cpl and presse Enter

    Local DNS 1
  3. Click right on your used network connection and select Properties

    Local DNS 2
  4. Double click on Internetprotokoll Version 4 to open your IP settings

    Local DNS 3
  5. Change to Use the following DNS Server addresses and enter the IP of your Raspberry Pi

    Local DNS 4
  6. Click on OK to close the dialog boxes.

Network wide

This method applies for all devices connected to your network and is the best option for a final installation.

  1. Open the webinterface of your router by entering the IP address of your router in the webbrowser. If you didn't change the IP it will be 192.168.1.1

  2. Enable the "Expert mode on" the left side and then navigate to Network -> Settings -> IP setting

  3. Scroll down to IP address distribution (DHCP)

  4. Enable the checkbox DNS servers advertised via DHCP options 6 and enter the IP address of your Raspberry Pi

    DNS over DHCP
  5. You have to reconnect your device that this change applies to your device

All products are now available as described in the README