PSA: Mailinabox service wont auto start if you encrypt your home directory

I’ve tested this multiple times on different VPS providers. If you do a standard installation from the Ubuntu 14.04 x64 ISO and go through all the installation steps, Ubuntu will come up with a window that says the following:

| [!] Set up users and passwords |

You may configure your home directory for encryption, such that any files stored there remain private even if your computer is stolen.

The system will seamlessly mount your encrypted home directory each time you login and automatically unmount when you log out of all active sessions.

Encrypt your home directory?

If you choose to encrypt your home directory, the mailinabox service wont start when you boot. You will then get a “502 Bad Gateway” error with nginx on your “Admin Panel”. You can fix this by making a script run every time you login to your user or run “sudo service mailinabox start” every time you login to your system.

The only convenient way around this is to NOT encrypt your home directory. You can still use LVM encryption for full disk encryption without issues though during the Ubuntu installation.