Clear Across Kansas

Creating a YSFReflector

The YSFReflector registration site:

How To Install and Configure a YSFReflector


  • Raspberry Pi (any model) with SD card imaged with Raspbian Stretch Lite
  • Installing on an older version of Raspbian or Debian may require adjusting file paths, etc.

Log in as root (or su -).

Update your system:
apt-get update && apt-get upgrade

Install git:
apt-get install git

Copy the source code from github:
git clone

This copies the actual sources of the whole YSFClients-Project into a folder “YSFClients”. Within this directory you’ll find a folder “YSFReflector”.

Type cd ./YSFClients/YSFReflector

then make clean all

A minute later the compile process is done and you have an executable file “YSFReflector”.

Within the directory you also have YSFReflector.ini that you need to customize to your own needs. Fill in the following:
Name=Your Reflector's name
Description=Your Reflector's description

There is also a line


that forces the reflector-executable to run as a deamon after startup. For this you’ll need to setup a user “mmdvm” on your linux-system. This can be done with:
groupadd mmdvm
useradd mmdvm -g mmdvm -s /sbin/nologin

As a last step of installation, you may want to have the services started automatically at boot. Therefore you’ll need a start-up script. Using WinSCP, browse to /etc/init.d and create a file called and paste the following text:

# Provides:             YSFReflector
# Required-Start:       $all
# Required-Stop:        
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
# Short-Description:    Example startscript YSFReflector

## Fill in name of program here.

start() {
      if [ -e $PIDFILE ]; then
          ## Program is running, exit with error.
          echo "Error! $PROG is currently running!" 1>&2
          exit 1
          cd $PROG_PATH
          ./$PROG $PROG_ARGS
          echo "$PROG started"
          touch $PIDFILE

stop() {
      if [ -e $PIDFILE ]; then
          ## Program is running, so stop it
         echo "$PROG is running"
         rm -f $PIDFILE
         killall $PROG
         echo "$PROG stopped"
          ## Program is not running, exit with error.
          echo "Error! $PROG not started!" 1>&2
          exit 1

## Check to see if we are running as root first.
## Found at
if [ "$(id -u)" != "0" ]; then
      echo "This script must be run as root" 1>&2
      exit 1

case "$1" in
          exit 0
          exit 0
          sleep 5
          exit 0
          echo "Usage: $0 {start|stop|reload}" 1>&2
          exit 1
exit 0
### END

Move the binary and .ini files to their proper places:
cd /YSFClients/YSFReflector
mv YSFReflector /usr/local/bin
mv YSFReflector.ini /etc

To enable the service:
apt-get install chkconfig
chkconfig on

To start the service simply reboot. reboot

One final word: Every (system-relevant) changes you make (for example name or description) are updated automatically in the registration-database by polling-mechanism each 5 minutes. If you want to change hostname/ip-address or port-number, you can do this in the self-service after logging in.

The YSFReflector Dashboard can be installed from source by following instructions from here:

This short how-to describes step-by-step how to install the YSFReflector-Dashboard on a system using a Debian Linux distribution.

## Installation Steps (as root) ##

Install a webserver:

apt-get install apache2

Create a group for the webserver and add yourself to it:
groupadd www-data
usermod -G www-data -a

Set permissions so you and the webserver have full access to the files:
chown -R www-data:www-data /var/www/html
chmod -R 775 /var/www/html

Install PHP5 and enable the required modules:
apt-get install php7.0-common php7.0-cgi php7.0

Now you can clone the dashboard into your home directory:

cd ~
git clone

Next, you need to copy the files into the webroot so they can be served by apache2:
cp -R /root/YSFReflector-Dashboard/* /var/www/html/

To make sure the dashboard is served instead of the default “index.html”:
rm /var/www/html/index.html

To enable PHP in Apache2:
apt-get install libapache2-mod-php7.0

Next configure the dashboard by pointing your browser to http://IP-OF-YOUR-YSFREFLECTOR/setup.php
When configuring the dashboard, make sure to set the correct paths for logs, etc. If they are wrong, no last-heard or similar information will be shown on the dashboard!
This will create /var/www/html/config/config.php which contains your custom settings.

Now the dashboard should be reachable via http://IP-OF-YOUR-YSFREFLECTOR/

Finally, after verifying everything is working correctly, remove or rename the setup.php file so “hackers” can’t modify your config:
rm /var/www/html/setup.php

Note: It may take 24 to 48 hours for your new reflector to appear in Pi-Star’s reflector list.

Notice: These instructions are provided here for my own future reference. You may use them, provided that you understand that:

  • This is not my software and I didn’t write it.
  • These instructions are provided without warranty.
  • Spend some time researching a problem before asking for a quick answer.

Recent Posts