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

Lemmy Support

4650 readers
15 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!

top 1 comments
sorted by: hot top controversial new old
[–] [email protected] 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