Run the ApolloTV server on your Raspberry Pi 🥧

Running a copy the server on your Raspberry Pi decreases load on the official servers, as well as giving you faster access. You can also enjoy ApolloTV even when the official server is down.

What is the ApolloTV Server?

The ApolloTV server, codename Claws, is a component of ApolloTV that runs on our machines.

We split our app into a client and server because it speeds up the app and makes updating sources simpler. When you choose to play content in the client (app), this is the software that makes the magic happen. It scrapes websites for the content and returns the content to the app.

Setting up Claws on your Raspberry Pi (or other Debian machine)

Lines that start with a # are comments explaining the commands (below them) that should be executed.

Commands are on any lines that start with a $ . The command is all text to the right of the dollar sign.
E.g. for the line $ sudo su the command that you would copy would besudo su

# Obtain root permissions

# This will save you from typing your password over and over.

$ sudosu

​

# Update your Pi

$ apt update -y

$ apt upgrade -y

​

# Install Git

$ apt install -y git

# Install Redis

$ apt install -y redis-server

​

# Install NodeJS

# This isn't in the official apt repository, so we're using their

# apt repository.

# Should this step fail with the message 'You appear to be running on

# ARMv6 hardware...', see the section below: manually install NodeJS.

$ curl -sL https://deb.nodesource.com/setup_11.x |bash -

$ apt install -y nodejs

​

# Install PM2 (process manager 2)

# IMPORTANT: Be sure to copy the '-g'

$ npminstall -g pm2

​

# Add a reference to PM2 in the applications directory

# If you see the message 'failed to create symbolic link... File exists',

# that's fine. That just means the installer already did this step for

# you.

$ ln -s /opt/nodejs/bin/pm2 /usr/bin/pm2

​

# Typing the command 'exit' will log you out of

# the root user (provided you executed sudo su at the

# beginning of the guide.)

$ exit

​

# Create and open a directory for Claws

$ mkdir"~/ApolloTV"&&cd$_

# Download a copy of the server to the current directory

$ git clone https://github.com/ApolloTVofficial/Claws .

​

# Install the necessary libraries

$ npminstall

​

# Copy the example configuration to the real configuration

# location.

$ cp .env.dist .env

By following the above steps, you will have Claws setup in /home/pi/ApolloTV (where pi is your username.)

Manually install Node.JSYou can safely ignore this if you were able to set up Node.JS.
This section is specifically for the Raspberry Pi.