Need to run curl on execution
kunakorn69
HOBBYOP

8 months ago

Need to run curl on execution however, curl cannot be found.

Could someone pls help explain step by step how to set this up?

Regards,

$10 Bounty

8 Replies

smolpaw
HOBBY

8 months ago

You need to build your application with Dockerfile and in that dockerfile you specify command to install curl or any other linux packages.
Let me know what you are using so I can help write the necessary dockerfile for that.


kunakorn69
HOBBYOP

8 months ago

I followed instruction to host n8n on railway and several of my workflows depend on execute curl commnad. Pls find attached the workspace and all services I had

Pretty new to this and have no idea how to access terminal to do such that.

I have no knowledge at all on how to do this, so I may need step by step or any guideline that you had or can suggest. Thank you very much

Regards,

Attachments


itsmessk
HOBBY

8 months ago

If u want to use curl then u need to build your customized docker file which would have, the one railway template uses is this https://hub.docker.com/r/n8nio/n8n

as u cant modify the template you would need to customize yourself and build custom n8n
let me know if you want to know the exact steps which is the harder way else you could use some javascript and make it without doing that.


kunakorn69
HOBBYOP

8 months ago

Pls guide me the exact steps on how to do this, imagine I know nothing about server code at all. 

I already have workflows in hosting n8n, will it be gone too?

Regards,


macdonjo
PRO

8 months ago

  • Fork n8n's default Dockerfile

    • Create a new folder on your computer called n8n-custom

    • Inside that folder, create a file called Dockerfile with this content:

      FROM n8nio/n8n
      
      RUN apt-get update && apt-get install -y curl
  • Create a Railway project using your custom Dockerfile

    • Go to https://railway.app

    • Create a new project

    • Choose “Deploy from GitHub repo”

    • Push your n8n-custom folder to a new GitHub repo

    • Connect that repo in Railway

  • Set environment variables (same as your current n8n project)

    • In the new project, go to the "Variables" tab

    • Copy/paste the same vars from your old project (like DB info, webhook secrets)

  • Migrate your workflows

    • In your current n8n:

      • Go to Settings → Export all workflows

    • In your new one:

      • Go to Settings → Import workflows

  • Deploy

    • Railway will auto-build the Dockerfile

    • It’ll now include curl


kunakorn69
HOBBYOP

8 months ago

Thank you for the guideline. However, there are 4 services need to be running. Follow the steps you gave will create a single service?

How about Redis, Postgres DB and worker?

If it is too much, let forget about import what I have done. I want to start new project hosting n8n, what do I need to do pls?

Regards,


itsmessk
HOBBY

8 months ago

Yes your workflows could be lost, U could create it newly the best option is to create it from the template that u previously did and delete the primary and worker and use the customized dockerfile to deploy the primary and the worker instance and assign them the variables that are already in the railway deployment copy them and use it. If you need more assistance let me know.


kunakorn69
HOBBYOP

8 months ago

Is it possible that your team can help me copy the serene project to new project and replace both n8n services using docker file.

I don't think I can implement that b/c I am just a user that try to learn n8n

Regards,


Loading...