I did this a while back. I documented my experience in several blog posts, the last of which is [0]. These describe the process, the gotchas and how I got round them. I was working on C# on a Windows box so the result isn't quite the same as the vanilla MAL.
I was massively pleased when I got MAL to self-host.
I was massively pleased when I got MAL to self-host.
[0] https://www.non-kinetic-effects.co.uk/blog/2019/04/28/MAL-5