How to setup next.js app on nginx with letsencrypt next.js, nginx, reverse-proxy, ssl 1. Install nginx and letsencrypt $ sudo apt-get update $ sudo apt-get install nginx letsencrypt Also enable nginx in ufw