Set up nginx reverse proxy + Let's Encrypt SSL
setup_nginx_sslConfigure nginx reverse proxy with automatic Let's Encrypt SSL for a domain pointing to your server.
Instructions
Installs nginx and certbot, configures nginx as a reverse proxy to a local port, and obtains/installs a free Let's Encrypt SSL certificate for the given domain. The domain's DNS A record must already point at this server, and ports 80/443 must be open.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Server IP address or hostname, e.g. 168.119.45.12 | |
| port | No | SSH port, defaults to 22 | |
| Yes | Email for Let's Encrypt registration and expiry notices | ||
| domain | Yes | Domain name pointing at this server, e.g. bot.example.com | |
| username | Yes | SSH username, e.g. root or deploy | |
| passphrase | No | Passphrase for the private key, if it has one | |
| upstreamPort | Yes | Local port the app listens on, e.g. 3000 | |
| privateKeyPath | Yes | Path to the private key on THIS machine, e.g. "~/.ssh/id_ed25519" |