Error deploying N8N to AWS Elastic Beanstalk

I’m trying to deploy N8N to the AWS cloud (runs fine locally) but an encountering significant issues each time. I reached out to AWS support and they weren’t sure how to resolve this. In short, each time I deploy the repo to AWS Elastic Beanstalk I see the following error:

Quit unexpectedly after launch: not run as process with ID 1 because › that will cause › problems with shutting everything down correctly. If started with docker › use the › flag "--init" to fix this problem!

I am attempting to deploy the following Dockerrun.aws.json file (image is hosted on AWS ECR). Any advice would be appreciated!

{
  "AWSEBDockerrunVersion": "1",
  "Image": {
    "Name": "xxxxxxx.dkr.ecr.us-east-2.amazonaws.com/n8n:latest",
    "Update": "true"
  },
  "Ports": [
    {
      "ContainerPort": "5678"
    }
  ]
}

It sounds like you are using a very old version of n8n. In the past it was not allowed to have n8n start as the process with the ID 1 (so exactly like the error message mentions) that is however not the case anymore. So if you use the latest n8n version the problem you face should disappear.

Hi Jan,
Thanks. I’m using the latest dockerfile though, (this one: https://github.com/n8n-io/n8n/blob/master/docker/images/n8n/Dockerfile).

Is this not the right image to use?

Ah yes, the dockerfile is correct.

What version number do you supply? Because like you can see here is that error message not in the repository anymore:

So it looks like you are using somehow use old code or an old version.

v0.18.1. Hmm, I just pulled this dockerfile, built it locally, and then pushed to AWS ECR. Any idea why this would happen…?

1 Like

You did not answer my question from above. What version-number are you supplying?

The dockerfile is the least important thing in all of that. It more or less does not matter at all as it does not contain any code. What is important is what version number you supply, as only that one decides which code gets used. If you supply an old version number, it will use the code of that old version.

For your information, the latest version is 0.36.1