Skip to content

Installation

Florian Quirin edited this page May 13, 2018 · 26 revisions

Installation

Raspberry Pi 3

Quick-start for experienced makers/tinkerers:

  • Install the latest Raspbian lite (this doc was made for Raspbian Stretch)
  • Go to your router, fix your Pi IP and forward port 20726 to your Pi.
  • Login to your Pi and ... to be continued

Starting from scratch

Installing a fresh Raspbian

  1. Get the latest Raspbian lite (no desktop version): downloads.raspberrypi.org
  2. Get Etcher (portable) to flash Raspbian to your Micro-SD card (it's really easy): etcher.io
  3. Open Etcher, select the Raspbian Zip-file you've downloaded, select your Card-reader with your Micro-SD card as target and start flashing.
  4. After flashing finished remove your Micro-SD from the reader and put it back in (to reload the new file-system) then open the Micro-SD card (should be called "boot") and create an empty file called "ssh" (no file ending). This will make sure that you can login via SSH to your Pi later.
  5. Optionally you can add access to your Wifi (not-recommended for this server), here is a good blog-article about it on Medium or you can deactivate Wifi and Bluetooth to save some resources (recommended). For the latter look for a file called config.txt on your Micro-SD and add (or replace) these lines:
# Disable Wifi
dtoverlay=pi3-disable-wifi
dtoverlay=pi3-disable-bt
  1. Put the Micro-SD in your Raspberry Pi 3 and plug it in (network and power).

Interlude: Setting up your router

This part depends a bit on the type of your router, but you should be able to find additional info if you get stuck doing a web-search for "port forwarding [my router name]" and "set fixed static IP for a device in router". Here are the common steps:

  1. Login to your router (e.g. via fritz.box, o2.box, 192.168.0.1, etc...)
  2. Look for settings called "My/Local/Home Network" (or something similar) where you get an overview of all connected devices
  3. Look for "raspberrypi" in the devices list and write down the IP address, we need this to login via SSH.
  4. Now we want to fix this IP so you can always reach your Pi at the same address in your network. There should be a setting nearby called "fix/static IP addresses" were you can tell your router to connect the IP with the MAC address of your Raspberry Pi. This step might require a bit of try-and-error depending on your router, sorry for that.
  5. Final step here is to set-up port-forwarding to make our Pi reachable from outside. This will be necessary later to secure the server with a SSL certificate and make the SEPIA client work when you leave home. When you've found the router settings forward the port 20726 (default SEPIA port, can be changed) to the IP of your Raspberry Pi. Remember what you did here because we might want to return later ;-)

Setting up Raspbian to run SEPIA

  1. Remember your Raspberry Pi IP? Good :-) We will use it now to connect 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 now as well, but if you are running Windows I recommend to download Putty.
  2. Windows: Open Putty, type pi@[my-IP-I-remember] "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" (the default password of the Pi) 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).

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).