Greetings
can anyone help me by providing step by step instruction installing SDRTrunk on my Ubuntu Desktop machine?
I have searched and no joy. Either bad information or very old information. I would appreciate any assistance. TIA
Last tested: August 11, 2025
Tested on: Ubuntu 25.04 Server Edition with minimal GUI interface
Assumes: Logged in as a regular user with sudo privileges (not root)
Package names, commands, and steps may change in future releases.
These packages are needed to clone (git), compile (build-essential, cmake), and install (pkg-config, libusb-1.0-0-dev) the RTL-SDR drivers, as well as extract SDRTrunk bundles (unzip).
I prefer to keep all my Git repositories in ~/git, but feel free to adjust this path to your liking. While it is possible to install a pre-compiled version of RTL-SDR drivers (sudo apt install rtl-sdr), I recommend compiling the drivers as shown below.
This builds and installs the RTL-SDR drivers from source and adds udev rules so your SDR dongles can be accessed without running as root. In the line that begins with make, the other data afterwards just helps speed up the process by using all but one of the CPU cores your system has available.
By default, Ubuntu may think your RTL-SDR is a DVB-T television tuner. Blacklist the kernel module so it won’t load:
Unplug and replug your dongle, then run:
If it’s detected and no errors appear, your dongle is ready for use.
If you plan on using more than one RTL-SDR dongle, it’s important to assign each a unique serial number.
Step 5.1 – Plug in One Dongle at a TimeOnly one dongle should be plugged in for each pass.
Step 5.2 – Install the rtl-sdr UtilitiesIf you compiled from source above, you already have these tools installed.
If not, install them from the package manager:
Example output:
Found Rafael Micro R820T tuner Current EEPROM configuration: Vendor ID: 0x0bda Product ID: 0x2838 Serial number: 00000001Step 5.4 – Change the Serial NumberYou will be prompted to confirm.
Step 5.5 – Power Cycle the DongleUnplug and replug the dongle.
Step 5.6 – Verify the New Serial NumberThe serial should now reflect your chosen value.
Step 5.7 – Repeat for Each DongleRepeat for all dongles, assigning each a unique serial.
Persistent udev names let your dongles always show up with predictable names.
Step 6.1 – Get the Dongle’s Serial Numberor:
Example:
Bus 002 Device 003: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-TExample:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", ATTRS{serial}=="SDR01", SYMLINK+="rtl_sdr_airband", MODE="0666" SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", ATTRS{serial}=="SDR02", SYMLINK+="rtl_sdr_p25", MODE="0666"Step 6.4 – Reload udev RulesExample:
lrwxrwxrwx 1 root root 15 Aug 11 15:42 /dev/rtl_sdr_airband -> bus/usb/002/003SDRTrunk operates on Java and especially if you are going to build it from the latest version, which I recommend you do for the latest and greatest features, you will want to install the latest version of BellSoft’s Liberica Java Development Kit 24. At this time, that is 24.0.2+12. I will show two different methods of acquiring and installing.
Step 7.1 - Option 1 - Installing entirely from Command Line (Preferred if it works)The first command creates, if it doesn’t already exist, a folder under your home folder named Downloads and switches you to that folder. It then downloads full version of Liberica JDK 24.0.2. The last line installs it. This should also make it the default Java program for the system. To verify, jump to Step 7.3.
Step 7.2 - Option 2 - Download the file from BellSoft’s website (If Step 7.1 doesn’t work)Direct your web browser to Download Liberica JDK. As of the time of writing, JDK 24 is the latest version, so click on the link for the latest version. Then, scroll down to the 64-bit version for Linux. You will see options for x86, ARM, RISC-V, and PPC. I have not run this on any physical platform other than x86, so if you are attempting to do this on something like a Raspberry Pi, you might try ARM, but know that I cannot vouch for that working. VITAL NOTE: For building SDRTrunk, you will need the FULL JDK package, the Standard package will not work properly, ensure you select the Full JDK from the Package list. Finally, I recommend downloading the DEB package. If you have downloaded this onto a different machine, you will need to transfer it to the machine you plan on installing it on and follow the last line of Step 7.1. As a shortcut, especially if the downloaded file is something different than the file name listed in Step 7.1, after typing sudo dpkg -i bellsoft, you can hit the <Tab> key and it should autofinish the rest of the line.
Step 7.3 - Verify JavaHopefully, you have now installed the latest version of BellSoft’s Liberica JDK and we want to verify it.
This should result in something like:
openjdk version "24.0.2" 2025-07-15 OpenJDK Runtime Environment (build 24.0.2+12) OpenJDK 64-Bit Server VM (build 24.0.2+12, mixed mode, sharing)and
javac 24.0.2If this does not appear to be the case, you may need to find if you have other versions installed and what is the default. You only need to do this next section if it didn’t automatically make your latest installation the default.
This may result in something like this:
There are 7 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/lib/jvm/bellsoft-java24-full-amd64/bin/java 22400023 auto mode 1 /usr/lib/jvm/bellsoft-java22-full-amd64/bin/java 22200023 manual mode 2 /usr/lib/jvm/bellsoft-java23-full-amd64/bin/java 22300003 manual mode 3 /usr/lib/jvm/bellsoft-java24-full-amd64/bin/java 22400023 manual mode 4 /usr/lib/jvm/java-21-openjdk-amd64/bin/java 2111 manual mode 5 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode 6 /usr/lib/jvm/jdk-23/bin/java 1 manual mode 7 /usr/lib/jvm/jdk-24/bin/java 1 manual mode Press <enter> to keep the current choice[*], or type selection number:In this example, you will see that there is an asterisk by Selection 0 and you will see that it is /usr/lib/jvm/bellsoft-java24-full-amd64/bin/java, which is an appropriate default. If you see that something else is selected and you see the latest BellSoft version, type in the number corresponding with it.
If you have had to do this and javac is also incorrect, follow the previous instructions just modify it to:
This is finally the main step you have come to learn. All the previous steps are to ensure that from this point forward, you aren’t met with failures. Part of these instructions are part of my own personal preferences, so if you wish to do them a different way and you know what you are doing, feel free to just use this as just reference only.
Step 8.1 - Download the latest SDRTrunk source codeThe first line tells us to go to our git folder. The second line clones the SDRTrunk code into a folder that will be ~/git/sdrtrunk, while the next line changes to that directory. The line: ./gradlew clean build actually compiles the needed files. Below is an example of what you might see when it is done. The additional --max-workers="$(nproc)" on that line can potentially speed up the build process.
WARNING: A restricted method in java.lang.System has been called WARNING: java.lang.System::load has been called by net.rubygrapefruit.platform.internal.NativeLibraryLoader in an unnamed module (file:/home/sdr/.gradle/wrapper/dists/gradle-8.14.2-bin/2pb3mgt1p815evrl3weanttgr/gradle-8.14.2/lib/native-platform-0.22-milestone-28.jar) WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module WARNING: Restricted methods will be blocked in a future release unless native access is enabled Starting a Gradle Daemon (subsequent builds will be faster) > Task :compileJava warning: using incubating module(s): jdk.incubator.vector Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 warning > Task :compileTestJava warning: using incubating module(s): jdk.incubator.vector 1 warning > Task :test WARNING: Using incubator modules: jdk.incubator.vector [Incubating] Problems report is available at: file:///home/sdr/sdrtrunk/build/reports/problems/problems-report.html Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.14.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD SUCCESSFUL in 18s 9 actionable tasks: 9 executedYou may see a few warnings like you can see in my example, but these warnings have not caused me any issues.
It ends up creating a directory ~/git/sdrtrunk/build/distributions. In this new directory, there are two zipped files, a zip and a tar file; compiled versions of the latest version of SDRTrunk. the next line, cd build/distributions/ changes to that directory.
The last line, tar -xvf *.tar is a bit lazy, but it works. It expands one of the tar version. If you were to type in:
You might expect to see something like:
total 55799 drwxr-xr-x 4 sdr sdr 4 Aug 11 16:48 sdr-trunk-0.6.2-beta-1 -rw-rw-r-- 1 sdr sdr 30668800 Aug 11 16:48 sdr-trunk-0.6.2-beta-1.tar -rw-rw-r-- 1 sdr sdr 27805653 Aug 11 16:48 sdr-trunk-0.6.2-beta-1.zipIn my example, you will want to change directories into that listed directory: cd sdr-trunk-0.6.2-beta-1. Inside this new folder, you will see two sub-directories: bin and lib. THIS is the entire program for SDRTrunk.
Step 8.2 - Creating your SDRTrunk Main DirectoryI like to create a sub-directory under my user directory. For my purposes, I call this ~/SDRTrunk. I will now want to mv the bin and lib folders from ~/git/sdrtrunk/build/distributions/sdr-trunk-0.6.2-beta-1 into this new directory. (Obviously, if you are at a different version, that last bit 0.6.2-beta-1 maybe different).
This has now created that ~/SDRTrunk directory and moved bin and lib into it. It then changes you to that directory and it should show you those two sub-directories.
Step 9 - Starting SDRTrunkAt this point, you should have two files in ~/SDRTrunk/bin, sdr-trunk and sdr-trunk.bat. The one that we will use is sdr-trunk but we want to start it in the ~/SDRTrunk folder, so that it becomes the working directory. You can start SDRTrunk with the following command:
This is actually two commands in one (hence the double ampersands), with the first starting you in the ~/SDRTrunk folder and the other calling sdr-trunk to start in the bin sub-directory.
At first start, you will not have the ability to decode the digital audio that is received, you need to build the codec to decode the digital audio; this is called jmbe. To build jmbe, open the View→User Preferences tab. From User Preferences, look for the Decoder section. I don’t have a fresh build to verify, but I believe there is a button that will download and build JMBE Audio Library with the latest version (for a few years now) of 1.0.9.
Another likely task at the beginning of opening SDRTrunk for the first time is Vector Calibration I believe it will ask you to start the process. Just let it run its course.
These last two steps are the same, whether you are on Ubuntu or any other operating system.
Below are some issues you might encounter during installation and setup, along with suggested fixes.
Problem 1 – wget: command not foundCause: wget is not installed on minimal Ubuntu Server setups.
Fix:
Cause: tar might be missing in minimal installations.
Fix:
Possible Causes & Fixes: - Driver conflict: Ensure the DVB-T driver is blacklisted (see Step 3).
- USB port or cable issue: Try a different port or USB cable.
- Insufficient power: Use a powered USB hub if the dongle draws more current than the port can provide.
Cause: The file is missing the executable permission.
Fix:
Cause: Older Java versions or standard JDK without JavaFX installed.
Fix: Install the latest BellSoft Liberica Full JDK (see Step 7). Verify with:
Possible Causes & Fixes: - Corrupted Gradle cache:
Cause: JMBE codec not built or enabled.
Fix: In SDRTrunk, go to View → User Preferences → Decoder and click Build JMBE Audio Library.
Cause: Dongles do not have unique serial numbers or persistent udev rules.
Fix: Follow Steps 5 and 6 to assign serial numbers and create persistent device names.