So I’m running an Akkoma instance under Ubuntu 22.04 setup under the normal Debian setup guide, and recently, I decided to update my instance to v3.8.0 . However, Elixir in the Ubuntu package manager only goes up to v1.12, so I had to install asdf under the akkoma user to install elixir 1.14 . While running Akkoma directly in the shell of the akkoma user with mix phx.server works fine. Trying to run it through systemd results in an error that keeps it from starting. It seems to be this:
So far, in order to get this setup with asdf to actually work, I have edited akkoma.service so that it includes Environment="ASDF_DATA_DIR=/opt/asdf", which is where I installed asdf. And modified ExecStart to be ExecStart=/opt/asdf/shims/mix phx.server. Within my .bashrc for my akkoma user. I’ve appended the following:
This wont be helpful unless you are in a position to change OS, but I got fed up with asdf on Debian arm64 and went to Fedora37 where it had already everything I needed. I have never used Fedora before; I just tried vps images until one had what I needed (Hetzner arm64)
Can we get some official responses in this thread?
This was a major change with very little instruction on how to get it working, just a link to asdf’s site and saying “good luck”.
It would be helpful that with a big change like this, requiring versions of erlang that aren’t supported by distros yet, we took the time to include careful per-distro instructions – or not require these changes at all. A lot of Akkoma admins are not tech-savvy and depend on your instructions, and Ubuntu is far from being a niche setup
I am currently struggling to update it myself as getting asdf and elixir working seems to break everything, so I’ll likely just wait until this gets worked out.
Based on an old script i have, the following should be what worked for me. If you got the correct versions already, you can probably skip to the Systemd part.
Set up Elixir and Erlang using asdf
with Akkoma user in home directory, sudo -u akkoma /bin/bash, do
Now elixir --version ran as the Akkoma user should show that you have 1.14.2
Adapt Systemd service file
Systemd won’t have this in the PATH, and it uses the absolute path to the binary. So we need to adapt the service file. Assuming the HOME directory is /opt/akkoma
; This needs to be added
Environment="PATH=/opt/akkoma/.asdf/shims:/opt/akkoma/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
; This needs to be changed
ExecStart=/opt/akkoma/.asdf/shims/mix phx.server
I have mainly followed the instructions provided. But I’ve noticed that when I actually tried to start Akkoma wih mix phx.server, what happens is that Akkoma exits but keeps listening with this [notice] Application pleroma exited: :stopped. I also keep getting these warnings as well:
21:23:05.888 [warning] Metric type summary is unsupported. Dropping measure. metric_name:=[:phoenix, :endpoint, :stop, :duration]
21:23:05.888 [warning] Metric type summary is unsupported. Dropping measure. metric_name:=[:phoenix, :router_dispatch, :stop, :duration]
21:23:05.888 [warning] Metric type summary is unsupported. Dropping measure. metric_name:=[:pleroma, :repo, :query, :total_time]
21:23:05.888 [warning] Metric type summary is unsupported. Dropping measure. metric_name:=[:pleroma, :repo, :query, :decode_time]
21:23:05.888 [warning] Metric type summary is unsupported. Dropping measure. metric_name:=[:pleroma, :repo, :query, :query_time]
21:23:05.888 [warning] Metric type summary is unsupported. Dropping measure. metric_name:=[:pleroma, :repo, :query, :queue_time]
21:23:05.888 [warning] Metric type summary is unsupported. Dropping measure. metric_name:=[:pleroma, :repo, :query, :idle_time]
21:23:05.888 [warning] Metric type summary is unsupported. Dropping measure. metric_name:=[:vm, :memory, :total]
21:23:05.888 [warning] Metric type summary is unsupported. Dropping measure. metric_name:=[:vm, :total_run_queue_lengths, :total]
21:23:05.888 [warning] Metric type summary is unsupported. Dropping measure. metric_name:=[:vm, :total_run_queue_lengths, :cpu]
21:23:05.888 [warning] Metric type summary is unsupported. Dropping measure. metric_name:=[:vm, :total_run_queue_lengths, :io]
Ok, just realized that in the debugging process Caddy died and i accidentally deleted my frontend lol. mix phx.server seems to work, and so does systemd