The command
sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
on ubuntu 18 produces a file only readable and writable by root, which gives errors when running jupyter as non-root user. This requires a chmod +r.