<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dunsin Fayode on Medium]]></title>
        <description><![CDATA[Stories by Dunsin Fayode on Medium]]></description>
        <link>https://medium.com/@fayoded?source=rss-fb95c7797bcc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*e-zfewE-vnMR2Cg2</url>
            <title>Stories by Dunsin Fayode on Medium</title>
            <link>https://medium.com/@fayoded?source=rss-fb95c7797bcc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 11:43:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fayoded/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Setting Up n8n with Docker and ngrok: A Beginner’s Guide]]></title>
            <link>https://medium.com/@fayoded/setting-up-n8n-with-docker-and-ngrok-a-beginners-guide-8b76e7d5e661?source=rss-fb95c7797bcc------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b76e7d5e661</guid>
            <category><![CDATA[n8n-self-host]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[n8n]]></category>
            <category><![CDATA[ngrok]]></category>
            <dc:creator><![CDATA[Dunsin Fayode]]></dc:creator>
            <pubDate>Sun, 04 May 2025 20:01:51 GMT</pubDate>
            <atom:updated>2025-05-04T20:01:51.304Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="n8n, docker and ngrok" src="https://cdn-images-1.medium.com/max/1024/1*QxurXJgTI5b8s2JYypD0Jw.jpeg" /><figcaption>Source: Designed by me</figcaption></figure><h3>Introduction: Why This Guide?</h3><p>I still remember the day I stumbled upon that post made by @omoalhajaabiola on X (formerly Twitter) about workflow automation. Though I’d always been fascinated by automating repetitive tasks, I’d never truly explored this passion. That single post ignited something in me, a curiosity that sent me down a rabbit hole of research, eventually leading me to discover n8n.</p><p>What drew me to n8n immediately was its self-hosted nature. Unlike many automation platforms that lock you into their ecosystems, n8n gives you complete control over your workflows and data. Better yet, it’s free for learning and personal use, making it perfect for newcomers like me who wanted to experiment without financial commitment. The vibrant, helpful community around it sealed the deal.</p><p>My initial excitement, however, quickly met with frustration. Setting everything up seemed straightforward until I tried using webhooks and connecting to external APIs — nothing worked as expected. My workflows would run locally, but external services couldn’t communicate with my n8n instance.</p><p>After hours of troubleshooting and combing through documentation, I discovered the missing piece: ngrok. This simple tool creates a secure tunnel to expose your local server to the internet, solving the connectivity puzzle. When I implemented it — boom! Everything suddenly worked flawlessly. My webhooks responded, API connections were established, and my automation dreams became a reality.</p><p>This guide emerges from those early struggles and breakthroughs. I’ve documented every step that worked for me, hoping to save you the hours of trial and error I experienced. Welcome to this step-by-step guide on setting up n8n using Docker and ngrok. It’s designed specifically for beginners who want to harness the power of workflow automation without getting overwhelmed by technical details.</p><p>Whether you’re a productivity enthusiast, a curious tinkerer, or someone looking to simplify repetitive tasks, this guide will help you build a solid foundation for your automation journey.</p><h3>What is n8n?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*-jQkaTOvx_zGiLaDEX40ZQ.png" /><figcaption>Source: <a href="https://seeklogo.com/vector-logo/451803/n8n-io">seeklogo</a></figcaption></figure><p>n8n (pronounced “n-eight-n”) is an open-source workflow automation tool that allows you to connect different services and automate tasks between them. Think of it as building blocks that let different applications work together automatically.</p><h3>What is Docker?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*krkTwOsazw1wNQgM1TOjNw.png" /><figcaption>Source: <a href="https://www.docker.com/company/newsroom/media-resources/">Docker</a></figcaption></figure><p>Docker is a platform that packages software into containers, standardized units that include everything needed to run the software, ensuring it works consistently across different computing environments.</p><h3>What is ngrok?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*T7R73-LPRUgy36Z_iOj7pQ.png" /><figcaption>Source: <a href="https://ngrok.com/brand">ngrok</a></figcaption></figure><p>ngrok is a service that creates secure tunnels to expose your local server to the internet, allowing external services to connect to your locally running applications.</p><h3>Before You Begin</h3><p><strong>System Requirements:</strong></p><ul><li>Windows 10/11, macOS, or Linux</li><li>At least 4GB RAM</li><li>2GB free disk space</li><li>Stable internet connection</li></ul><p><strong>Preparation:</strong></p><ul><li>Make sure you have administrator/root access to your computer</li><li>Close any resource-intensive applications for speed</li></ul><h3>Pre-Installation Steps</h3><h3>1. Install Docker</h3><p>Docker is essential for running n8n in a container, providing a consistent environment regardless of your system setup.</p><p>When I began this journey, I was completely new to containerization. I remember feeling intimidated by terms like “Docker” and “containers,” but the process turned out to be much simpler than I anticipated.</p><p>To get started, navigate to <a href="https://docker.com/">docker.com</a> and download the appropriate version for your operating system. In this guide, I’ll walk you through my experience using Windows, though the process is similar across platforms.</p><p><strong>For Windows:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CUVomutezyuOpIR7rid3SA.png" /><figcaption>Dockers Homepage</figcaption></figure><ol><li>Download Docker Desktop from <a href="https://hub.docker.com/editions/community/docker-ce-desktop-windows/">Docker</a></li><li>Run the installer and follow the on-screen instructions</li><li>During installation, you’ll see an option to use WSL 2 (Windows Subsystem for Linux). Please accept this when prompted</li><li>Restart your computer after installation (I learned the hard way that skipping this step leads to frustrating errors later! 😂)</li><li>Start Docker Desktop from your applications menu — look for the whale icon</li></ol><p>The first time I launched Docker Desktop, it took a few minutes to initialize. Don’t worry if this happens to you — it’s completely normal as Docker configures its environment.</p><p><strong>For macOS:</strong></p><ol><li>Download Docker Desktop from <a href="https://hub.docker.com/editions/community/docker-ce-desktop-mac/">Docker Hub</a></li><li>Drag the Docker app to your Applications folder</li><li>Open Docker from your Applications folder</li><li>Follow the prompts to complete the installation</li><li>The Docker icon appearing in your menu bar indicates Docker is running successfully</li></ol><p>I found that having Docker running smoothly from the beginning saves countless headaches down the line, so it’s worth taking your time with this step to ensure everything is configured correctly</p><h3>2. Verify Docker Installation</h3><p>After installing Docker, it’s crucial to confirm that everything is working properly before moving forward. This simple verification step saved me from hours of troubleshooting later in my automation journey.</p><p>Open a terminal or command prompt and run this simple command:</p><pre>docker --version</pre><p>You should see output showing the Docker version number, confirming successful installation. In my case, it displayed something like Docker version 28.0.4, build bb8034c0, though your exact version number might differ.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*ujSwpZDBcPl-2PDb6GFUIQ.png" /><figcaption>Command prompt</figcaption></figure><p>If you don’t see similar output, it might indicate that Docker isn’t properly installed or hasn’t started correctly.</p><p>I found that some antivirus software occasionally blocks Docker from functioning properly. If you encounter issues, try temporarily disabling your antivirus or adding an exception for Docker.</p><p>This quick verification ensures you’re building on a solid foundation before proceeding to the next steps. Trust me, spending an extra minute here can save you significant frustration later.</p><h3>3. Install ngrok</h3><p>When I reached this stage in my journey, I discovered that ngrok was the missing piece that would finally allow external services to communicate with my n8n instance. Without it, I was building workflows that couldn’t receive webhooks from the services I wanted to automate.</p><p>ngrok creates a secure tunnel that exposes your local n8n server to the internet, making it accessible from anywhere. Let me walk you through how I installed it.</p><p><strong>For Windows:</strong></p><figure><img alt="Screenshot from ngrok website" src="https://cdn-images-1.medium.com/max/1024/1*x7uV5O2fUPt-6qESBvC0sA.png" /></figure><ol><li>Download ngrok from the <a href="https://ngrok.com/download">ngrok website</a></li><li>Extract the zip file to a folder of your choice — I created a dedicated folder called “Project” in my Documents directory to keep things organized</li><li>Open Command Prompt and navigate to the folder where you extracted ngrok using the cd command (for example: cd C:\Users\YourName\Documents\Project)</li><li>Run ngrok.exe once to create the configuration file</li></ol><p>The first time I ran ngrok, I was surprised at how simple the interface was. A black terminal window appeared with some basic information, indicating ngrok was ready to be configured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*j_9lvxKJdT_Eid60Hl7BFg.png" /><figcaption>Image from ngok.exe</figcaption></figure><p><strong>For macOS:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IpuImxvmfCh7zHjNjmwATg.png" /><figcaption>macOS Download</figcaption></figure><ol><li>Download ngrok from the <a href="https://ngrok.com/download">ngrok website</a></li><li>Extract the zip file to a folder of your choice — many macOS users prefer keeping tools in their home directory</li><li>Open Terminal and navigate to the folder where you extracted ngrok (for example: cd ~/Downloads/ngrok)</li><li>Run ./ngrok once to create the configuration file</li></ol><p>I found that adding ngrok to a location in your system PATH can be incredibly helpful for future use, allowing you to run it from any directory without typing the full path. This is an optional step, but one I wish I’d done sooner to save time.</p><p>After installation, running ngrok for the first time creates a default configuration file that we’ll modify in the next steps. Don’t worry if ngrok seems to “do nothing” at this point — we still need to connect it to your ngrok account.</p><h3>4. Create an ngrok Account and Get Your Auth Token</h3><ul><li>Go to <a href="https://ngrok.com/">ngrok.com</a> and sign up for a free account</li><li>After signing in, navigate to the setup &amp; installation section</li><li>Copy the command to add your authtoken</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zynBiNl0kM8ag52glZQf5w.png" /><figcaption>Authtoken setup</figcaption></figure><ul><li>Paste the command into your ngok.exe terminal and click Enter</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o2uafn0MX--PxSrzsVzA_A.png" /><figcaption>Command in Terminal</figcaption></figure><ul><li>The configuration file will be saved on your computer locally as ngok.yml, and you can access it from there</li></ul><p><strong>For macOS/Linux:</strong></p><ul><li>Run the command on your terminal. Remember to replace YOUR_AUTH_TOKEN with your actual token.</li></ul><pre>./ngrok config add-authtoken YOUR_AUTH_TOKEN</pre><blockquote><strong><em>Warning:</em></strong><em> Keep your authtoken private and never share it publicly.</em></blockquote><h3>Installing n8n with Docker</h3><p>This is where my journey really got exciting! After spending days trying to install n8n directly on my system and encountering numerous compatibility issues, Docker felt like a revelation. It simplified everything by creating a consistent environment regardless of my system’s peculiarities</p><h3>1. Create a Directory for n8n Data</h3><p>To get started, N8N will store its data in a designated folder. First, let’s create that folder! Simply open File Explorer (Win+E) and navigate to the root of your system, then right-click on ‘This PC’ or ‘Computer’, select ‘New’ &gt; ‘Folder’, and name it something like ‘n8n_data’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Z-sdKLzDKIXBVUqI9GXGg.png" /><figcaption>Creating the n8n_data folder</figcaption></figure><p><strong>Or</strong> use the Windows terminal (using PowerShell):</p><pre>mkdir n8n_data</pre><p>For macOS/Linux:</p><pre>mkdir ~/n8n_data</pre><blockquote><strong><em>Note:</em> </strong><em>Before running the command, make sure you select the exact location where you want to create the new folder.</em></blockquote><h3>2. Run n8n Docker Container using the Terminal and the Docker Desktop</h3><p>Now, let’s start with n8n using Docker Desktop:</p><p>For Windows (using Docker Desktop)</p><h3>1. For Windows (using Docker Desktop)</h3><p>If you prefer using Docker’s graphical interface instead of the command line, here’s how I did it</p><p>First, launch your installed Docker Desktop and follow the step below</p><ul><li>Step 1: Click on the Images</li><li>Step 2: Click on search images to run</li><li>Step 3: Paste “n8nio/n8n” in the search bar and search</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*Viy2EEgl9xt-EXtBUEarYA.png" /></figure><ul><li>Step 4: Pull the first result of the search</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jraySkUhEmynTZ3xw-Bn-Q.png" /><figcaption>Docker process</figcaption></figure><ul><li>Step 5: Run the downloaded image. A new dialogue box will open</li><li>Step 6: Set a name for your container, like “n8n-demo” or any name</li><li>Step 7: Under “Ports”, map host port 5678 to container port 5678</li><li>Step 8: Under “Volumes”, map your n8n_data directory</li><li>Step 9: Set Container path to /home/node/.n8n In the container</li><li>Step 10: Under “Environment”, add the following variables:</li><li>N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true</li><li>N8N_EDITOR_BASE_URL=https://your-ngrok-url.ngrok.app</li><li>WEBHOOK_URL=https://your-ngrok-url.ngrok.app</li><li>N8N_DEFAULT_BINARY_DATA_MODE=filesystem</li><li>GENERIC_TIMEZONE=Europe/Berlin (or your preferred timezone)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eLYDDTF-0g02gVgEzDwtAg.png" /><figcaption>ngrok URL</figcaption></figure><ul><li>Step 11: Click “Run” to start the container</li></ul><blockquote><strong><em>Note:</em></strong><em> Replace “your-ngrok-url.ngrok.app” with your actual ngrok URL. You’ll need to visit your ngrok profile first to get this URL, then come back and set up your Docker container. This situation confused me initially! You need to claim the static domain before you can see it.</em></blockquote><p>When I first tried this approach, I was relieved at how much easier it was to visualize the container settings compared to remembering all the command-line parameters.</p><h3>2. Alternative: Run n8n Using Command Line</h3><p>If you prefer the command line like I eventually did (it makes recreating your setup easier), here’s the approach:</p><p><strong>For Windows (using PowerShell):</strong></p><pre>docker run -it --rm --name n8n -p 5678:5678 -v C:\n8n_data:/home/node/.n8n -e N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true -e N8N_EDITOR_BASE_URL=&quot;https://your-ngrok-url.ngrok.io&quot; -e WEBHOOK_URL=&quot;https://your-ngrok-url.ngrok.io&quot; -e N8N_DEFAULT_BINARY_DATA_MODE=filesystem -e GENERIC_TIMEZONE=Europe/Warsaw docker.n8.io/n8nio/n8n</pre><p><strong>For macOS/Linux:</strong></p><pre>docker run -it --rm --name n8n -p 5678:5678 -v ~/n8n_data:/home/node/.n8n -e N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true -e N8N_EDITOR_BASE_URL=&quot;https://your-ngrok-url.ngrok.io&quot; -e WEBHOOK_URL=&quot;https://your-ngrok-url.ngrok.io&quot; -e N8N_DEFAULT_BINARY_DATA_MODE=filesystem -e GENERIC_TIMEZONE=Europe/Warsaw docker.n8.io/n8nio/n8n</pre><blockquote><strong><em>What this command does:</em></strong></blockquote><ul><li>-it runs Docker in interactive mode (I learned this shows you real-time logs)</li><li>--rm removes the container when it stops (saves cleanup work later)</li><li>--name n8n names the container &quot;n8n&quot; (makes it easy to find in Docker Desktop)</li><li>-p 5678:5678 Map port 5678 on your computer to port 5678 in the container</li><li>-v ~/n8n_data:/home/node/.n8n mounts your local folder to store n8n data</li><li>The -e flags set essential environment variables:</li><li>N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true allows using community-built nodes</li><li>N8N_EDITOR_BASE_URL tells n8n what URL to use for the editor interface</li><li>WEBHOOK_URL defines the URL for incoming webhooks</li><li>N8N_DEFAULT_BINARY_DATA_MODE sets how binary data should be handled</li><li>GENERIC_TIMEZONE sets your preferred timezone for scheduled workflows</li></ul><p>A crucial tip I discovered after much frustration is that you’ll need to replace “your-ngrok-url.ngrok.io” with your actual ngrok URL after you start ngrok. In my early attempts, I made the mistake of trying to set these variables before I knew my ngrok URL, which led to broken webhooks and confusion. The steps below will guide you on how to set the URL correctly:</p><ol><li>Visit your ngrok profile</li><li>Grab the generated URL from the static Domain</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eLYDDTF-0g02gVgEzDwtAg.png" /><figcaption>ngrok URL</figcaption></figure><p>The first time I ran this command, I was fascinated watching the container pull and set up all the necessary components. There’s something satisfying about seeing all those progress indicators fly by✈️</p><p>Wait until you see messages indicating that n8n has started successfully. You’ll see something like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*adAvc3N8Q3Ijhnlqkvvk5g.jpeg" /><figcaption>Running Container</figcaption></figure><pre>Editor is now accessible via:<br>https://your-ngrok-url.ngrok.app</pre><h3>Setting Up ngrok with n8n</h3><h3>1. Start ngrok to create a Tunnel</h3><p>While keeping the Docker container running (this is important — I learned the hard way that both need to be active simultaneously), open the ngrok.exe</p><p>Without connecting the tunnel, you can run into an error like this in the image below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*zR1-B3wwdNYFNpu_T842ew.jpeg" /><figcaption>ERROR URL</figcaption></figure><p><strong>For Windows:</strong></p><p>Run this command. Make sure you set your URL correctly. You can copy it from the ngrok page.</p><pre>ngrok http --url=your-ngrok-url.ngrok.app 5678 </pre><p><strong>For macOS/Linux:</strong></p><pre>./ngrok http --url=your-ngrok-url.ngrok.app 5678</pre><p>The first time I ran this command and saw the tunnel created in real-time, I had one of those “aha!” moments. Suddenly, my local n8n instance had a doorway to the outside world!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2a9spzOHtzn1mwXawe31xw.png" /><figcaption>ngrok Connection</figcaption></figure><h3>2. Get Your Public URL</h3><p>After running the command, ngrok displays a screen packed with information about your tunnel. At first, I found it overwhelming, but the key piece you need is right there in plain sight- your public URL.</p><p>Look for a URL that looks like:</p><pre>https://a1b2c3d4.ngrok.app</pre><p>This is your golden ticket — a public URL that can be used to access your n8n instance from anywhere on the internet. I remember copying this URL and testing it from my phone’s browser (while not connected to my home WiFi) and being amazed that I could access my local n8n server from anywhere!</p><blockquote><strong><em>Important:</em></strong><em> This URL will change each time you restart ngrok if you do not use the static domain. it can only change if you have a paid ngrok plan.</em></blockquote><h3>Test ngrok Connection</h3><p>Next came the crucial test, verifying that my n8n instance was accessible from the outside world:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2tw6aTwoUQxHxhhjgIh34Q.png" /></figure><ol><li>Copy your ngrok URL from the terminal window</li><li>Open a new browser window or private browsing window (this simulates accessing from outside your network)</li><li>Paste the URL and try to access your n8n instance</li><li>You should see the n8n login/sign-up screen</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*8PX3qGyQvXBRTXgk_c7eTA.jpeg" /></figure><p>I remember holding my breath the first time I pressed Enter after pasting that URL. When the n8n login screen loaded, I pumped my fist in the air in celebration! This meant external services could now communicate with my workflows.</p><p>For an extra verification step, I disabled my computer’s WiFi and used my phone’s cellular data to access the ngrok URL. Seeing my n8n instance load on a completely separate network confirmed everything was working perfectly.</p><p>To further test it, a webhook was used to view the external URL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WgnCQKbOTIFcjohHFwuKrQ.png" /><figcaption>Webhook have a public URL</figcaption></figure><p>If both tests pass, congratulations! Your n8n setup with Docker and ngrok is working correctly. This was the moment when I knew I had overcome the biggest hurdle in my automation journey — everything from here on would be about creating awesome workflows, not fighting with infrastructure.</p><h3>Conclusion</h3><p>Congratulations! We’ve successfully set up n8n using Docker and ngrok. This powerful combination has completely transformed my approach to automating everyday tasks.</p><p>For additional help, the <a href="https://community.n8n.io/">n8n community forum</a> has been invaluable in my learning journey. The community is friendly and supportive, with members always willing to share their expertise and creative workflow solutions. We also have an automation community on X(formerly Twitter), as the <a href="https://x.com/nawc_ng?s=21&amp;t=yUr3cX8bJ-xsWcgkdyWUGA">Nigeria Workflow Automation Community</a></p><p>I hope this guide helps you avoid some of the roadblocks I encountered and accelerates your automation journey. There’s something incredibly satisfying about building systems that save you time and eliminate repetitive tasks from your life.</p><p>If you have any questions or suggestions, don’t hesitate to reach out to me on <a href="https://x.com/phadate1?s=21&amp;t=yUr3cX8bJ-xsWcgkdyWUGA">X(formerly Twitter)</a> or <a href="https://www.linkedin.com/in/dunsinfayode/">LinkedIn</a></p><p>Happy automating! I can’t wait to see what you’ll build.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b76e7d5e661" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>