Hosting your own, private, virtual assistant

Florian Quirin
SEPIA Framework
Published in
7 min readDec 16, 2018

The 6min guide to installing a SEPIA-Home server on Linux, Mac or Windows

SEPIA’s avatar checking the situation

Last updated: 21.02.2020

If you ended up on this page you probably already know what SEPIA is but for those who don’t here is a short introduction:

SEPIA stands for server-based, extendable, personal, intelligent assistant and is first and foremost an app very similar to Siri, Google Assistant or Amazon Alexa. The foundation of SEPIA is the SEPIA-Framework, a collection of modules and tools that form a coherent ecosystem for self-hosted, privacy-compliant, voice-controlled applications and devices.

In this article you will learn how to install and setup a SEPIA server, the main access point for any SEPIA client (e.g. the Android/iOS/browser app or a simple command-line program). The Linux instructions have been tested on Debian/Raspbian and should in theory work for Ubuntu as well.

SEPIA-Framework and ecosystem (icon attributions)

Requirements

You don’t need much to get started! I usually use a Raspberry Pi 3 with the latest Raspbian Lite OS (a Debian based Linux) as my dedicated, always-on SEPIA server, but any SBC with at least 1GB of RAM will probably do. In fact you can use every machine that runs Java which includes MacOS and Windows. Here is the super-short version of the installation guide:

  • Step1: Install Java JDK 8+ (OpenJDK 11 recommended, 12+ not yet supported)
  • Step2: Download the latest SEPIA-Home bundle and extract the Zip to your home folder: “~/SEPIA”
  • Step3: Run the included setup-script for your OS
  • Step4: Test it by connecting a SEPIA-Client to the server

Details to each step are following below :-)

Step1: Install Java

If you start from scratch with a fresh Raspberry Pi I recommend to follow this guide to setup your system. It’ll explain you how to install Raspbian OS and it includes a script to make life a bit easier (the same script is used in step 2).

Before you start you can check if your (any) system already has Java installed by opening a terminal/cmd and typing:

java -version

If you see something like Java JDK 1.8, OpenJDK 8 or 11 you can skip this step :-)

NOTE: Make sure you have the Java JDK instead of JRE because the SEPIA-SDK uses it for some features.

Linux:

Currently (Feb. 2020) the recommended way to install Java on Raspbian is to use OpenJDK 11. Just type the following line into your terminal:

sudo apt-get update
sudo apt-get install -y openjdk-11-jdk-headless

This should work on newer versions of Ubuntu as well. If it does not and you are using Debian try adding the “mkdir” workaround (line one below). Alternatively you can try the default-jdk:

sudo mkdir -p /usr/share/man/man1
sudo apt-get install -y default-jdk-headless

When you’ve installed the default-jdk make sure that you got at least Java 8 and at most Java 11 using the initial command again: java -version .

Windows/MacOS:

Go to the official download page by AdoptOpenJDK or Oracle, get the files for your OS and run the installer/follow the instructions. Starting with SEPIA-Home v2.4.1. you will find a script in the folder ‘SEPIA/java’ (we will download this in step 2) to install Java 11 locally into your SEPIA folder.

Common:

After the installation you might need to add an additional system variable: JAVA_HOME. Follow this guide to set it up.

Updated Feb. 2020: If you use the local installtion of Java (inside your SEPIA folder) or Linux this step is usually not required.

Step2: Download and extract SEPIA-Home

SEPIA-Home is the official release bundle for the SEPIA home-server. You can run the SEPIA server-stack in the cloud (e.g. with AWS, Azure, etc.) and distribute the system (servers and database) over several cloud-computers if you want, but usually this does not fit to our understanding of privacy (and it requires a few more configuration steps that are not covered in this article ^_^). We will install SEPIA-Home on our own, local computer:

Linux:

There is a script (tested on Raspbian, might work on Debian/Ubuntu) that will help you to download, extract and setup SEPIA. You can get it via:

wget -O install-sepia.sh https://tinyurl.com/sepia-home-installer

