Une Goupelin Autiste utilise witches.town. Vous pouvez læ suivre et interagir si vous possédez un compte quelque part dans le "fediverse".
Une Goupelin Autiste @spiderrobotpig

We did this:

"sudo su - postgres
psql
CREATE USER mastodon CREATEDB;
\q
"

But there's no password?

@spiderrobotpig Did you configure the db user at the top of your .env.production?

@ashkitten it didn't tell us to do that.

It just said run the code so we ran the code. We are babby sysadmin

@spiderrobotpig You need to configure everything in the .env.production :)

@spiderrobotpig We can also help you administrate your instance if you like :)

@ashkitten That actually sounds super useful tbh.

Also how would we even do that?

@spiderrobotpig

sudo -u postgres psql -c "UPDATE USER mastodon WITH password 'the-password-you-want';"

@asonix We found that, but we can't seem to log into postgres as mastodon?

Like it just ends up being postgres@spiderrobotpig@computername with an unknown password

Bleh we are bad at this.

But now we gotta do it tbh

@asonix We dunno.

Like, once we make the mastodon user, it just does it, then leaves us with the user postgres@spiderrobotpig@{computername} and it's borked

@spiderrobotpig

creating the user doesn't automatically log you in as that user.

if you want to log into postgres as the mastodon user with psql, you would do

sudo -u postgres psql -U mastodon

@asonix It said peer authentication failed when we tried that

@asonix Now it says the database doesn't exist.

Gonna go cry in a corner for a bit now haha

@spiderrobotpig

The database was never created. the "mastodon" user was created with permissions to create a database.

If you're using "-d mastodon" in your command, it will not work until you first create a database with the mastodon user as the owner.

@asonix we did CREATE USER mastodon CREATE DATABASE;
\q

Was that wrong?

@spiderrobotpig

That creates the mastodon user with CREATEDB permissions, but does not create a database

sudo -u postgres psql
CREATE DATABASE mastodon WITH OWNER mastodon;
\q