this post was submitted on 28 Jun 2023
4 points (100.0% liked)

Lemmy Support

4633 readers
1 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

Hi all,

I'm trying to install Lemmy on a FreeBSD server. The build went fine but when I run it, I get errors saying that the migrations failed, however it seems like all databases were created.

I also am not that Rust savvy so maybe there is another way to get more debug output.

You can see the logs and sql tables here:

https://paste.sr.ht/~petersanchez/b9962c7b13d2aeba1c3c656f6f046230c4daf059

Any ideas?

Thanks!

you are viewing a single comment's thread
view the rest of the comments
[–] cablepick@lemmy.cablepick.net 2 points 1 year ago* (last edited 1 year ago)

The lemmy user in the database needs superuser privilages. Add superuser to the lemmy account, drop the database, and then recreate it.

sudo -iu postgres psql -c "ALTER USER lemmy WITH SUPERUSER;"
sudo -iu postgres psql -c "DROP DATABASE lemmy;"
sudo -iu postgres psql -c "CREATE DATABASE lemmy WITH OWNER lemmy;"

Edit: they may have fixed this but I'm not sure what version it's in. Let me know if that doesn't work. https://github.com/LemmyNet/lemmy/pull/3002