Skip to content

Installation

Florian Quirin edited this page Dec 11, 2021 · 26 revisions

Installation

Here you will find more detailed instructions for certain platforms like the Raspberry Pi. Common instructions can be found here.

Raspberry Pi Installation via script

If you're already running a (fresh and clean) Raspberry Pi OS Lite the recommended way to install SEPIA-Home server is to download the installation script and follow the on-screen instructions:

mkdir ~/tmp
cd ~/tmp
wget https://sepia-framework.github.io/install/sepia-home-rpi.sh && bash sepia-home-rpi.sh

Starting from scratch

Installing a fresh Raspberry Pi OS (aka Raspbian)

  1. Download the official Raspberry Pi Imager and start it
  2. Choose Raspberry Pi OS Lite (from 'other' menu)
  3. Press 'Ctrl + Shift + X' to open Imager expert settings
  4. Activate SSH (required), set your time zone (important for timers etc.) and optionally configure Wifi, hostname, etc.
  5. Flash the SD card
  6. Eject the Micro-SD and plug it into your RPi

Interlude: Getting your IP and setting up your router (optional)

If you don't know how to find out the IP address of your Rasperry Pi please see this guide about router configuration.

Setting up Raspberry Pi OS to run SEPIA

  1. Do you know the IP of your Raspberry Pi? Good :-) If you don't you can try to use raspberrypi.local as address (this is the default hostname if you didn't change it during SD card flashing and will point to the IP on most networks). We will use it now to connect to the RPi via SSH. To do this you'll need a SSH tool. UNIX systems like MacOS and Linux have one available out-of-the-box, Windows 10 seems to have one as well, but if you are running Windows I recommend to download Putty.
  2. Windows: Open Putty, type pi@[my-IP-I-remember] into the "Host Name" field (Port stays 22) and click "Open".
    Mac/Linux: Open a terminal an type ssh pi@[my-IP-I-remember].
  3. You should see a password prompt now. Type "raspberry" (if you didn't change the default password during SD flashing) and your are connected :-)
  4. First we finish the configuration. Type sudo raspi-config and the Raspbian config tool will open.
  5. Use the tool to:
    • Define a new and secure password (and remember it!)
    • Expand the file system (Advanced Options -> Expand ...)
    • Since we need every bit of memory go to Advanced Options -> Memory Split and set the memory to 16MB (we don't have a display anyway ^^)
    • Finish and reboot
  6. Wait for the reboot then login to your Pi again via SSH (with your new password).
  7. We will install Java and a few additional packages next. To make life easier there is a script in the SEPIA-Home bundle that will help you set up your environment. Download it to a temporary folder using wget:
mkdir ~/tmp
cd ~/tmp
wget https://sepia-framework.github.io/install/sepia-home-rpi.sh
  1. Run the script with bash sepia-home-rpi.sh and follow the required steps (you can skip the optional ones). Make sure everything completes without errors especially the part with Java, SEPIA download and SEPIA extract.
  2. Continue with step 3 (setup) of the SEPIA quick start guide. When you are done return here.
  3. Finally we take care that everything restarts properly when the Raspberry Pi boots up. To do that we add a cron-job:
crontab -e
@reboot sleep 60 && ~/SEPIA/on-reboot.sh;

Please note that the reboot script contains the important line sudo sysctl -w vm.max_map_count=262144 that is required for Elasticsearch to run stable. If you don't use this cron-jop make sure to call this line after your system boot.

We can add another cron-job (line below) that restarts the server every 2nd day at 4:30am to keep everything clean and stable (recommended):

30 4 1-31/2 * * ~/SEPIA/cronjob.sh;

If everything worked out well you should have your own SEPIA Server now, reachable from within your private network 😃 🤖

There is another tutorial on how to set up NGINX, Let's Encrypt and Duck-DNS to get a full-fledged SEPIA web-server with SSL)

Services

API-Keys

Certain services require an API-key to work like the weather forecast for example. All integrated services usually offer a free API-key for a certain number of calls. Once you've obtained such a key you need to put it inside the config file of the SEPIA assist-server and restart the server to activate it (a more convenient way using the admin web-tools is under consideration). Check out the details here: API-keys.