Make n8n Public — Free Production Setup with Docker + Ngrok (No Domain, No Cost!)

3 min read 5 days ago
Published on Aug 31, 2025 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Introduction

This tutorial will guide you through the process of making your self-hosted n8n instance public using Docker and Ngrok, all without incurring costs for a domain or hosting. By following these steps, you will set up a production-ready automation hub that allows you to run workflows from anywhere, similar to n8n cloud, but at no expense.

Step 1: Set Up n8n in Docker

  1. Install Docker if you haven't already. Refer to the official Docker documentation for installation instructions.

  2. Run n8n using Docker with the following command:

    docker run -d -p 5678:5678 n8nio/n8n
    
    • This command downloads the n8n image and runs it in detached mode, exposing it on port 5678.
  3. Preserve Workflows and Data:

    • To ensure your workflows and data persist across container restarts, use Docker volumes. Update your command as follows:
    docker run -d -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n
    

Step 2: Configure Environment Variables

  1. Set Environment Variables:

    • You'll need to configure specific environment variables for n8n. You can do this by adding -e flags to your Docker run command:
    -e WEBHOOK_URL=<your_ngrok_https_url>
    -e EDITOR_BASE_URL=<your_ngrok_https_url>
    
    • Replace <your_ngrok_https_url> with the URL generated by Ngrok once set up.
  2. Example Full Docker Command:

    docker run -d -p 5678:5678 \
    -v ~/.n8n:/home/node/.n8n \
    -e WEBHOOK_URL=<your_ngrok_https_url> \
    -e EDITOR_BASE_URL=<your_ngrok_https_url> \
    n8nio/n8n
    

Step 3: Install and Configure Ngrok

  1. Download Ngrok from the official website: Ngrok.

  2. Sign up for a free account and get your authentication token.

  3. Authenticate Ngrok by running the following command:

    ngrok authtoken <your_auth_token>
    
    • Replace <your_auth_token> with your actual token from your Ngrok account.
  4. Start Ngrok Tunnel:

    • Run the following command to expose the n8n service:
    ngrok http 5678
    
    • This command opens a public URL that tunnels to your local n8n instance.

Step 4: Access Your n8n Instance

  1. Copy the HTTPS URL provided by Ngrok. It should look something like https://abcd1234.ngrok.io.
  2. Open the URL in your browser to access the n8n editor.
  3. Verify that your workflows are intact and functioning properly.

Step 5: Test Your Setup

  1. Create a simple workflow in n8n to ensure everything is working as expected.
  2. Use the Ngrok URL for any webhooks or integrations to test functionality.

Conclusion

You have successfully made your n8n instance public using Docker and Ngrok without any costs. This setup allows you to run automation workflows from anywhere, perfect for testing or small-scale production use. For future enhancements, consider exploring integrations with Telegram, YouTube, Gmail, and other services to maximize your automation capabilities.