Quick overview
This workflow serves a protected web form that collects domain and route settings, generates an nginx server configuration, optionally creates a Cloudflare DNS A record, and then connects over SSH to install prerequisites, deploy the config, and optionally enable HTTPS with Certbot.
How it works
- This workflow provides a browser-based form where users can define domains, reverse proxy routes, static file locations, and optional advanced Nginx directives.
- The workflow validates the submitted configuration, generates the required Nginx server block, optionally creates a Cloudflare DNS record, prepares the target server, and deploys the configuration through SSH.
- If Cloudflare is enabled, calls the Cloudflare API to look up the zone ID and create an A record pointing the domain to the provided server address.
- It can also install required packages, configure static file permissions, validate the Nginx configuration, reload the service, and optionally enable HTTPS certificates using Certbot.
Setup
- Create an SSH private key credential that can sudo on the target server and select it in the SSH steps.
- Create an HTTP Basic Auth credential and assign it to the webhook so the configuration form is access-controlled.
- (Optional) Add a Cloudflare API token credential with DNS edit permissions for the target zone and enable the “Use Cloudflare for DNS” option only when it is configured.
- Ensure the serverAddress you enter in the form is reachable from the internet and points to the server where nginx is deployed.
- If you enable SSL, provide a valid certificate notification email and make sure ports 80 and 443 are accessible for Certbot validation.
- Activate the workflow and open the configuration form and submit your Nginx deployment settings.
Requirements
- A Linux server with SSH access
- Supported operating systems:
- Ubuntu (recommended)
- Fedora
- Red Hat Enterprise Linux 8+
- openSUSE
- root permissions on the server
- n8n instance with webhook support
- Optional Cloudflare API token for DNS automation
- > Ubuntu is recommended for the best compatibility and easiest setup experience.
Customization
- You can extend this template by adding additional Nginx directives, custom deployment steps, or new route types based on your infrastructure needs.
Additional info
Who’s it for
This template is designed for developers, self-hosters, and DevOps engineers who need a simple way to create and deploy Nginx configurations on remote Linux servers.