This script automates the process of starting an n8n instance and exposing it to the internet using localtunnel.
- Automated Setup: Checks for Node.js and npm dependencies.
- Public URL: Uses localtunnel to create a public URL for your local n8n instance, making webhooks accessible from the internet.
- Configuration: Easily configure the n8n port and localtunnel subdomain.
- Environment Setup: Automatically sets the necessary environment variables for n8n to work with the tunnel.
- Persistent Data: Stores n8n data in the same directory as the script.
- Node.js and npm must be installed and available in your system's PATH.
You can modify the following variables at the beginning of the start.bat script:
N8N_PORT: The local port on which n8n will run (default:8080).LT_SUBDOMAIN: The desired subdomain for your localtunnel URL (e.g.,my-n8n-instance-12433). This must be unique.
- (Optional) Modify the configuration variables in
start.batas needed. - Double-click
start.batto run the script. - A new window will open for localtunnel. Wait for the script to retrieve the public URL.
- The public URL for your n8n instance will be displayed in the console.
- n8n will start, and you can access it locally at
http://localhost:8080(or your configured port). - The script will automatically configure n8n to use the public URL for webhooks.