Skip to content

Manual Package installation (including digital voice)

kajoty edited this page May 2, 2024 · 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 system running a fresh Debian Bullseye installation. The instructions should translate to other versions of Debian as well as other Debian-based distributions, but you may need to adapt to minor differences in some places.

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 libsamplerate-dev libpython3-dev

Install csdr from source:

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

Install pycsdr from source:

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

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 please check the Supported Hardware page to see if your device requires it.

You can either use packages provided by your distribution...

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

... 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 ../..
sudo ldconfig

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 and on some of the device specific notes pages on this 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 libudev-dev libicu-dev

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:

sudo adduser --system --group --no-create-home --home /nonexistent --quiet codecserver
sudo 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 pydigiham from source:

git clone -b master https://github.com/jketterl/pydigiham.git
cd pydigiham
sudo python3 setup.py 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-qmake 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 -qt=qt5 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.

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 https://sourceforge.net/projects/wsjt/files/wsjtx-2.6.1/wsjtx-2.6.1.tgz
tar xvfz wsjtx-2.6.1.tgz
cd wsjtx-2.6.1
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.

Providing a path to bands.json

OpenWebRX searches for bands.json in the current working directory or from /etc/openwebrx/. If running OpenWebRX as a systemd service, the current working directory provided by systemd is different from the path from which openwebrx is executed. There are a few ways to ensure OpenWebRX finds bands.json:

  • Create an OpenWebRX directory: sudo mkdir /etc/openwebrx/ then copy bands.json: sudo cp bands.json /etc/openwebrx/

OR

  • Create an OpenWebRX directory: sudo mkdir /etc/openwebrx/ then create a link: sudo ln --symbolic /path/to/openwebrx/dir/bands.json /etc/openwebrx/bands.json

OR

  • Add WorkingDirectory=/path/to/openwebrx/dir/ to the [Service] section of the systemd unit file. Please note, the ExecStart line still needs a full path to the executable even if specifying a working directory.

... if bands.json is found in both the working directory and /etc/openwebrx/, the settings found in bands.json from the working directory override those from /etc/openwebrx/bands.json.

Clone this wiki locally