Menu

Guide: Odroid n2+ as Jamulus Server

Pieter Bos
2021-01-23
2021-01-23
  • Pieter Bos

    Pieter Bos - 2021-01-23

    I just finished setting up and optimizing a Jamulus server on an Odroid n2+. It is a rather fast yet very power efficient board, with a CPU with 4 fast cores and 2 slower energy efficient ones. With this setup, if I connect through my local network I can set the jitter buffer to 2 local 1 server and get absolutely stable results, with both to 1 nearly stable. This server should be fast enough for about 20-30 people, but I have not tried that many yet. Running idle, it should consume less than 2 Watt. So, I decided to write a small guide.

    What you need:
    - an Odroid n2 or n2+, 2GB RAM is enough for Jamulus
    - a power supply
    - an UTP cable

    and either one of the following:
    - A microSD Card and sd-card reader
    - an odroid eMMC module and eMMC module writer

    All of this should cost between €120 and €150, including VAT, including the SD Card reader. You can also use the micro-USB port on the odroid instead of the cardreader, but this is a couple of more steps that this guide does not cover.

    Flashing the image

    The steps to do this:
    1. Download Armbian Focal from https://www.armbian.com/odroid-n2/ . Download Armbian Focal, do NOT download Armbian Buster. If you are reading this in the future and they updated the names, you want the Ubuntu one, not the Debian one. This is because it is easier to setup the low latency kernel, which makes a difference in latency. Do not download the desktop version unless you want to use this server for other purposes as well.
    2. Use Etcher (windows/linux) or Balena Etcher (mac os) to flash the download image to an SD Card or the eMMC
    3. Insert the SD Card or eMMC in the board
    4. Set the switch to boot from mmc
    5. Connect the network cable.
    6. Connect the power supply

    Logging in an updating

    Now, either connect a monitor and keyboard, or connect through SSH. If connecting through SSH, usually you can connect to the hostname odroidn2. The username is root, password 1234. It will prompt you to change the password and setup a new user, do so.
    First, update the OS:
    sudo apt-get update sudo apt-get upgrade

    Installing the low-latency kernel

    Now login as your newly created user, and type:

    sudo apt-get install ubuntustudio-lowlatency-settings

    This will install the low latency kernel settings, which should help you get rid of a bit of latency. If this step failed, you probably downloaded the wrong image at step 1 of Flashing the image. Reboot the board with the new kernel by typing
    reboot
    and wait until it has rebooted. If you type uname -a, there should be the word PREEMPT somewhere in the output.

    Installing Jamulus

    Now follow the setup guide at https://jamulus.io/wiki/Installation-for-Linux . Under the step 'Install dependencies', be sure to follow the instructions for Ubuntu-based distributions.
    Then follow the instructions at https://jamulus.io/wiki/Server-Linux , under 'Running a “headless” server', but change one step:

    When you are creating the Jamulus.service file, edit one line in it. In the guide, it mentions the following line:
    ExecStart=/usr/local/bin/Jamulus -s -n -e jamulus.fischvolk.de -o "yourServerName;yourCity;[country ID]"

    We are going to add two configuration options here: -F for small network buffers, and -T for multithreading. The first helps reducing latency, and the second is to make sure Jamulus can use the four fast CPU cores efficiently, so you can support more people on your server. So this is what you want instead:
    ExecStart=/usr/local/bin/Jamulus -s -n -T -F -e jamulus.fischvolk.de -o "yourServerName;yourCity;[country ID]"
    Of course, be sure to set your server name, your city and the country id. The country id is a number, and you can get the correct one from https://doc.qt.io/qt-5/qlocale.html#Country-enum. I set the country ID to 151, which is The Netherlands.

    If you want a private server instead of a public one, remove the -e jamulus.fischvolk.de-part, and setup the correct port forwarding at your router.

    Then continue the setup. Now you should have a relatively inexpensive, large capacity, stable and power efficient jamulus server.

    Note: this guide should work on all boards that can run Armbian, not just the odroid n2 or n2+.

     
    👍
    1
  • DonC

    DonC - 2021-01-23

    I have been running a server on an Odroid-N2 (the previous, slightly slower version of the N2+) under Ubuntu 20.04 since June. I can only recommend this hardware.
    Here my report on server speed testing:
    https://sourceforge.net/p/llcon/discussion/server/thread/ff2e90fafd/#52ca