#Truenas scale home assitant docker connection to data base

1 messages · Page 1 of 1 (latest)

slim bear
#

Hello,
I have installed home assitant docker with truenas scale app. It runs well but I have a connection problem with the database.
It seems that the login/password is not correct.
Here a picture of the data base log telling that the password is wrong.
My configuration.yaml contains a lign with the url of the data base(in picture with redacted password). I think this comes from the configuration of the app with truenas scale.
I have choose the ixVolume option for the database

keen bloom
#

you might be missing an @

#

Also posting text is preferred over images

#

Perhaps that was a result of your password redacting though. If authentication is failing you'd need to look at postgresql logs.

#

What's the reason for choosing pgsql over the native sqlite anyways?

slim bear
#

Thank you for your message here the text version of the images.
Log of the pgsql:
2025-02-17 12:36:15.243562+00:002025-02-17 04:36:15.243 PST [63] FATAL: password authentication failed for user "home-assistant"
2025-02-17 12:36:15.243626+00:002025-02-17 04:36:15.243 PST [63] DETAIL: Password does not match for user "home-assistant".
2025-02-17 12:36:15.243639+00:00Connection matched pg_hba.conf line 99: "host all all all md5"
And my configuration file (yes the @ has been edited)
db_url: postgresql://home-assistant:PASSWORD@postgres:5432/home-assistant?sslmode=disable

slim bear
keen bloom
#

looks like your auth method is md5, did you set the password correctly for md5 auth?

slim bear
#

How could I check that ?

#

lets say my password is toto
the dbd url is like this:
db_url: postgresql://home-assistant:toto@postgres:5432/home-assistant?sslmode=disable

If I get your answer correctly it should be like this
db_url: postgresql://home-assistant:f71dbe52628a3f83a77ab494817525c6@postgres:5432/home-assistant?sslmode=disable

keen bloom
#

I think the URL uses the plain password, I think when you create the role in the DB you need to provide the encrypted password. Depending on what the default encryption scheme is (which in newer versions is not MD5).

#

Or maybe the URL uses the encrypted password too, not sure

formal sinew
#

in my secret.yaml i have
my_db_url: 'postgresql://<user>:<password>@<hostname>/<dbname>'

bold vortex
slim bear
# bold vortex That would be weird to insist on postgres. I thought scale does normal docker co...

I am just hopping for a simple fix, as it is in the proposed app by truescale. I will try over the week end to use the regular home assitant docker alongside the sql database.
I saw that many people are using HAOS in a VM (I have used it a lot on a raspberry pi). But I would prefer to have all my dockers in the same place. That is also a way for me to learn new things (but my wife will kill me if it stops working again😁 )

bold vortex
#

I'd recommend the default SQLite database unless you have very specific requirements.
I'm not a big fan of HAOS for many reasons either and use the container variant in production too.

slim bear
#

Do you have a good tutorial for container setup ?

bold vortex