16
Help with Postgres (lemmy.world)

I went to upgrade Lemmy from 18.4 to 18.5 but in the process it failed with an incorrect Postgres password error. I'm trying to create a new docker container and mount the postgres volume in order to reset the "lemmy" user password but can't figure out how to get it running without knowing the password.

Could anyone point me in the right direction, please?

you are viewing a single comment's thread
view the rest of the comments
[-] MarsAgainstVenus@lemmy.world 1 points 11 months ago

I used the Lemmy-Easy-Deploy method but the catch is that I migrated from Google Cloud Free Tier to a paid server with another host. I have the backups so I can always restore from that if I really have to. I have an env file with the password that it should be using but I'm not sure how it was changed...

[-] ptz@dubvee.org 4 points 11 months ago

My advice: drop the "easy button" stuff and deploy it manually. You'll have WAY less headaches in the long run. Either way, it sounds like your Postgres password is out of sync with what the config files have. So try updating that through a root shell in the PG container to what's documented in your other config files.

[-] MarsAgainstVenus@lemmy.world 1 points 11 months ago* (last edited 11 months ago)

I couldn't get my container started with postgress running but I had an idea:

I started the upgrade process with Lemmy-Easy-Deploy,

canceled out of it before it removed the containers,

ran sudo docker exec -i lemmy-easy-deploy-postgres-1 psql -U lemmy -c "alter user lemmy with password 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'"

with the password set in my env file,

then restarted the upgrade process. It's running again.

[-] MarsAgainstVenus@lemmy.world 1 points 11 months ago

The odd part is that it was running fine until the upgrade.

this post was submitted on 03 Oct 2023
16 points (86.4% liked)

Selfhosted

39256 readers
185 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS