Skip to content

Manual Package installation (including digital voice)

Jakob Ketterl edited this page Aug 3, 2021 · 63 revisions

This is a quick rundown of the packages (including optional ones) that openwebrx works with. The base system used for these instructions was a Raspberry Pi running Raspbian, and the instructions should translate well to most Debian-based distributions.

Prerequisites

OpenWebRX requires Python version 3.5 at the least. Please make sure that either your distribution has a sufficiently up-to-date version available, or install one from a different source.

Install required packages:

Distribution packages:

sudo apt-get update &&\
sudo apt-get install git build-essential cmake libfftw3-dev python3 python3-setuptools rtl-sdr netcat libsndfile-dev librtlsdr-dev automake autoconf libtool pkg-config

Install csdr from source:

git clone -b master https://github.com/jketterl/csdr.git
cd csdr
autoreconf -i
./configure
make
sudo make install
cd ..
sudo ldconfig

Install js8py library from source:

git clone -b master https://github.com/jketterl/js8py.git
cd js8py
sudo python3 setup.py install
cd ..

Optional: Install SoapySDR

Depending on the SDR hardware you intend to use, you may need to install SoapySDR. If you are unsure: most SDRs except for RTL-SDR sticks will require SoapySDR to be installed. You can either use packages provided by your distribution...

sudo apt-get install libsoapysdr0.6 libsoapysdr-dev soapysdr-tools
# also install sdr-specific modules:
sudo apt-get install soapysdr-module-all

If installing on Ubuntu 20, you may need to replace "libsoapysdr0.6" with "libsoapysdr0.7".

... or compile it from source:

git clone https://github.com/pothosware/SoapySDR.git
cd SoapySDR
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..

If you compile from source, or if the module you require is not available as a package, you will need to compile the SoapySDR module for your SDR hardware. Listing compilation instructions for all of them is beyond this guide, but there is documentation available on the the SoapySDR wiki. The installation usually follows the same pattern as SoapySDR itself. You may need to install additional dependencies, they are usually also listed on the module pages.

Note: if you wish to come back and install SoapySDR at a later point, please make sure you also recompile the owrx_connector.

Install owrx_connector from source:

git clone -b master https://github.com/jketterl/owrx_connector.git
cd owrx_connector
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..
sudo ldconfig

Install optional packages for digital voice:

Distribution packages:

sudo apt-get install sox libprotobuf-dev protobuf-compiler

Install codecserver from source:

git clone -b master https://github.com/jketterl/codecserver.git
cd codecserver
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..
sudo ldconfig

Create codecserver user and set permissions for serial devices, if necessary:

adduser --system --group --no-create-home --home /nonexistent --quiet codecserver
usermod -aG dialout codecserver

The username "codecserver" is used for the systemd service unit, so if you want to chose another user to run codecserver as, please adapt accordingly.

If necessary, configure and make sure it's running:

sudo nano /usr/local/etc/codecserver/codecserver.conf
sudo systemctl daemon-reload
sudo systemctl restart codecserver

Install digiham from source:

git clone -b master https://github.com/jketterl/digiham.git
cd digiham
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..

Install codec2 from source:

git clone https://github.com/drowe67/codec2.git
cd codec2
mkdir build
cd build
cmake ..
make
sudo make install
# manually install freedv_rx since it's not part of the default install package
sudo install -m 0755 src/freedv_rx /usr/local/bin
cd ../..
sudo ldconfig

Install m17-cxx-demod:

sudo apt-get install libboost-program-options-dev
git clone https://github.com/mobilinkd/m17-cxx-demod.git
cd m17-cxx-demod
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..

Install optional dependencies for DRM:

This snippet uses the older version 2.1.1 of dream on purpose. The latest version 2.2 unfortunately has some issues, and reportedly does not work properly with OpenWebRX. It's recommended to stick with 2.1.1.

sudo apt-get install qt5-default libpulse0 libfaad2 libopus0 libpulse-dev libfaad-dev libopus-dev libfftw3-dev wget
wget https://downloads.sourceforge.net/project/drm/dream/2.1.1/dream-2.1.1-svn808.tar.gz
tar xvfz dream-2.1.1-svn808.tar.gz
cd dream
qmake CONFIG+=console
make
sudo make install
cd ..

Install optional packages for Packet / APRS:

Direwolf can be installed as a package on most systems:

sudo apt-get install direwolf

Or, if you wish to install from source:

sudo apt-get install libasound2-dev
git clone https://github.com/wb2osz/direwolf.git
cd direwolf
git checkout 1.6
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..

Install the aprs-symbols to be able to display APRS positions on the map (you can change the destination, if you update the config accordingly):

Note: The default location has changed from /opt/aprs-symbols to /usr/share/aprs-symbols with version 1.0. If you want to continue using your existing copy, please either move it to the new location, or update your configuration accordingly.

sudo git clone https://github.com/hessu/aprs-symbols /usr/share/aprs-symbols

Install optional packages for WSJT-X modes (FT8, FT4, WSPR, JT65, JT9)

Please follow the installation instructions provided on the WSJT-X homepage, using a provided package for your distribution is preferred.

Distribution packages:

sudo apt-get install sox

Source compilation notes (for when there's no package available)

This seems to be kind of a moving target, so the following is provided rather as a known-good procedure. If you notice it has been updated, please let me know.

sudo apt-get install asciidoc automake libtool texinfo gfortran libhamlib-dev qtbase5-dev qtmultimedia5-dev qttools5-dev asciidoctor libqt5serialport5-dev qttools5-dev-tools libudev-dev xsltproc libboost-dev libboost-log-dev libboost-regex-dev wget
wget http://physics.princeton.edu/pulsar/k1jt/wsjtx-2.4.0.tgz
tar xvfz wsjtx-2.4.0.tgz
cd wsjtx-2.4.0
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..

Data storage

OpenWebRX needs a directory to store dynamic data from the web configuration interface. The default path for this directory is /var/lib/openwebrx but this can be changed in openwebrx.conf if necessary.

In this step, you will need to create the directory and set its permissions accordingly. Please replace [openwebrx-user] with the name of the user that OpenWebRX will run as. Make sure to include the period (.) after the username as that will also change the group ownership of the file:

sudo mkdir /var/lib/openwebrx
sudo chown [openwebrx-user]. /var/lib/openwebrx

The next step initializes an empty user storage. This step will overwrite an existing user database without any further warning, so if you want to keep your existing user database, skip this step:

sudo sh -c "echo [] > /var/lib/openwebrx/users.json"
sudo chown [openwebrx-user]. /var/lib/openwebrx/users.json
sudo chmod 0600 /var/lib/openwebrx/users.json

Running

After cloning this repository and connecting an SDR device to your computer, you can run the server:

git clone -b master https://github.com/jketterl/openwebrx.git
cd openwebrx
./openwebrx.py

You can now open the GUI at http://localhost:8073.

Creating an initial user for the web configuration interface

See the user management documentation for more details.

./openwebrx.py admin adduser [username]

Installing OpenWebRX as a systemd service

If you want the receiver to start with your system, you can set it up as a systemd service unit. You can find a template unit file in the systemd folder. You will need to configure the User, Group, ExecStart and Path according to your environment. After installing the file into /etc/systemd/system, run sudo systemctl daemon-reload.

The following commands are available:

  • sudo systemctl enable openwebrx enables automatic startup of the receiver at boot
  • sudo systemctl disable openwebrx disables it again
  • sudo systemctl start openwebrx starts the service manually
  • sudo systemctl stop openwebrx stops the service manually
  • sudo systemctl restart openwebrx restarts the service. This is very useful after changing configuration.
Clone this wiki locally