176 lines
8.0 KiB
HTML
176 lines
8.0 KiB
HTML
<h2 id="host-configuration">Host configuration</h2>
|
|
|
|
<p>The streaming host configuration for LibreTime is shown in the file <em>/etc/airtime/liquidsoap.cfg</em> which is automatically generated by the <strong>Streams</strong> page, found on the <strong>System</strong> 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.</p>
|
|
|
|
<h2 id="database-and-rabbitmq-hosts">Database and RabbitMQ hosts</h2>
|
|
|
|
<p>Optionally, you may wish to edit the file <em>/etc/airtime/airtime.conf</em> to set the PostgreSQL database host, and the username and password to connect to the database with:</p>
|
|
|
|
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo nano /etc/airtime/airtime.conf
|
|
</code></pre></div></div>
|
|
|
|
<p>You can also set options for RabbitMQ messaging, the LibreTime server and SoundCloud uploads in this file, although you should not normally need to adjust the defaults unless you are running a large LibreTime system distributed across multiple servers. To run the LibreTime server in demo mode, which changes the greeting on the login page and prevents user accounts from being created or modified, set the value of <em>demo</em> to 1.</p>
|
|
|
|
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[database]
|
|
host = localhost
|
|
dbname = airtime
|
|
dbuser = airtime
|
|
dbpass = airtime
|
|
|
|
[rabbitmq]
|
|
host = 127.0.0.1
|
|
port = 5672
|
|
user = airtime
|
|
password = XXXXXXXXXXXXXXXXXXXX
|
|
vhost = /airtime
|
|
|
|
[general]
|
|
api_key = XXXXXXXXXXXXXXXXXXXXX
|
|
web_server_user = www-data
|
|
airtime_dir = /usr/share/airtime
|
|
base_url = libretime.example.com
|
|
base_port = 80
|
|
base_dir = /
|
|
cache_ahead_hours = 1
|
|
|
|
[monit]
|
|
monit_user = guest
|
|
monit_password = airtime
|
|
|
|
[soundcloud]
|
|
connection_retries = 3
|
|
time_between_retries = 60
|
|
|
|
[demo]
|
|
demo = 0
|
|
</code></pre></div></div>
|
|
|
|
<p>Save and close the file with <strong>Ctrl+O</strong> and <strong>Ctrl+X</strong>. In order to update the configuration
|
|
used by the various components of LibreTime, run the following commands</p>
|
|
|
|
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl restart libretime-liquidsoap
|
|
sudo systemctl restart libretime-playout
|
|
sudo systemctl restart libretime-celery
|
|
sudo systemctl restart libretime-analyzer
|
|
</code></pre></div></div>
|
|
|
|
<h2 id="changing-the-default-postgresql-passwords">Changing the default PostgreSQL passwords</h2>
|
|
|
|
<p>Two of the most important passwords that should be changed <em>immediately</em> after installation
|
|
are the passwords used by the PostgreSQL database.
|
|
It is strongly recommended that you do this before exposing your server to the internet beyond your internal network.</p>
|
|
|
|
<ol>
|
|
<li>Login to PostgreSQL with <code class="highlighter-rouge">sudo -u postgres psql</code>. The PostgreSQL shell - <code class="highlighter-rouge">postgres=#</code> - means that you have logged in successfully.</li>
|
|
<li>Change the admin password with <code class="highlighter-rouge">ALTER USER postgres PASSWORD 'myPassword';</code>, where <code class="highlighter-rouge">myPassword</code> is the new password.
|
|
Make sure to include the semicolon at the end! A response of <code class="highlighter-rouge">ALTER ROLE</code> means that the command ran successfully.</li>
|
|
<li>Change the password for the <em>airtime</em> user with <code class="highlighter-rouge">ALTER USER airtime WITH PASSWORD 'new_password';</code>
|
|
A response of <code class="highlighter-rouge">ALTER ROLE</code> means that the command ran successfully.</li>
|
|
<li>If all is successful, logout of PostgreSQL with <code class="highlighter-rouge">\q</code>, go back to <em>/etc/airtime/airtime.conf</em> to edit the password
|
|
in the config file, and restart all services mentioned in the previous section.</li>
|
|
</ol>
|
|
|
|
<h2 id="api-client-configuration">API client configuration</h2>
|
|
|
|
<p>If you have changed the <em>base_url</em>, <em>base_port</em> or <em>base_dir</em> setting in <em>/etc/airtime/airtime.conf</em> from the defaults, you will probably also have to update the <em>Hostname</em> settings in the file <em>/etc/airtime/api_client.cfg</em> accordingly.**</p>
|
|
|
|
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>bin_dir = /usr/lib/airtime/api_clients
|
|
api_key = 'XXXXXXXXXXXXXXXXXXXX'
|
|
api_base = api
|
|
host = libretime.example.com
|
|
base_port = 80
|
|
base_dir = /
|
|
</code></pre></div></div>
|
|
|
|
<h2 id="apache-max-file-size-configuration">Apache max file size configuration</h2>
|
|
|
|
<p>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 <em>/etc/apache2/sites-available/airtime.config</em>. Search for and update the following in megabytes:</p>
|
|
|
|
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>; Maximum allowed size for uploaded files.
|
|
upload_max_filesize = 40M
|
|
|
|
; Must be greater than or equal to upload_max_filesize
|
|
post_max_size = 40M
|
|
</code></pre></div></div>
|
|
|
|
<p>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 <code class="highlighter-rouge">sudo systemctl apache restart</code>.</p>
|
|
|
|
<h2 id="playout-and-recorder-settings">Playout and recorder settings</h2>
|
|
|
|
<p>Settings for pypo, the playout and recording engine used by LibreTime, are found in the file <em>/etc/airtime/airtime.conf</em>. After making changes to this file, you will have to issue the command:</p>
|
|
|
|
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl restart libretime-playout
|
|
</code></pre></div></div>
|
|
|
|
<p>for the changes to take effect.</p>
|
|
|
|
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>############################################
|
|
# pypo - configuration #
|
|
############################################
|
|
# Set the type of client you are using.
|
|
# Currently supported types:
|
|
# 1) "obp" = Open Broadcast Platform
|
|
# 2) "airtime"
|
|
#
|
|
api_client = airtime
|
|
|
|
############################################
|
|
# Cache Directories #
|
|
# *include* trailing slash !! #
|
|
############################################
|
|
cache_dir = /var/tmp/airtime/pypo/cache/
|
|
file_dir = /var/tmp/airtime/pypo/files/
|
|
tmp_dir = /var/tmp/airtime/pypo/tmp/
|
|
|
|
############################################
|
|
# Setup Directories #
|
|
# Do *not* include trailing slash !! #
|
|
############################################
|
|
cache_base_dir = /var/tmp/airtime/pypo
|
|
bin_dir = /usr/lib/airtime/pypo
|
|
log_base_dir = /var/log/airtime
|
|
pypo_log_dir = /var/log/airtime/pypo
|
|
liquidsoap_log_dir = /var/log/airtime/pypo-liquidsoap
|
|
|
|
############################################
|
|
# Liquidsoap settings #
|
|
############################################
|
|
ls_host = 127.0.0.1
|
|
ls_port = 1234
|
|
|
|
############################################
|
|
# RabbitMQ settings #
|
|
############################################
|
|
rabbitmq_host = localhost
|
|
rabbitmq_user = airtime
|
|
rabbitmq_password = XXXXXXXXXXXXXXXXXXXX
|
|
rabbitmq_vhost = /airtime
|
|
|
|
############################################
|
|
# pypo preferences #
|
|
############################################
|
|
# Poll interval in seconds.
|
|
#
|
|
# This will rarely need to be changed because any schedule changes are
|
|
# automatically sent to pypo immediately.
|
|
#
|
|
# This is how often the poll script downloads new schedules and files from the
|
|
# server in the event that no changes are made to the schedule.
|
|
#
|
|
poll_interval = 3600# in seconds.
|
|
|
|
# Push interval in seconds.
|
|
#
|
|
# This is how often the push script checks whether it has something new to
|
|
# push to liquidsoap.
|
|
#
|
|
# It's hard to imagine a situation where this should be more than 1 second.
|
|
#
|
|
push_interval = 1# in seconds
|
|
|
|
# 'pre' or 'otf'. 'pre' cues while playlist preparation
|
|
# while 'otf' (on the fly) cues while loading into ls
|
|
# (needs the post_processor patch)
|
|
cue_style = pre
|
|
</code></pre></div></div>
|