Run the script with bash install-sepia.sh and you will see a small menu where you can choose to download the latest SEPIA-Home version and extract it to your home-folder. Call steps 2 (check packages), 3 (download) and 4 (extract). If you want to download and extract everything by hand you can follow the MacOS instruction below.

NOTE: The installation will NOT WORK when you operate as ‘root’ under Linux! Switch the user BEFORE you download the files.

Windows/MacOS:

Please download the latest SEPIA-Home release found here. Create a folder called ‘SEPIA’ in your home directory and extract the ZIP-file with the tool of your choice to this folder (technically the folder path does not matter but it may make additional configuration easier and I will refer to it below ^_^).

Common:

Finally you should see ~\SEPIA\setup.sh(Linux/MacOS) or %userprofile%\SEPIA\setup.bat(Windows) on your hard drive.

Step3: Run setup and start server

Now we will setup SEPIA-Home. Basically that means we will write some data to the database and create 2 users (admin and assistant).

Go to your SEPIA folder (see step 2) and run the setup script via: bash setup.sh (Linux/MacOS) or double-click setup.bat(Windows).

Inside the setup choose option 4 to start Elasticsearch and then option 1 to setup SEPIA-Home. Remember the passwords you set! ;-). You can skip the other options for now.

If everything worked out (check console for errors) you can use one of the run-scripts via: bash run-sepia.sh (Linux/MacOS) or double-click on run-sepia.bat (Windows) to finally start the server. With test-cluster.bat or test-cluster.sh you can test again if everything is running as planned, if not (O_o) check sepia-*/log.out for errors.

Step4: Connect to your server via a SEPIA client

Congratulations, you are almost done! :-) The final step is to test if our SEPIA client can actually speak to the server we just installed.

Since the SEPIA-Home stack includes the web-version of the SEPIA cross-platform client (and the Android/iOS app is not yet officially released during the time of writing) we will us this for testing. Open the client in any browser using IP and PORT of our server. For a default SEPIA-Home installation the address is:

http://[server-IP]:20721/app/index.html

If you’ve installed and started SEPIA-Home on the same machine that runs your browser you can replace [server-IP] with localhost or you can try to use the hostname/computer-name of your server adding the .local domain (this depends a bit on your system/network setup). For a fresh Raspberry Pi the following might work:

http://raspberrypi.local:20721/app/index.html

In Linux, MacOS and Windows you can use the hostname command via the terminal to get the name or ip a | grep inet (Linux/MacOS) and ipconfig (Windows) to find out the IP address of the server.

Once you’ve managed to open the client enter the server IP in the ‘hostname’ field (the page will quickly reload), use admin@sepia.localhost as user (default admin ID, we use it ONLY for testing here) and enter the password you’ve given the admin during setup (step3).

VOILA you’re online and ready to chat with SEPIA ^_^.

Testing the client-server connection (SEPIA client 2019)

Where to go from here?

Now that you got your own server up and running there are a few things you should do next. Start with creating a new user and login with it (don’t continue as admin!) then check-out the tutorial inside the client and use the settings menu to choose your language (currently German and English are supported). Your first question to SEPIA could be “help” to get an idea of what SEPIA can do (e.g. navigaton, radio, to-do lists, reminders, etc.).

Here are some more suggestions from the SEPIA Wiki:

Another thing to consider is switching to your own speech recognition server ’cause you ain’t 100% private as long as you use a 3rd-party cloud-ASR ;-)

It is still hard for open-source ASR to compete with the big ones (Google, Microsoft, etc.), but results are improving constantly and are already pretty good when you limit the vocabulary to a smaller domain (like smart-home).

If you have any questions or want to report a bug please visit:

I hope you’ll enjoy SEPIA as much as I do :-) If you want to stay up to date and get the latest updates follow SEPIA on Twitter or star the release repository on GitHub!

Cu around!

--

--

Florian Quirin
SEPIA Framework

Physicist, data scientist, Java and web developer, AI enthusiast, Raspberry Pi hacker and bot (framework) builder.