Mailinabox service wont start on boot. 502 Bad Gateway - Admin Panel

This has been resolved by setting up a completely new VPS and reinstalling mailinabox. Not sure what caused it originally. Could be encrypting the home directories or LUKS. Anyways, it’s all resolved now.