Tunnel in development env

How to run n8n using npm run dev with —tunnel?

@chos2205 this should do it npm run build && ./packages/cli/bin/n8n start --tunnel

Shoundn’t use npm run dev for development?

It depends on your personal preference. I for example never do. Is way to slow. I have in one terminal running with npm run build and another one I just run the cli directly. If I make changes to a node (except parameter changes) I can simply re-run the workflow without having to restart the CLI (as each workflow starts in a new process). Only if I make changes to the core, then I restart the CLI whenever needed to check. Is way faster than running npm run dev.
Start the CLI only with tunnel if I need it. As starting with tunnel is also a little bit slower than without. So no need to waist a few seconds on every iteration if there is no good reason.

1 Like

Thanks @jan

Happy if it helped. Have fun!