Git Product home page Git Product logo

rpi4-yocto-xeoma-server's Introduction

RPi4 Xeoma Server Image

Yocto based xeoma server running on a Raspberry Pi 4.

TODOS

  • remove the multimedia/graphics/unused layers/recipes/packages
  • ssl/tls configs
  • change ip tables xeoma server range to just the single ip, doesn't need to be a range
  • use a config file with env var for path instead of all the individual vars
  • use local time server or see if RTC will fit in the case
  • disable bluetooth
  • update /etc/systemd/system.conf, enable watchdog https://raspberrypi.stackexchange.com/questions/108080/watchdog-on-the-rpi4

other opts for systemd unit

-connectioninfoport <p>
-sslconnection
-webaddr <addr>

Hardware

Client

wget https://felenasoft.com/xeoma/downloads/xeoma_linux64.tgz
tar xf xeoma_linux64.tgz
mv xeoma.app $HOME/bin/xeoma

xeoma -client

Client wrapper script:

#!/usr/bin/env bash
# file: $HOME/bin/xeoma-client
set -e
xeoma -noscan -noscanptzandaudio -uselocaltime -client xeoma.home:8897
exit 0

Server

Config

Build

Setup environment:

# Used to sed replace variables in the iptables.rules file
export IPTABLES_XEOMA_RTSP_UDP_ALLOW_PORT_RANGE=12345:434545
export IPTABLES_XEOMA_RTSP_ALLOW_IP_RANGE=a.b.c.d-a.b.c.e
export IPTABLES_XEOMA_SERVER_ALLOW_PORT_RANGE=12345:434545
export IPTABLES_XEOMA_SERVER_ALLOW_IP_RANGE=a.b.c.d-a.b.c.e
export IPTABLES_XEOMA_HTTPS_ALLOW_IP_RANGE=a.b.c.d-a.b.c.e
export IPTABLES_ICMP_ALLOW_IP_RANGE=a.b.c.d-a.b.c.e
export IPTABLES_SSH_ALLOW_CIDR=a.b.c.d/e
export IPTABLES_ROUTER_IP=a.b.c.d
export IPTABLES_VPN_CIDR=a.b.c.d/e

export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE IPTABLES_XEOMA_RTSP_UDP_ALLOW_PORT_RANGE IPTABLES_XEOMA_RTSP_ALLOW_IP_RANGE IPTABLES_XEOMA_SERVER_ALLOW_PORT_RANGE IPTABLES_XEOMA_SERVER_ALLOW_IP_RANGE IPTABLES_XEOMA_HTTPS_ALLOW_IP_RANGE IPTABLES_ICMP_ALLOW_IP_RANGE IPTABLES_SSH_ALLOW_CIDR IPTABLES_ROUTER_IP IPTABLES_VPN_CIDR"

# Used to setup `me` user keys for ssh
export SSH_AUTH_KEYS_ME_USER="/path/to/authorized_keys"
export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE SSH_AUTH_KEYS_ME_USER"
./setup

./build

Deploy to SD Card

Find the image files:

bitbake -e rpilinux-image | grep ^DEPLOY_DIR_IMAGE
# dtb
cd /path/to/build/tmp/deploy/images/raspberrypi4-64/
cp bcm2711-rpi-4-b.dtb /media/card/BOOT/

# firmware
cd /path/to/build/tmp/deploy/images/raspberrypi4-64/bcm2711-bootfiles
cp -a ./* /media/card/BOOT/

# kernel
cp Image /media/card/BOOT/kernel_rpilinux.img

# rootfs
cd /media/card/ROOT/
sudo tar -xjf /path/tobuild/tmp/deploy/images/raspberrypi4-64/rpilinux-image-raspberrypi4-64.tar.bz2

Initial Setup

  • Change the root password, default is root
    passwd
  • Setup archive mount permissions
    mkdir -p /mnt/xeoma/data
    chmod 0700 /mnt/xeoma/data
    
    mkdir -p /mnt/xeoma/cache
    chmod 0700 /mnt/xeoma/cache
    
    # Could also use 800:800 for running on the build host
    chown -R xeoma:xeoma /mnt/xeoma
    chmod 0700 /mnt/xeoma
  • Set xeoma server admin password
    systemctl stop xeoma
    xeoma -programdir /mnt/xeoma/data -setpassword ...
    chown -R xeoma:xeoma /mnt/xeoma/data
    systemctl start xeoma
  • Format the USB3 SSD (if needed)
    TODO ext4 mkfs stuff
  • Temporarily disable iptables (if needed)
    systemctl stop iptables
    iptables -F && iptables -P INPUT ACCEPT && iptables -P OUTPUT ACCEPT && iptables -P FORWARD ACCEPT
    
    iptables-restore /etc/iptables/iptables.rules
    systemctl start iptables
    iptables -L -n -v
  • Check the services
    systemctl status
  • Check time/date/NTP
    timedatectl status

Links

rpi4-yocto-xeoma-server's People

Contributors

jonlamb-gh avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.