YunoHost-Apps / akkoma_ynh

Social media based on ActivityPub, fork of Pleroma
https://akkoma.social/
GNU Affero General Public License v3.0
15 stars 6 forks source link

Configurable_from_database disabled #6

Closed joeldebruijn closed 1 year ago

joeldebruijn commented 1 year ago

I managed to install Akkoma with Yunohost, inlog and posting works fine. But upon entering the administrative backend (https://my-domain.tld/pleroma/admin/#/users/index) I get this error:

"Request failed with status code 400 - You must enable configurable_from_database in your config file."

I will look for a solution with Akkoma support also, but was wondering if its a flaw in the install script.

bugsysop commented 1 year ago

Normaly fixed by #3

You can fix it with CLI with:

su pleroma -s $SHELL -lc "/var/www/akkoma/live/bin/pleroma_ctl config migrate_to_db"

Or going to admin interface, see this doc (is for Pleroma but easy to adapt): https://pad.tmprs.net/yuPUXErjS0SOQaSYJM9YgQ#

lapineige commented 1 year ago

I managed to install Akkoma with Yunohost, inlog and posting works fine.

You mean you can login ? O_O

I wasn't able to do so 😅 So maybe I have a password issue similar to the one you discussed on Yunohost forum... edit : it is #4

Normaly fixed by https://github.com/YunoHost-Apps/akkoma_ynh/pull/3

So… not fixed actually ? What's your app version @joeldebruijn ?

joeldebruijn commented 1 year ago

The app version is 3.5.0: image

I still get the red notification, but also a green one now, saying I use the Pleroma FE. image

Settings in backend show up empty.

lapineige commented 1 year ago

3.5.0~ynh3, so the one including #3, as expected. And yet it did not work (entirely) :thinking:

lapineige commented 1 year ago

Ok I have the same issue, I can reproduce it. I'll try to investigate.

joeldebruijn commented 1 year ago

First time I made an effort to also change the config.exs by hand, the sentence: "config :pleroma, configurable_from_database: true" (with SSH access and using VI, mixed feelings of my first experience 😁) Got 'nginx 502 bad gateway' browsing to my akkoma instance webadres. Removed the whole app in yunohost and installes again.

Second time run the script mentioned above. Should I try to also edit the config file again, to set it from false to true by hand? Because it is still "false".

lapineige commented 1 year ago

I checked the config file (/etc/akkoma/config.exs) config :pleroma, configurable_from_database: false

That's the issue.

How to solve it:

  1. We allow the app to sync its configuration from the config file to the database (if I understand well this command ?) su akkoma -s $SHELL -lc "/var/www/akkoma/live/bin/pleroma_ctl config migrate_to_db (that line is already included in Akkoma packaging right now https://github.com/YunoHost-Apps/akkoma_ynh/pull/3, you don't need to run it again @joeldebruijn).
  2. But then we need to change that config file: nano /etc/akkoma/config.exs, change config :pleroma, configurable_from_database: false to config :pleroma, configurable_from_database: true
  3. We restart akkoma service akkoma restart.

It works !

How can we do 2) before, automatically ? ping @bugsysop I don't know the right command to edit that file. Maybe sed -i 's/configurable_from_database: false/configurable_from_database: true' /etc/akkoma/config.exs ?

I need to improve https://github.com/YunoHost-Apps/akkoma_ynh/pull/3 with those additional commands


For reference, the documentation : https://docs.pleroma.social/backend/configuration/howto_database_config/

lapineige commented 1 year ago

Oh I wrote that (but forgot to publish) before your comment @joeldebruijn… well done :)

I made a PR #8, not sure if it works thought, maybe way for the continuous integration result before trying.

joeldebruijn commented 1 year ago

Can confirm, manually editing false to true (step 2) and restart (step 3) solves it, for now anyway in my situation. Thnx! In the backend a whole bucket of options also appeared.

lapineige commented 1 year ago

Great, so we can reproduce that too :D

Well, then I can happily say that we share the 2 first Yunohost-based (working ^^) Akkoma instances in the fediverse :smiley:

lapineige commented 1 year ago

The PR was actually broken by a typo, now it should be working alright by default.

Oh and also… mangane is installed by default :) but not activated