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!

  • cablepick@lemmy.cablepick.net
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    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

    • lemmy_newbieOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Yes, I figured this out yesterday. I removed superuser once the migrations ran and now the system starts up successfully. Thank you for the answer!