The SSL port wasn't set in the variables
Also add nginx config for reverse proxying and set up Let's Encrypt automatically