Install Loud ML with Debian Packageedit

The Debian package for Loud ML can be downloaded from our APT repository. It can be used to install Loud ML on Debian and Ubuntu.

All stable versions of Loud ML can be found in our APT repository

Import the Loud ML PGP Keyedit

curl -s | sudo bash

These instructions do not use add-apt-repository for several reasons:

  1. add-apt-repository adds entries to the system /etc/apt/sources.list file rather than a clean per-repository file in /etc/apt/sources.list.d
  2. add-apt-repository is not part of the default install on many distributions and requires a number of non-default dependencies.
  3. Older versions of add-apt-repository always add a deb-src entry which will cause errors because we do not provide a source package. If you have added the deb-src entry, you will see an error like the following until you delete the deb-src line:

    Unable to find expected entry 'main/source/Sources' in Release file
    (Wrong sources.list entry or malformed file)

Install Dependenciesedit

Debian 9 ships with both Python 3 and Python 2 pre-installed.

You can check the version of Python 3 that is installed in the system by typing:

python3 -V

Installing from the APT repositoryedit

You can install the Loud ML Debian package with:

sudo apt-get update && sudo apt-get install loudml

On systemd-based distributions, the installation scripts will attempt to set kernel parameters (e.g., vm.max_map_count); you can skip this by masking the systemd-sysctl.service unit.

SysV init vs systemdedit

Loud ML is not started automatically after installation. How to start and stop Loud ML depends on whether your system uses SysV init or systemd (used by newer distributions). You can tell which is being used by running this command:

ps -p 1

Running Loud ML with SysV initedit

Use the update-rc.d command to configure Loud ML to start automatically when the system boots up:

sudo update-rc.d loudmld defaults 95 10

Loud ML can be started and stopped using the service command:

sudo -i service loudmld start
sudo -i service loudmld stop

If Loud ML fails to start for any reason, it will print the reason for failure to STDOUT. Log files can be found in /var/log/loudml/.

Running Loud ML with systemdedit

To configure Loud ML to start automatically when the system boots up, run the following commands:

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable loudmld.service

Loud ML can be started and stopped as follows:

sudo systemctl start loudmld.service
sudo systemctl stop loudmld.service

These commands provide no feedback as to whether Loud ML was started successfully or not. Instead, this information will be written in the log files located in /var/log/loudml/.

By default the Loud ML service doesn’t log information in the systemd journal. To enable journalctl logging, the --quiet option must be removed from the ExecStart command line in the loudmld.service file.

When systemd logging is enabled, the logging information are available using the journalctl commands:

To tail the journal:

sudo journalctl -f

To list journal entries for the loudmld service:

sudo journalctl --unit loudmld

To list journal entries for the loudmld service starting from a given time:

sudo journalctl --unit loudmld --since  "2017-01-01 09:11:13"

Check man journalctl or for more command line options.

Checking that Loud ML is runningedit

You can test that your Loud ML node is running by sending an HTTP request to port 8077 on localhost:


which should give you a response something like this:

  "version" : "1.6.0",
  "tagline" : "The Disruptive Machine Learning API"

Configuring Loud MLedit

Loud ML defaults to using /etc/loudml for runtime configuration. The ownership of this directory and all files in this directory are set to root:loudml on package installation and the directory has the setgid flag set so that any files and subdirectories created under /etc/loudml are created with this ownership as well. It is expected that this be maintained so that the loudmld process can read the files under this directory via the group permissions.

Loud ML loads its configuration from the /etc/loudml/config.yml file by default. The format of this configuration file is explained in Configuring Loud ML.

Loud ML loads and saves its runtime data from the /var/lib/loudml directory. The content of this directory must not be edited.

The Debian package also has a system configuration file (/etc/default/loudml), which allows you to set the following parameters:


Maximum number of open files, defaults to 65536.


Configuration file directory (which needs to include config.yml, file); defaults to /etc/loudml.


Configure restart on package upgrade, defaults to false. This means you will have to restart your Loud ML instance after installing a package manually.


Distributions that use systemd require that system resource limits be configured via systemd rather than via the /etc/sysconfig/loudml file. See Systemd configuration for more information.

Directory layout of Debian packageedit

The Debian package places config files, logs, and the data directory in the appropriate locations for a Debian-based system:

Type Description Default Location Setting


Loud ML home directory or $LM_HOME



Configuration files including config.yml




Environment variables including heap size, file descriptors.



The location of the data files of each model defined on the node.



Next stepsedit

You now have a test Loud ML environment set up. Before you start serious engineering go into production with Loud ML, you will need to do some additional setup: