Can't use curl in n8n on Railway – using official Docker image

I’m using the official n8nio/n8n Docker image on Railway and need to use curl in a Shell Command node within n8n.

I tried setting the NIXPACKS_PKGS=curl environment variable, but it seems to have no effect — I believe that’s because this project is using a prebuilt Docker image and not Nixpacks.

Is there any way I can install or use curl in my existing Railway pr


oject, or do I need to create a custom Docker image and redeploy n8n through GitHub?

I’d really appreciate any guidance on the best way to handle this within Railway. Thanks a lot in advance! :pray:

Solution: Extend the Official n8n Docker Image
Create a Dockerfile

Add this Dockerfile to your Railway project.

In Railway:

Go to your n8n service settings
Under Deployments, make sure it’s set to use a Dockerfile (not Nixpacks or Buildpack).
If you were previously using the n8nio/n8n image directly, switch to building from this Dockerfile

Hi! Thanks for the instructions :raised_hands:

Quick question:
If I’m using a Primary + Worker setup on Railway (queue mode), and I switch to using a custom Dockerfile — do I need to apply the same Dockerfile to both services?

Also, after doing this, I noticed my login breaks (User.apiKey does not exist). Is there something extra I need to do to make sure DB migrations still run correctly with the Dockerfile?

Thanks! :pray:
I also tried reaching you on Upwork but my payment method didn’t get accepted there.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.