6.4 KiB
title | sidebar_position |
---|---|
Install using the installer | 20 |
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 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
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.gzAnd extract the tarball:
tar -xvf libretime-{vars.version}.tar.gz && cd libretimeClone 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's 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 https://libretime.example.com
with the public url of your installation:
sudo ./install https://libretime.example.com
:::caution
When upgrading be sure to run the installer using the same arguments you used during the initial install.
:::
:::warning
To update the LibreTime nginx configuration file, for example to change the --listen-port
, make sure to add the --update-nginx
flag to allow overwriting the existing configuration file.
:::
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 8080
# - don't 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 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 libretime.target
sudo systemctl --all --plain | grep libretime
Securing LibreTime
Once LibreTime is running, it's recommended to install a reverse proxy to setup SSL termination and secure your installation.
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.
:::warning
Remember to change your password.
:::