sintonia/docs/admin-manual/setup/install.md

5.7 KiB

title sidebar_position
Install 10

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; import vars from '@site/vars';

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

:::tip

If you are coming from Airtime, please follow the Airtime migration guide.

:::

You can install LibreTime using the one of the following methods:

Minimum system requirements

One of the supported distribution releases:

:::warning

Make sure that you have configured a firewall and it's not blocking connection to the desired ports.

LibreTime requires the following default ports to be open:

  • 80 for the web interface,
  • 8000 for the Icecast streams,
  • 8001 and 8002 for the live stream input endpoint.

:::

Using the installer

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

Download

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:

wget https://github.com/libretime/libretime/releases/download/{vars.version}/libretime-{vars.version}.tar.gz

And extract the tarball:

tar -xvf libretime-{vars.version}.tar.gz && cd libretime

Clone the project repository:

git clone https://github.com/libretime/libretime
cd libretime

:::caution

Don't use the https://github.com/libretime/libretime-debian-packaging repository, it is only used to create LibreTime packages.

:::

:::info

When upgrading, you should clean the local repository, pull the latest changes and finally check out the desired version:

cd libretime
git clean -xdf
git pull

:::

And checkout the latest version:

git checkout {vars.version}

Run the installer

Install LibreTime with the recommended options, be sure to replace PUBLIC_URL with the public url of your installation, for example https://libretime.example.com or http://192.168.10.100:80:

sudo ./install PUBLIC_URL

:::caution

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:
# - do not install the liquidsoap package (remember to install liquidsoap yourself)
# - set the listen port to 8080
# - do not run the PostgreSQL setup (remember to setup PostgreSQL yourself)
sudo \
LIBRETIME_PACKAGES_EXCLUDES='liquidsoap' \
./install \
  --listen-port 8080 \
  --no-setup-postgresql \
  https://libretime.example.com

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:

LIBRETIME_PACKAGES_EXCLUDES='liquidsoap'
LIBRETIME_LISTEN_PORT='8080'
LIBRETIME_SETUP_POSTGRESQL=false
LIBRETIME_PUBLIC_URL='https://libretime.example.com'

:::note

The install script will use randomly 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 hardware 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

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

Next, run the following commands to setup the database:

sudo -u libretime libretime-api migrate

Synchronize the new Icecast passwords into the database:

sudo libretime-api set_icecast_passwords --from-icecast-config

Finally, start the services, and check that they are running properly using the following commands:

sudo systemctl start libretime.target

sudo systemctl --all --plain | grep libretime

Configure

Once the setup is completed, log in the interface and make sure to edit the project settings (go to Settings > General) to match your needs. Important settings are:

  • Timezone
  • First day of the week

Accurate time on your server is important, make sure that your operating system is properly configured and does not go out of sync.

Next

Once completed, it's recommended to install a reverse proxy to setup SSL termination and secure your installation.