Hello Tyge,
If Gustaf's procedures don't work, you can always be drastic, and stop looking for a needle in the haystack.
1. Back up you source code and DB;
2. Re-install Ubtuntu. p.s. choose 16.4lts this time;
3. Reinstall letscript/certbot, through apt-get, tutorial available at: https://certbot.eff.org/all-instructions.
I've always had problems related with Ubuntu and Letsencrypt renew. If your scenario allow you, you must start a new VM from scratch. You may change to Debian instead.
Then, you may run Gustaf's installation scripts, available at:
https://github.com/gustafn/install-ns
There's another nice tutorial, which you may find at http://project-open.com/en/install-debian-stretch
Best wishes,
I