Running Akkoma for development

I’ve been trying to get Akkoma running in dev mode. I’ve gotten the server up and running. If I go to localhost:4000 or 127.0.0.1:4000 it takes me to the /main/public path, which loads as a while screen. Looking at the browser inspector I see some requests like /api/v1/mutes/ and /api/v1/announcements which return HTTP 403s with:

{
    "error": "Invalid credentials."
}

I’ve been poking around in the code to see if I can figure out why this is happened, but I wanted to write here to ask if this at all a common issue?

Have you followed https://docs.akkoma.dev/develop/development/setting_up_akkoma_dev/ for it? I think the most important part is changing to http scheme (instead of https). Not sure if this is the problem it solves though, I forgot.

Thanks very much! I did follow the guide, but it’s definitely possible I missed a step because maybe I assumed it was for a production setup.

I created a dev.secret.exs (Gist, I don’t care about the secrets, I won’t use this in production)

I typed in localhost:4000 in my browser, which eventually redirected to http://localhost:4000/main/all so no https

Anyway, if there it isn’t a common thing then I’ll hunt it down and report back what I find :grin: Thanks for the response!

One thing I see different with what I have, is that you use port 80 here instead of 4000

config :pleroma, Pleroma.Web.Endpoint,
  url: [host: "localhost", scheme: "http", port: 4000],

Another thing I remember; you’re probably running the development branch now or the BE. But that means you also have to use the FE’s development branch. There’s no guaranteed backwards compatibility between the two in Akkoma. I saw people have problems because of that in the recent past and it was also a white screen they had. This should actually also be added to the guide for setting up a local development env.

To install the develop branches

mix pleroma.frontend install pleroma-fe --ref develop
mix pleroma.frontend install admin-fe --ref develop

Then add this to the dev.secret.exs

 config :pleroma, :frontends,
 primary: %{"name" => "pleroma-fe", "ref" => "develop"},
 admin: %{"name" => "admin-fe", "ref" => "develop"}

If this still doesn’t work, it’s always possible that the settings for the front-ends are already stored in the database and it uses those settings instead. I don’t think they are yet, but if so, you can always try with configurable_from_database set to false.

yeah this is probably just a frontend issue, the above installation instructions should fix it

:tada::tada::tada:

Yep, that was it, thanks! It wasn’t working for a while, but then I did a mix ecto.drop and then mix ecto.setup and it worked. It’s because I was getting a “Cannot create service actor …” error, and I guess it had saved something to the DB when I had the stable frontends.

Thanks! Heading to bed now, but looking forward to poking around akkoma

1 Like

hooray :tada: And welcome to akkoma dev :hugs:

1 Like

fyi: Made a PR to add this about the fe’s to the docs #456 - DOCS: Add info on fe to setup of dev env - akkoma - Akkoma Development

1 Like