FYI: Amazon Linux 2022 no go. Ubuntu No Problem

I use AWS for almost all of my infrastructure. For n8n I didn’t want to set up a whole Docker cluster, I just wanted to run n8n on a single EC2 instance.

I’m mainly posting to share that trying to install n8n on the latest Amazon Linux 2022 AMI created a slew of dependency errors that I couldn’t resolve. Installing on Ubuntu LTS 22.04 worked seamlessly out of the box.

This article (How to set up n8n via PM2 – n8n Blog) was very helpful setting up n8n to run as a service whenever the machine boots. Piece of cake. And looks like there are a lot of pm2 options that I haven’t explored yet.

Hopefully this post saves someone else some hassle getting up to speed with n8n on AWS.

2 Likes

Hey @Lee_S,

What sort of dependency errors were they? In theory Linux is Linux so as long as node 16 was in use I would assume everything would be all good :thinking:

I didn’t see anything in the instructions about n8n specifically wanting node 16. I tried with Node 19 and 18 before switching to Ubuntu. To be specific about the dependency errors I’d have to try again. Happy to do that & send you the output if it’d be helpful.

Also happy to try again with Node 16.

But if n8n is really meant for Node 16 the instructions should probably say that somewhere before they say “just enter npm install n8n”.

Lee

1 Like

Ive used it with 18 no problem on windows while developing nodes.
Can’t say if everything will be perfect, but it will run.

Hey @Lee_S,

We normally start with 16 as that is our preferred version and it is a good test just to make sure everything is all good.

Sometimes with dependency errors it could be down to npm network issues as well so there are few potential causes.

If you do fancy trying again the output would be great but at the same time there is no rush on it as we can also give it a test at some point.

I will do that over the weekend. What’s the best way to send that? Post in this thread, email you directly, open a support ticket?

In here is probably the best way or drop me a DM

OK, well I don’t know what I did wrong last time because now it’s working fine with Node 18 and Node 19. Here are my notes from trying this again. Let me know if I should delete this thread so it doesn’t confuse people in the future.


1. Create t4g.large instance from AMI al2022-ami-2022.0.20221207.4-kernel-5.15-arm64 (ami-0a7f76080f6cdf1e5)
2. sudo yum upgrade
3. sudo yum install nodejs
4. sudo npm install -g [email protected]
5. node --version output is "v18.4.0"
6. sudo npm install n8n -g output is:
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade to latest, [email protected] or [email protected]! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated @types/[email protected]: This is a stub types definition. express-unless provides its own type definitions, so you do not need this installed.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please switch to @apidevtools/json-schema-ref-parser
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: [email protected]<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

At this point n8n is installed and I am able to start it with no problems.
------------------------------------

7. curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
8. nvm install 19
9. nvm current output is "v19.4.0"
10. sudo npm install n8n -g output is essentially the same set of warnings but the install completes and I am able to start n8n.