2020-11-02 19:20:34 +01:00
---
2022-02-21 08:16:54 +01:00
title: Configuration
sidebar_position: 20
2020-11-02 19:20:34 +01:00
---
2022-06-06 17:10:44 +02:00
To configure LibreTime, you need to edit the `/etc/libretime/config.yml` file. This page describe the available options to configure your installation.
2020-11-02 19:20:34 +01:00
2022-02-22 16:39:46 +01:00
## General
2020-11-02 19:20:34 +01:00
2022-02-22 16:39:46 +01:00
The `general` section configure anything related to the legacy and API services.
2022-02-09 09:37:52 +01:00
2022-06-06 17:04:26 +02:00
```yml
general:
2022-08-19 22:15:28 +02:00
# The public url.
# > this field is REQUIRED
public_url: "https://example.com"
# The internal API authentication key.
# > this field is REQUIRED
api_key: "some_random_generated_secret!"
# List of origins allowed to access resources on the server, the public url
# origin is automatically included.
# > default is []
2022-07-15 13:01:39 +02:00
allowed_cors_origins: []
2022-08-19 22:15:28 +02:00
# How many hours ahead Playout should cache scheduled media files.
# > default is 1
2022-06-06 17:04:26 +02:00
cache_ahead_hours: 1
2022-08-19 22:15:28 +02:00
# Authentication adaptor to use for the legacy service, specify a class like
# LibreTime_Auth_Adaptor_FreeIpa to replace the built-in adaptor.
# > default is local
auth: "local"
2022-02-09 09:37:52 +01:00
```
2022-02-22 16:39:46 +01:00
In order to apply the changes made in this section, please restart the following services:
```
libretime-analyzer
2022-08-20 08:13:30 +02:00
libretime-api
2022-02-22 16:39:46 +01:00
libretime-playout
2022-08-20 08:13:30 +02:00
libretime-worker
2022-02-09 09:37:52 +01:00
```
2022-08-24 18:49:13 +02:00
## Storage
The `storage` section configure the project storage.
```yml
storage:
# Path of the storage directory.
# > default is /srv/libretime
path: "/srv/libretime"
```
In order to apply the changes made in this section, please restart the following services:
```
libretime-api
```
2022-02-22 16:39:46 +01:00
## Database
2020-11-02 19:20:34 +01:00
2022-02-22 16:39:46 +01:00
The `database` section configure the PostgreSQL connection.
:::caution
Before editing this section be sure to update the PostgreSQL server with the desired values.
2022-06-06 17:00:48 +02:00
#### Changing a PostgreSQL user password
You can change the `libretime` PostgreSQL user password using:
```bash
sudo -u postgres psql -c "ALTER USER libretime PASSWORD 'new-password';"
```
2022-02-22 16:39:46 +01:00
:::
2020-11-02 19:20:34 +01:00
2022-06-06 17:04:26 +02:00
```yml
database:
2022-08-19 22:15:28 +02:00
# The hostname of the PostgreSQL server.
# > default is localhost
host: "localhost"
# The port of the PostgreSQL server.
# > default is 5432
2022-06-06 17:04:26 +02:00
port: 5432
2022-08-19 22:15:28 +02:00
# The name of the PostgreSQL database.
# > default is libretime
name: "libretime"
# The username of the PostgreSQL user.
# > default is libretime
user: "libretime"
# The password of the PostgreSQL user.
# > default is libretime
password: "some_random_generated_secret!"
2022-02-22 16:39:46 +01:00
```
2020-11-02 19:20:34 +01:00
2022-02-22 16:39:46 +01:00
In order to apply the changes made in this section, please restart the following services:
```
libretime-api
2020-11-02 19:20:34 +01:00
```
2022-02-22 16:39:46 +01:00
## RabbitMQ
The `rabbitmq` section configure the RabbitMQ connection.
:::caution
Before editing this section be sure to update the RabbitMQ server with the desired values.
2022-02-09 09:37:52 +01:00
2022-06-06 17:00:48 +02:00
#### Changing a RabbitMq user password
You can change the `libretime` RabbitMQ user password using:
```bash
sudo rabbitmqctl change_password "libretime" "new-password"
```
2022-02-22 16:39:46 +01:00
:::
2022-02-09 09:37:52 +01:00
2022-06-06 17:04:26 +02:00
```yml
rabbitmq:
2022-08-19 22:15:28 +02:00
# The hostname of the RabbitMQ server.
# > default is localhost
host: "localhost"
# The port of the RabbitMQ server.
# > default is 5672
2022-06-06 17:04:26 +02:00
port: 5672
2022-08-19 22:15:28 +02:00
# The virtual host of RabbitMQ server.
# > default is /libretime
vhost: "/libretime"
# The username of the RabbitMQ user.
# > default is libretime
user: "libretime"
# The password of the RabbitMQ user.
# > default is libretime
password: "some_random_generated_secret!"
2020-11-02 19:52:53 +01:00
```
2021-05-27 16:20:34 +02:00
2022-02-22 16:39:46 +01:00
In order to apply the changes made in this section, please restart the following services:
2020-11-28 03:39:16 +01:00
```
2022-02-22 16:39:46 +01:00
libretime-analyzer
2022-08-20 08:13:30 +02:00
libretime-api
2022-02-22 16:39:46 +01:00
libretime-playout
2022-08-20 08:13:30 +02:00
libretime-worker
2020-11-28 03:39:16 +01:00
```
2022-02-22 16:39:46 +01:00
## Playout
2021-05-27 16:20:34 +02:00
2022-02-22 16:39:46 +01:00
The `playout` section configure anything related to the playout service.
2020-11-28 03:39:16 +01:00
2022-06-06 17:04:26 +02:00
```yml
playout:
2022-08-19 22:15:28 +02:00
# Liquidsoap connection host.
# > default is localhost
liquidsoap_host: "localhost"
# Liquidsoap connection port.
# > default is 1234
2022-06-06 17:04:26 +02:00
liquidsoap_port: 1234
2022-08-19 22:15:28 +02:00
# The format for recordings.
# > must be one of (ogg, mp3)
# > default is ogg
2022-06-06 17:04:26 +02:00
record_file_format: ogg
2022-08-19 22:15:28 +02:00
# The bitrate for recordings.
# > default is 256
2022-06-06 17:04:26 +02:00
record_bitrate: 256
2022-08-19 22:15:28 +02:00
# The samplerate for recordings.
# > default is 44100
2022-06-06 17:04:26 +02:00
record_samplerate: 44100
2022-08-19 22:15:28 +02:00
# The number of channels for recordings.
# > default is 2
2022-06-06 17:04:26 +02:00
record_channels: 2
2022-08-19 22:15:28 +02:00
# The sample size for recordings.
# > default is 16
2022-06-06 17:04:26 +02:00
record_sample_size: 16
2020-11-28 03:39:16 +01:00
```
2022-02-22 16:39:46 +01:00
In order to apply the changes made in this section, please restart the following services:
2020-11-28 03:39:16 +01:00
2022-02-22 16:39:46 +01:00
```
libretime-playout
2020-11-28 03:39:16 +01:00
```
2022-02-22 16:39:46 +01:00
## LDAP
2020-11-28 03:39:16 +01:00
2022-02-22 16:39:46 +01:00
The `ldap` section provide additional configuration for the authentication mechanism defined in `general.auth` , please see the [custom authentication documentation ](../custom-authentication.md ) for more details.
2022-06-06 17:04:26 +02:00
```yml
ldap:
2022-08-19 22:15:28 +02:00
# Hostname of LDAP server.
hostname: "ldap.example.org"
# Complete DN of user used to bind to LDAP.
2022-06-06 17:04:26 +02:00
binddn: "uid=libretime,cn=sysaccounts,cn=etc,dc=int,dc=example,dc=org"
2022-08-19 22:15:28 +02:00
# Password for binddn user.
password: "hackme"
# Domain part of username.
account_domain: "INT.EXAMPLE.ORG"
# Base search DN.
2022-06-06 17:04:26 +02:00
basedn: "cn=users,cn=accounts,dc=int,dc=example,dc=org"
2022-08-19 22:15:28 +02:00
# Name of the uid field for searching. Usually uid, may be cn.
filter_field: "uid"
2022-06-06 17:04:26 +02:00
# Map user types to LDAP groups. Assign user types based on the group of a given user
2022-08-19 22:15:28 +02:00
# Key format is groupmap_*.
2022-06-06 17:04:26 +02:00
groupmap_superadmin: "cn=superadmin,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
groupmap_admin: "cn=admin,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
groupmap_program_manager: "cn=program_manager,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
groupmap_host: "cn=host,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
groupmap_guest: "cn=guest,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
2021-05-27 16:20:34 +02:00
```