Jamulus Icon. Links to Wiki homepage
Open navigation

Server Installation - Linux

Please ensure you have read the server overview

Running a server with the GUI

If you plan to run a server on your desktop machine (and you have installed the Jamulus client already), you can run it in your chosen server mode by running Jamulus with the -s option as follows:

  1. Open a terminal window (CTRL+ALT+t on Ubuntu and related distros).
  2. Assuming Jamulus is in /usr/local/bin, type Jamulus -s

Hit return and you should see the server control window. You can stop the server by closing the server window, or by typing CTRL+C in the terminal.

To configure the server, please refer to the Windows & macOS instructions.

See also Command Line Options for other parameters you can set.

Running a “headless” server

The following guide is for running Jamulus as a “pure” server on hardware without audio (e.g. on a 3rd party/cloud host) and assumes Ubuntu/Debian distributions using systemd. We also have instructions for Raspberry Pi, which rock too.

Use the official Debian/Ubuntu headless .deb files

If you’re on amd64 Debian/Ubuntu, you may try the compiled .deb packages from GitHub Actions:

  1. Download the latest headless .deb file
  2. Update apt: sudo apt update
  3. Install the package: sudo apt install /path/to/jamulus_headless_3.7.0_ubuntu_amd64.deb
  4. Enable the headless server via systemd: sudo systemctl enable jamulus-headless
  5. Add the required command line options to the systemd service file in /lib/systemd/system/jamulus-headless.service.
  6. Reload systemd files sudo systemctl daemon-reload and restart the headless server: sudo systemctl restart jamulus-headless

You should now be running a private server!

Note: To configure the server, you can add command line flags to the file /lib/systemd/system/jamulus-headless.service e.g. make this a public server. Have a look at the Command Line Options page.

Compile sources, create a user

  1. Get the sources, install the dependent packages according to the Linux client install guide. Note that you don’t need to install the JACK package(s) for a headless build. If you plan to run headless on Gentoo, or are compiling under Ubuntu for use on another Ubuntu machine, see the footnote.
  2. Compile the sources to ignore the JACK sound library:
qmake "CONFIG+=nosound headless" Jamulus.pro
make clean
  1. Move the resulting Jamulus binary file to a permanent location, or use sudo make install. You can now remove the sources directory if you wish.

The rest of this guide assumes you are using /usr/local/bin/Jamulus

  1. Create a non-privileged system user for the server to run as (will run as user jamulus, group nogroup):

sudo adduser --system --no-create-home jamulus

Create a start script

Once you have decided which mode you want your server to run in, use systemd to start it up.

Create a systemd unit file that will start the server at boot time (thanks to David Harrold for this).

The unit file applies high priority CPU and I/O scheduling to the server process. This is optional (and may be ignored on some hosts).

Note also that the server log entries will go to journalctl (use journald to see it ).

Note: The rest of this guide assumes you are in “public” mode using the -e (--centralserver) option. This specifies which musical genre list your server will appear in. See the list of available genres here).



#### Change this to set genre, location and other parameters.
#### See [Command-Line-Options](Command-Line-Options) ####
ExecStart=/usr/local/bin/Jamulus -s -n -e jamulus.fischvolk.de -o "yourServerName;yourCity;[country ID]"



Copy the unit file to /etc/systemd/system and give it permissions:

sudo cp jamulus.service /etc/systemd/system/jamulus.service

sudo chmod 644 /etc/systemd/system/jamulus.service

Test that it starts OK:

sudo systemctl start jamulus

sudo systemctl status jamulus

You should see something like this:

● jamulus.service
   Loaded: loaded (/lib/systemd/system/jamulus.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2020-03-26 11:52:34 GMT; 4s ago
 Main PID: 1308 (Jamulus)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/jamulus.service
           └─1308 /usr/local/bin/Jamulus -s -n -e jamulus.fischvolk.de -o yourServerName;yourCity;[country ID]

Mar 26 11:52:34 oddjob systemd[1]: Started jamulus.service.
Mar 26 11:52:35 oddjob jamulus[1308]: - server mode chosen
Mar 26 11:52:35 oddjob jamulus[1308]: - no GUI mode chosen
Mar 26 11:52:35 oddjob jamulus[1308]: - central server: jamulus.fischvolk.de
Mar 26 11:52:35 oddjob jamulus[1308]: - server info: yourServerName;yourCity;[country ID]
Mar 26 11:52:35 oddjob jamulus[1308]: - welcome message: Thanks for connecting!
Mar 26 11:52:35 oddjob jamulus[1308]:  *** Jamulus, Version [version]
Mar 26 11:52:35 oddjob jamulus[1308]:  *** Internet Jam Session Software
Mar 26 11:52:35 oddjob jamulus[1308]:  *** Under the GNU General Public License (GPL)

If all is well, enable the service to start at boot with:

sudo systemctl enable jamulus

You can now also control Jamulus with the service command. For example:

sudo service jamulus status

shows whether Jamulus is running OK, and the last few lines of the log (where you will see connections recorded). Note: Press q to exit the service status.

To update your installation to a new release

Download the new sources as per the instructions above and repeat the compilation in step 2 as if for a new installation or just install the new headless .deb files. If you compiled Jamulus from source, shut down the server, copy the Jamulus binary over the old one and start it back up.

See also Command Line Options for other parameters you can set.


Controlling recordings

When using the recording function with the -Rcommand line option, if the server receives a SIGUSR1 signal during a recording, it will start a new recording in a new directory. SIGUSR2 will toggle recording enabled on/off.

To send these signals using systemd, create the following two .service files in /etc/systemd/system, calling them something appropriate (e.g. newRecording-Jamulus-server.service).

Note: You will need to save recordings to a path outside of the jamulus home directory, or remove ProtectHome=true from your systemd unit file (be aware that doing so is however a potential security risk).

For turning recording on or off (depending on the current state):

Description=Toggle recording state of Jamulus server

ExecStart=/bin/systemctl kill -s SIGUSR2 Jamulus-Server

For starting a new recording:

Description=Start a new recording on Jamulus server

ExecStart=/bin/systemctl kill -s SIGUSR1 Jamulus-Server

Note: The Jamulus service name in the ExecStart line needs to be the same as the .service file name you created when setting systemd to control your Jamulus server. So in this example it would be Jamulus-Server.service

Run sudo systemctl daemon-reload to register them for first use.

Now you can run these with the service start command, for example:

sudo service jamulusTogglerec start (assuming you named your unit file jamulusTogglerec.service)

You can see the result of these commands if you run service jamulus status, or by viewing the logs.

Viewing The Logs

Jamulus will log to the system file if you left the StandardOutput=journal setting in the unit file. Logging to the system log is recommended, as the system will manage the log file for you - no need to come back and purge it later or worry about filling up your disk space.

To view the log, use journalctl (to exit press Ctrl-C). For example, to read the system log file, filtered for the Jamulus service:

journalctl -u jamulus

For today’s entries:

journalctl -u jamulus --since today

For the last hour:

journalctl -u jamulus --since "1 hour ago"

Filter the log to see connection messages for your Jamulus server:

journalctl -u jamulus | grep connected

Follow (show on screen) Jamulus log messages as they occur:

journalctl -f -u jamulus

What does the “headless” build flag do?

Although not strictly necessary, we recommend using the headless flag to speed up the build process. Gentoo users may also be able to avoid installing some dependencies as a consequence. More information here.

Tell us about Jamulus - take our anonymous survey!

This documentation is licensed under a Creative Commons Licence. Want to get involved?