Skip to main content
Version: Stable 4.x

Install using the installer

This guide walk you though the steps required to install LibreTime on your system using the installer.

The installer is shipped in the released tarballs or directly in the project repository.

Installing on one of the following distribution releases is recommend:

Before installing

Before installing LibreTime, you need to make sure you operating system is up to date and configured.

Operating system time configuration

Check your operating system time configuration using the following command:

sudo timedatectl
               Local time: Fri 2022-08-05 12:43:39 CEST
Universal time: Fri 2022-08-05 10:43:39 UTC
RTC time: Fri 2022-08-05 10:43:40
Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no

Make sure that your time zone is configured, if not you can set it using the timedatectl set-timezone command. The following command configure the timezone to Europe/Paris, make sure to set your own timezone:

sudo timedatectl set-timezone Europe/Paris

If the NTP service is inactive, you should consider enabling it using the timedatectl set-ntp command. The following command enables the NTP service:

sudo timedatectl set-ntp true

Finally, check that everything was applied by running timedatectl:

sudo timedatectl


You can either download the latest released tarball or clone the repository.

Download the latest released tarball from Github.

Or directly from the command-line:


And extract the tarball:

tar -xvf libretime-4.0.0.tar.gz && cd libretime

Run the installer

By default the installer will configure LibreTime to listen at the port 8080. We recommend that you configure a reverse proxy in front of LibreTime to secure the connection using HTTPS, and route the traffic from the ports 80/443 to the LibreTime server.

Install LibreTime with the following command, be sure to replace with the public url of your installation:

sudo ./install

When upgrading be sure to run the installer using the same arguments you used during the initial install.

If you need to change some configuration, the install script can be configured using flags or environment variables. Changing the listening port of LibreTime or whether you want to install some dependency by yourself, you could run the following:

# Install LibreTime on your system with the following tweaks:
# - don't install the liquidsoap package (remember to install liquidsoap yourself)
# - set the listen port to 8081
# - don't run the PostgreSQL setup (remember to setup PostgreSQL yourself)
sudo \
./install \
--listen-port 8081 \
--no-setup-postgresql \

You can persist the install configuration in a .env file next to the install script. For example, the above command could be persisted using the .env file below, and you should be able to run the install script without arguments:


The install script will use generated passwords to create the PostgreSQL user, RabbitMQ user and to update the default Icecast passwords. Those passwords will be saved to the configuration files.

Feel free to run ./install --help to get more details.

Using the system audio output

If you plan to output analog audio directly to a mixing console or transmitter, the user running LibreTime needs to be added to the audio user group using the command below:

sudo adduser libretime audio

Setup LibreTime

Once the installation is completed, edit the configuration file at /etc/libretime/config.yml to fill required information and to match your needs.

You may have to configure your timezone to match the one configured earlier:

   # The server timezone, should be a lookup key in the IANA time zone database,
# for example Europe/Berlin.
# > default is UTC
- timezone: UTC
+ timezone: Europe/Paris

Next, run the following commands to setup the database:

sudo -u libretime libretime-api migrate

Finally, start the services, and check that they're running using the following commands:

sudo systemctl start

sudo systemctl --all --plain | grep libretime

Securing LibreTime

Install Certbot

The first step to using Let’s Encrypt to obtain an SSL certificate is to install the Certbot software on your server:

sudo apt install certbot python3-certbot-nginx

Let’s Encrypt’s certificates are only valid for ninety days. The certbot package takes care of this for you by adding a systemd timer that will run twice a day and automatically renew any certificate that’s within thirty days of expiration.

You can query the status of the timer using:

sudo systemctl status certbot.timer

Configure a reverse proxy

Next, you have to configure a reverse proxy to route the traffic from port 80 to LibreTime (port 8080).

Copy the following in a new Nginx configuration file, make sure to replace with your own domain name:

server {
listen 80;
listen [::]:80;


location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;

proxy_pass http://localhost:8080/;

Enable the new reverse proxy configuration, make sure to replace with your own domain name:

sudo ln -s /etc/nginx/sites-{available,enabled}/

Then, check that the nginx config is valid and reload nginx:

sudo nginx -t

sudo systemctl reload nginx

Obtain a certificate

Certbot provides a variety of ways to obtain SSL certificates through plugins. The Nginx plugin will take care of reconfiguring Nginx and reloading the config whenever necessary.

To request a Let’s Encrypt certificate using Certbot with the Nginx plugin, be sure to replace with the domain name of your installation and run the following:

sudo certbot --nginx -d

Setup the certificate for Icecast

By default, browsers will prevent loading mixed content on secure pages, so you won't be able to listen the insecure Icecast streams on a secure website. To fix that you need to secure the Icecast streams.

Create a Icecast specific SSL certificate bundle, be sure to replace with the domain name of your installation:

sudo bash -c "install \
--group=icecast \
--mode=640 \
<(cat /etc/letsencrypt/live/{fullchain,privkey}.pem) \

Enable the secure socket and set the SSL certificate bundle path in the Icecast configuration file:

     <!-- You may have multiple <listen-socket> elements -->
<!-- <bind-address></bind-address> -->
<!-- <shoutcast-mount>/stream</shoutcast-mount> -->
- <!--
- -->
         <!-- Aliases: can also be used for simple redirections as well,
this example will redirect all requests for http://server:port/ to
the status page
<alias source="/" destination="/status.xsl"/>
<!-- The certificate file needs to contain both public and private part.
Both should be PEM encoded.
+ <ssl-certificate>/etc/icecast2/bundle.pem</ssl-certificate>

Restart Icecast to apply the changes:

sudo systemctl restart icecast2

Next, you need to change the LibreTime stream.outputs.icecast.*.public_url configuration to use the newly enabled Icecast secure port:

     # Icecast output streams.
# > max items is 3
- <<: *default_icecast_output
enabled: true
- public_url:
+ public_url:
mount: main.ogg
format: ogg
bitrate: 256

- <<: *default_icecast_output
enabled: true
- public_url:
+ public_url:
mount: main.mp3
format: mp3
bitrate: 320

Restart the LibreTime to apply the changes:

sudo systemctl restart

Finally, you need to configure the Certbot renewal to bundle a Icecast specific SSL certificate and restart the Icecast service:

 # Options used in the renewal process
account = d76ce6a241c7c74f79e5443216ee420e
authenticator = nginx
installer = nginx
server =
+deploy_hook = 'bash -c "install --group=icecast --mode=640 <(cat $RENEWED_LINEAGE/{fullchain,privkey}.pem) /etc/icecast2/bundle.pem && systemctl restart icecast2"'

Check that the renewal configuration is valid:

sudo certbot renew --dry-run

Setup the certificate for Liquidsoap

To stream audio content from an external source to the LibreTime server, Liquidsoap creates input harbors (Icecast mount points) for the clients to connect to. These mount points are insecure by default, so it's recommended secure them.

To enable the secure input streams, edit the configuration file at /etc/libretime/config.yml with the following, be sure to replace with the domain name of your installation:

- harbor_ssl_certificate:
- harbor_ssl_private_key:
+ harbor_ssl_certificate: /etc/letsencrypt/live/
+ harbor_ssl_private_key: /etc/letsencrypt/live/
mount: main
port: 8001
- secure: false
+ secure: true

mount: show
port: 8002
- secure: false
+ secure: true

Restart the LibreTime to apply the changes:

sudo systemctl restart

First login

Once the setup is completed, log in the interface (with the default user admin and password admin), and edit the project settings (go to Settings > General) to match your needs.


Remember to change your password.