{"product_id":"n8n-workflow-generate-nginx-config-via-web-form-ssh-cloudflare","title":"n8n Workflow: Generate Nginx Config via Web Form + SSH + Cloudflare","description":"\u003ch3\u003eTurn a web form into a deployed Nginx site—securely, automatically, and with optional Cloudflare + HTTPS\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow lets you submit domain and route settings through a \u003cstrong\u003eBasic Auth–protected\u003c\/strong\u003e web form, generates an \u003cstrong\u003eNginx server configuration\u003c\/strong\u003e, optionally creates a \u003cstrong\u003eCloudflare DNS A record\u003c\/strong\u003e, and then connects to your server over \u003cstrong\u003eSSH\u003c\/strong\u003e to install prerequisites, deploy the config, and optionally enable TLS with \u003cstrong\u003eCertbot\u003c\/strong\u003e.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives requests on a protected webhook\u003c\/strong\u003e—serves an HTML form on \u003cem\u003eGET\u003c\/em\u003e and accepts configuration payloads on \u003cem\u003ePOST\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates inputs\u003c\/strong\u003e—checks the domain, routes (proxy\/static), ports, filesystem paths, and any optional custom Nginx snippet. If validation fails, it returns a \u003cstrong\u003e400\u003c\/strong\u003e response.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGenerates an Nginx server block\u003c\/strong\u003e—builds location rules for proxy and static routes and appends your custom configuration inside the server block.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOptionally provisions DNS\u003c\/strong\u003e—if enabled, calls the \u003cstrong\u003eCloudflare API\u003c\/strong\u003e to look up the zone ID and create an \u003cstrong\u003eA record\u003c\/strong\u003e pointing the domain to the provided server address.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDeploys via SSH\u003c\/strong\u003e—connects to the target server to install and configure \u003cstrong\u003enginx\u003c\/strong\u003e, \u003cstrong\u003eCertbot\u003c\/strong\u003e, firewall rules, and required tooling. It can also apply filesystem ACL\/SELinux changes for static paths if needed.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eActivates the configuration\u003c\/strong\u003e—writes the generated config to the proper Nginx directory, tests and reloads Nginx, optionally requests a TLS certificate with \u003cstrong\u003eCertbot\u003c\/strong\u003e, and returns the deployment result to the webhook caller.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eProvisioning Nginx configurations for new SaaS environments using a controlled self-service form.\u003c\/li\u003e\n  \u003cli\u003eAutomating reverse-proxy and static site deployments with consistent Nginx structure and validation.\u003c\/li\u003e\n  \u003cli\u003eEnabling HTTPS (Certbot) and DNS (Cloudflare) as part of the same request workflow.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes \/ stack:\u003c\/strong\u003e Webhook, Code, IF, HTTP Request, SSH (plus supporting nodes such as Sticky Note).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSecurity:\u003c\/strong\u003e HTTP Basic Auth–protected webhook endpoint.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations:\u003c\/strong\u003e Cloudflare API for zone lookup + DNS A record creation; SSH for remote deployment and nginx\/certbot setup.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSetup prerequisites:\u003c\/strong\u003e an SSH private key credential with \u003cem\u003esudo\u003c\/em\u003e access; an HTTP Basic Auth credential for the form endpoint.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45850390823091,"sku":"N8N-18309","price":76.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/tFlufZze82VsbPXtjXRE9_fCo8qbdK.png?v=1786870838","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-generate-nginx-config-via-web-form-ssh-cloudflare","provider":"N8N Commerce","version":"1.0","type":"link"}