Install Curl app for use via “Execute Command”

Can I install Curl inside n8n to use it using the “Execute Command” node?

Do you have n8n installed via npm or are you running it via Docker?

I running n8n from Docker

In this case you have to build your own docker image. But you can base it on the existing n8n one. For that reason would it be very simple.

So you create a file named “Dockerfile” with this content:

FROM n8nio/n8n

RUN apk --update add curl

In the same folder you execute then this command:

docker build -t n8n-curl .

Now you can replace the docker image you used before (like n8nio/n8n) with n8n-curl. You will then be able to execute curl via the Execute Command-Node.

1 Like

it would be great to have curl on the default docker image

2 Likes

Agree with curl being on the base container.

Either way, check this solution:

How would it work with docker-compose and Dockerfile together?
I’ve done it now like here: How to install packages from Docker compose? - Stack Overflow
but it seems to be not working - the container starts without any issues but when I login, I still can’t access Curl.

Hey @Chris7935,

In theory it would be a case of making your own Dockerfile using the example above then run that with Docker compose like normal using your own image.