n8n in Turnkey Linux Node.js

n8n in Turnkey Linux Node.js
Photo by Rahul Mishra / Unsplash

For those of us, like me, who are just getting back to fullstack and understanding the changes in the Node.js realm, this error is going to annoy you for sure. I'm simply trying to get a running latest n8n working with this command:

npm install -g n8n@next

Running it based on the suggestions in this stackoverflow thread seems to have fixed that:

npm install -g n8n@next --legacy-peer-deps

Yes, there are still a few deprecated dependencies but that doesn't mean they weren't installed.

As suggested, here's how to run things with a tunnel:

n8n start --tunnel

And, when everything is done it should tell you:

But, of course, the journey isn't done. Looks like we now have to contend with the fact that we're using an autogenerated certificate:

There's some request to get this better documented, but instructions are are all really there on the page. According to the environment documentation related to npm, this is the correct way to set things:

export N8N_SECURE_COOKIE=false

And, profit!

However, the reality is that from a working callback standpoint it doesn't work. I tested with Gmail and this is what it is during authentication (don't worry, that URL is random and am taking this node down):

But, what about if you just wanted the easy way and use npx?

npx n8n

But, if you wanted a tunnel then you're out of luck, somewhat:

npx n8n --tunnel

I'm still trying to figure this part out. So, for the meantime use the previously mentioned flow using regular npm. :-)