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

**URL:** <https://discourse.libretime.org/t/install-failed-fatal-password-authentication-failed-for-user-libretime/1611>\
**Category:** Get Help\
**Created:** [November 15, 2023, 6:26pm UTC](https://discourse.libretime.org/t/install-failed-fatal-password-authentication-failed-for-user-libretime/1611 "2023-11-15T18:26:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unosonic](https://avatars.discourse-cdn.com/v4/letter/u/67e7ee/32.png) [@unosonic](https://discourse.libretime.org/u/unosonic)\
**Post date:** [November 15, 2023, 6:26pm UTC](https://discourse.libretime.org/t/install-failed-fatal-password-authentication-failed-for-user-libretime/1611/1 "2023-11-15T18:26:21Z")

</div>

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

```sudo

```

I’ve followed the intructions and typed

```auto
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**

```auto
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

---

<div class="post-metadata">

**Author:** ![unosonic](https://avatars.discourse-cdn.com/v4/letter/u/67e7ee/32.png) [@unosonic](https://discourse.libretime.org/u/unosonic)\
**Post date:** [November 15, 2023, 9:16pm UTC](https://discourse.libretime.org/t/install-failed-fatal-password-authentication-failed-for-user-libretime/1611/2 "2023-11-15T21:16:48Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![abdellah](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/abdellah/32/818_2.png) [@abdellah](https://discourse.libretime.org/u/abdellah)\
**Post date:** [February 27, 2025, 5:11am UTC](https://discourse.libretime.org/t/install-failed-fatal-password-authentication-failed-for-user-libretime/1611/3 "2025-02-27T05:11:35Z")

</div>

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
