I’m working to get bitwarden to auto-start properly on bootup of my Ubuntu 20.04 LTS server. I’ve used the following /etc/systemd/system/bitwarden.server file, but on bootup it fails and bombs out. I think it’s because it runs the script twice so it creates too many docker network ‘docker_public’ entries. And I think this is because it doesn’t wait on reboot to shut it down cleanly, but just fires off the ExecStop script without waiting properly.
But some simple testing with “systemctl stop bitwarden” and “systemctl start bitwarden” shows that it works properly. Hmm… maybe I need to let it wait a minute or two after startup? Has anyone got a good solution here?