<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Damiano Barbati</title>
    <description>The latest articles on DEV Community by Damiano Barbati (@damianobarbati).</description>
    <link>https://dev.to/damianobarbati</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4253699%2Faadcff79-cbd1-4cc5-8e02-356ce5c775df.jpg</url>
      <title>DEV Community: Damiano Barbati</title>
      <link>https://dev.to/damianobarbati</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/damianobarbati"/>
    <language>en</language>
    <item>
      <title>Testing n8n webhooks against your local instance without port forwarding</title>
      <dc:creator>Damiano Barbati</dc:creator>
      <pubDate>Thu, 19 Nov 2026 12:25:48 +0000</pubDate>
      <link>https://dev.to/damianobarbati/testing-n8n-webhooks-against-your-local-instance-without-port-forwarding-270d</link>
      <guid>https://dev.to/damianobarbati/testing-n8n-webhooks-against-your-local-instance-without-port-forwarding-270d</guid>
      <description>&lt;p&gt;Every webhook integration starts the same way. You build the workflow locally, the provider asks for a callback URL, and your laptop is not reachable from the internet.&lt;/p&gt;

&lt;p&gt;The usual options are port forwarding on your router, a small VPS, or a tunnel. Port forwarding puts a door on your router. A VPS means deploying n8n somewhere you did not plan to. A tunnel is the smallest option, but many free tunnels give you a random hostname that changes on every restart, so you update the callback URL in the provider dashboard every time.&lt;/p&gt;

&lt;p&gt;Here is the whole setup with a tunnel that keeps the hostname:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx tubu-cli http 5678 --domain my-n8n.tubu.dev --authtoken YOUR_API_KEY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is it. n8n keeps running on &lt;code&gt;127.0.0.1:5678&lt;/code&gt;, and &lt;code&gt;https://my-n8n.tubu.dev&lt;/code&gt; now reaches it. The CLI opens an outbound connection, so there is no inbound port, no router change and no public IP.&lt;/p&gt;

&lt;h2&gt;
  
  
  Send a test event
&lt;/h2&gt;

&lt;p&gt;In n8n, create a workflow with one Webhook node. Set the method to &lt;code&gt;POST&lt;/code&gt; and the path to &lt;code&gt;tubu-demo&lt;/code&gt;. Select &lt;strong&gt;Listen for Test Event&lt;/strong&gt;, then send:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -i https://my-n8n.tubu.dev/webhook-test/tubu-demo \
  -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; \
  --data &lt;span class="s1"&gt;'{"event":"test"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The payload appears in the editor. If it does not, check three things in order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The node is still listening for the test event.&lt;/li&gt;
&lt;li&gt;The method and path match the node exactly.&lt;/li&gt;
&lt;li&gt;n8n is running on port 5678.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The hostname stays
&lt;/h2&gt;

&lt;p&gt;The part that matters is that the address does not change. You paste the callback URL into the provider once. When you stop the tunnel for lunch and start it again, the same hostname works. No dashboard edits.&lt;/p&gt;

&lt;p&gt;A third-level hostname like &lt;code&gt;my-n8n.tubu.dev&lt;/code&gt; stays with your account while you use it. If you need to hold it while the tunnel is off, reserve it once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx tubu-cli reserve --domain my-n8n.tubu.dev --authtoken YOUR_API_KEY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Be honest about what is exposed
&lt;/h2&gt;

&lt;p&gt;The tunnel publishes the whole n8n instance, not just the webhook path. The editor is reachable at &lt;code&gt;https://my-n8n.tubu.dev/&lt;/code&gt;, and the REST API at &lt;code&gt;/rest&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So keep n8n authentication on. A strong password and, if your version supports it, SSO. Do not disable auth because "it is only a dev instance": the moment the tunnel is up, it is on the internet.&lt;/p&gt;

&lt;p&gt;If you want only the webhook path to be public, put a small reverse proxy in front that forwards &lt;code&gt;/webhook/...&lt;/code&gt; and returns 404 for everything else, then publish the proxy port. That is a separate step, and it is worth it when the instance holds credentials you care about.&lt;/p&gt;

&lt;h2&gt;
  
  
  When you are done
&lt;/h2&gt;

&lt;p&gt;Stop the publisher. A tunnel that stays up is a public endpoint that stays up. If the hostname leaks, change it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits worth knowing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;HTTP tunnels carry HTTP/1.1, WebSocket and SSE. Native HTTP/2 and gRPC are not supported.&lt;/li&gt;
&lt;li&gt;If n8n generates the callback URL itself, set its webhook URL setting to the public hostname. A tunnel does not change what n8n believes its own address is.&lt;/li&gt;
&lt;li&gt;Keep the provider's signature verification on. The endpoint is public.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why I wrote this
&lt;/h2&gt;

&lt;p&gt;I build Tubu, a tunnel service with stable hostnames and European hosting. I wrote this because I kept repeating the same setup for every webhook integration, and the changing hostname was the part that wasted the most time.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: I build Tubu. The one-command idea works with any tunnel that keeps the hostname.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>n8n</category>
      <category>webdev</category>
      <category>selfhosted</category>
      <category>security</category>
    </item>
  </channel>
</rss>
