More merging, adjustments for new site
This commit is contained in:
parent
49eeb146e0
commit
0bc403b073
10 changed files with 434 additions and 511 deletions
|
@ -1,14 +1,19 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Host configuration
|
||||
blurb: After installation, follow these instructions to set up your LibreTime server or VM
|
||||
---
|
||||
|
||||
Host configuration
|
||||
------------------
|
||||
> Quick Links:
|
||||
- [Database and RabbitMQ Hosts](#database)
|
||||
- [Changing the default PostgreSQL passwords](#postgre)
|
||||
- [API Client Configuration](#api)
|
||||
- [Apache max file size configuration](#apache)
|
||||
- [Playout and recorder settings](#playout)
|
||||
|
||||
The streaming host configuration for LibreTime is shown in the file */etc/airtime/liquidsoap.cfg* which is automatically generated by the **Streams** page, found on the **System** menu of the LibreTime administration interface. For this reason, you would not normally edit the streaming configuration manually, as any changes are likely to be overwritten by the administration interface.
|
||||
|
||||
Database and RabbitMQ hosts
|
||||
---------------------------
|
||||
# Database and RabbitMQ hosts {#database}
|
||||
|
||||
Optionally, you may wish to edit the file */etc/airtime/airtime.conf* to set the PostgreSQL database host, and the username and password to connect to the database with:
|
||||
|
||||
|
@ -57,8 +62,7 @@ used by the various components of LibreTime, run the following commands
|
|||
sudo systemctl restart libretime-celery
|
||||
sudo systemctl restart libretime-analyzer
|
||||
|
||||
Changing the default PostgreSQL passwords
|
||||
----------------------------------------
|
||||
# Changing the default PostgreSQL passwords {#postgre}
|
||||
|
||||
Two of the most important passwords that should be changed *immediately* after installation
|
||||
are the passwords used by the PostgreSQL database.
|
||||
|
@ -72,8 +76,61 @@ A response of `ALTER ROLE` means that the command ran successfully.
|
|||
4. If all is successful, logout of PostgreSQL with `\q`, go back to */etc/airtime/airtime.conf* to edit the password
|
||||
in the config file, and restart all services mentioned in the previous section.
|
||||
|
||||
API client configuration
|
||||
------------------------
|
||||
# API client configuration {#api}
|
||||
|
||||
The LibreTime API enables many types of information about the broadcast schedule and configuration to be retrieved from the LibreTime server. Other than the live-info and week-info data fetched by website widgets (see the chapter *Exporting the schedule*), all API requests must be authenticated using the secret API key stored in the file */etc/airtime/api\_client.cfg* on the LibreTime server. This key is autogenerated during LibreTime installation and should be unique for each server.
|
||||
|
||||
If you intend to use the LibreTime API across a public network, for security reasons it is highly recommended that all API requests are sent over encrypted https: and that the web server is configured to accept requests to the api/ directory from specific host names or IP addresses only.
|
||||
|
||||
The format of API requests is:
|
||||
|
||||
https://libretime.example.com/api/api-action/format/json/api_key/XXXXXX
|
||||
|
||||
where api-action is the type of request and XXXXXX is the secret API key. Available actions include:
|
||||
|
||||
- on-air-light - return true if the station is on air
|
||||
- status - get the status of LibreTime components and resource usage
|
||||
- version - returns the version of LibreTime installed
|
||||
- get-files-without-silan-value - list files for which silence detection has not yet been performed
|
||||
- get-stream-setting - gets the settings of LibreTime output streams
|
||||
- get-stream-parameters - gets the parameters of LibreTime output streams
|
||||
|
||||
For example, using the action *get-stream-setting* returns the following output for the first configured stream:
|
||||
|
||||
{"keyname":"s1_type","value":"ogg","type":"string"},
|
||||
|
||||
{"keyname":"s1_host","value":"streaming.example.com","type":"string"},
|
||||
|
||||
{"keyname":"s1_port","value":"8000","type":"integer"},
|
||||
|
||||
{"keyname":"s1_mount","value":"airtime_128","type":"string"},
|
||||
|
||||
{"keyname":"s1_url","value":"http:\/\/airtime.sourcefabric.org","type":"string"},
|
||||
|
||||
{"keyname":"s1_description","value":"Airtime Radio! Stream
|
||||
#1","type":"string"},
|
||||
|
||||
{"keyname":"s1_genre","value":"Screamo","type":"string"},
|
||||
|
||||
which is enough information to construct a player widget dynamically. (s1\_url is the station's homepage, not the stream URL). The same information is provided with an s2\_ prefix for the second stream, and s3\_ prefix for the third stream.
|
||||
|
||||
Some API requests require the directory ID number to be specified as *dir\_id* including:
|
||||
|
||||
- list-all-files - list files in the specified directory
|
||||
- get-files-without-replay-gain - list files in the specified directory for which ReplayGain has not been calculated yet
|
||||
|
||||
For example, using a request such as:
|
||||
|
||||
http://libretime.example.com/api/list-all-files/format/json/api_key/XXXXXX/dir_id/1/
|
||||
|
||||
returns the full path to each media file in the LibreTime storage directory:
|
||||
|
||||
```
|
||||
{"files":[
|
||||
"imported\/1\/Mark Ronson feat. Saigon\/Here Comes the Fuzz\/7-Diduntdidunt-unknown.flac",
|
||||
"imported\/1\/Jimi Tenor & Tony Allen\/Inspiration Information\/3-Selfish Gene-128kbps.mp3",
|
||||
"]}
|
||||
```
|
||||
|
||||
If you have changed the *base\_url*, *base\_port* or *base\_dir* setting in */etc/airtime/airtime.conf* from the defaults, you will probably also have to update the *Hostname* settings in the file */etc/airtime/api\_client.cfg* accordingly.**
|
||||
|
||||
|
@ -84,8 +141,7 @@ If you have changed the *base\_url*, *base\_port* or *base\_dir* setting in */et
|
|||
base_port = 80
|
||||
base_dir = /
|
||||
|
||||
Apache max file size configuration
|
||||
----------------------------------
|
||||
# Apache max file size configuration {#apache}
|
||||
|
||||
By default, the maximum upload file size is 500 MB, which may not be large enough for some stations, especially if they are uploading prerecorded shows. The setting for this is located in */etc/apache2/sites-available/airtime.config*. Search for and update the following in megabytes:
|
||||
|
||||
|
@ -100,8 +156,7 @@ post_max_size = 40M
|
|||
For quick reference, 1024 MB = 1 GB and 2048 MB = 2 GB, but most will be okay with rounding to the nearest thousand. After updating the config file, restart Apache by `sudo systemctl apache restart`.
|
||||
|
||||
|
||||
Playout and recorder settings
|
||||
-----------------------------
|
||||
# Playout and recorder settings {#playout}
|
||||
|
||||
Settings for pypo, the playout and recording engine used by LibreTime, are found in the file */etc/airtime/airtime.conf*. After making changes to this file, you will have to issue the command:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue