Using the Let's Encrypt (certbot)[https://certbot.eff.org/] with the webroot
plugin in nginx.
Install certbot on a regular user-account:
wget https://dl.eff.org/certbot-auto
chmod a+x ./certbot-auto
Create dedicated directory for domain validation, make sure the user has write rights
mkdir /var/www/letsencrypt
chown www-data:you-user /var/www/letsencrypt
Create nginx vhost and letsencrypt config files.
See: nginx-vhost.conf
and /etc/letsencrypt/configs/some.domain.com
Generate cert:
./certbot-auto --config /etc/letsencrypt/configs/some.domain.com certonly