INSTALL failed: FATAL: password authentication failed for user "libretime"

help needed! sorry if I’ve missed something obvious…

Describe the problem
trying to install libretime on a fresh Ubuntu 20.04.

To reproduce
after a successful install with

I’ve followed the intructions and typed

type or Once upgraded, run the following command to migrate the database:
$ sudo -u libretime libretime-api migrate

Expected behavior

succesful install / database setup

Relevant log output or error messages

traceback (most recent call last):
  File "/opt/libretime/lib/python3.8/site-packages/django/db/backends/base/base.py", line 289, in ensure_connection
    self.connect()
  File "/opt/libretime/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/opt/libretime/lib/python3.8/site-packages/django/db/backends/base/base.py", line 270, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/opt/libretime/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/opt/libretime/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 275, in get_new_connection
    connection = self.Database.connect(**conn_params)
  File "/opt/libretime/lib/python3.8/site-packages/psycopg/connection.py", line 738, in connect
    raise ex.with_traceback(None)
psycopg.OperationalError: connection failed: password authentication failed for user "libretime"
FATAL:  password authentication failed for user "libretime"

LibreTime version

3.1.0

Installation method and OS / Environment

Operating system: Ubuntu 20.04.6 LTS
Method: Installer script

don’t know if I’ve overlooked things, but this install ist far from smooth…

  • install.sh did not set up a database / database user, had to do it manually, then libretime-api migrate worked.
  • “mobile” and “email” are unrecognized options in config.yml, had to comment it out.
  • libretime-worker.service did not start because of wrong shell reference in /usr/lib/systemd/system/libretime-worker.service: “/usr/bin/sh…” should be “/bin/sh”, at least on Ubuntu 20.04

let’s see what else…

I got the same error. In my case, I use a custom config file.
This is because the (postgres) password Libretime was installed with differs from the one in the config file.

In a fresh machine, libretime is installed and the passwords are generated on the fly and then included in the config file. Since we already provide a config file, we get this issue and now the passwords don’t match.

In order to solve this issue, we need to:

  • create a .env file and set the passwords we have in the config file.
  • put the .env file in the same dir of the install script.
  • Run the install script and it will use the provided passwords

P.S: make sure to also provide passwords for rabbitmq and icecast and icecast_relay