Want to install FFMPEG and other tools along with n8n

qveera
FREE

2 months ago

Hi,

I want to install ffmpeg along with n8n, how can I do that?

Solved$10 Bounty

1 Replies

qveera
FREE

2 months ago

3afdc61f-aba6-4d5e-a61d-e78e8fe708d1


joao-atlaas
HOBBY

2 months ago

If you're looking to use tools like FFmpeg alongside your n8n workflows on Railway, you'll need to customize the deployment environment. By default, the official n8n Docker image doesn’t include additional utilities like FFmpeg, but with a custom Dockerfile, it's straightforward to add them and deploy a fully integrated solution.

To get started, create a Dockerfile that extends the official n8n image and installs FFmpeg using standard Debian package management. Here's an example:

FROM n8nio/n8n:1.93.0 # Install ffmpeg and other optional tools USER root RUN apt-get update && apt-get install -y \ ffmpeg \ curl \ wget \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Switch back to n8n user to maintain security best practices USER node

This configuration ensures that the n8n environment stays intact while enabling access to powerful tools like FFmpeg. After creating the Dockerfile, push it to a GitHub repository and connect that repo to a new service in Railway. Railway will detect the Dockerfile and automatically build and deploy your customized container.

Don't forget to configure your environment variables in Railway as well. At a minimum, you should set:

  • N8N_ENCRYPTION_KEY: a persistent encryption key to retain credentials across redeploys

  • DATABASE_URL: a connection string to a persistent PostgreSQL database

  • Any other N8N_ configuration variables required for your workflows

Once deployed, FFmpeg will be available within your container. You can use it in n8n workflows via the Execute Command node or custom scripts.

By combining FFmpeg and n8n in a single Railway deployment, you unlock a range of possibilities—like video/audio processing, automation with media files, or advanced integrations. This method gives you full control over your environment without sacrificing the simplicity and scalability Railway offers.


qveera
FREE

2 months ago

Any update?


cicerorph
HOBBY

2 months ago

You can install ffmpeg and n8n by creating a nixpacks file or a railpack file, here is an example using nixpacks:

# nixpacks.toml file
[phases.setup]
nixPkgs = ['ffmpeg', 'n8n']

cicerorph
HOBBY

2 months ago

You can find other nix packages on https://search.nixos.org/packages


Hey, to install using Railpack (the new Railway build system, you're probably already on it) just specify the following environment variable:

RAILPACK_PACKAGES=ffmpeg

qveera
FREE

2 months ago

Where I need to speicify it?


2 months ago

In your service settings there is a Variables tab. set it there


qveera
FREE

2 months ago

You mean this one?

1384043096001740800


qveera
FREE

2 months ago

I found the variable section and added, deployed. but still getting the error

{
"errorMessage": "Command failed: ffmpeg\n/bin/sh: ffmpeg: not found\n",
"errorDetails": {},
"n8nDetails": {
"nodeName": "Execute Command",
"nodeType": "n8n-nodes-base.executeCommand",
"nodeVersion": 1,
"itemIndex": 0,
"time": "6/16/2025, 11:12:21 AM",
"n8nVersion": "1.97.1 (Self Hosted)",
"binaryDataMode": "default",
"stackTrace": [
"NodeOperationError: Command failed: ffmpeg",
"/bin/sh: ffmpeg: not found",
"",
" at ExecuteContext.execute (/usr/local/lib/nodemodules/n8n/nodemodules/.pnpm/n8n-nodes-base@file+packages+nodes-base@aws-sdk+credential-providers@3.808.0asn1.js@512b981d6b49d407a163f4d5244314033/nodemodules/n8n-nodes-base/nodes/ExecuteCommand/ExecuteCommand.node.ts:102:12)",
" at WorkflowExecute.runNode (/usr/local/lib/nodemodules/n8n/nodemodules/.pnpm/n8n-core@file+packages+coreopenai@4.78.1encoding@0.1.13zod@3.24.1/nodemodules/n8n-core/src/execution-engine/workflow-execute.ts:1185:9)", " at /usr/local/lib/nodemodules/n8n/nodemodules/.pnpm/n8n-core@file+packages+coreopenai@4.78.1encoding@0.1.13zod@3.24.1/nodemodules/n8n-core/src/execution-engine/workflow-execute.ts:1534:27",
" at /usr/local/lib/nodemodules/n8n/nodemodules/.pnpm/n8n-core@file+packages+coreopenai@4.78.1encoding@0.1.13zod@3.24.1/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2098:11"
]
}
}


qveera
FREE

2 months ago

Not working

1384074173374271500


qveera
FREE

2 months ago

Is there any video tutorials?


2 months ago

No, on Railway


2 months ago

you are messing with n8n variables, those are unrelated


2 months ago

Hi! Are you using a n8n template by chance?


2 months ago

cc:@qveera


qveera
FREE

2 months ago

Yes, I am using n8n template


qveera
FREE

2 months ago

@Medim


2 months ago

If you are using this template: https://railway.com/deploy/r2SNX_
You will need to create a custom dockerfile for the worker and include ffmpeg there.

I'm currently at my work office but would be happy to assist you later, a lot of users have this same issue so it will help for future threads.


qveera
FREE

2 months ago

Thank You So Much @Medim , please let me know when we can connect



2 months ago

there's a little how to in the readme


2 months ago

try it and tell me how it goes


qveera
FREE

2 months ago

Sure


qveera
FREE

2 months ago

Thanks for your file, but we need to have worker and also redis and postgres right?


qveera
FREE

2 months ago

@Medim


2 months ago

You deploy this template: https://railway.com/deploy/r2SNX_


2 months ago

And switch the Worker service to the Dockerfile from the repo I linked


qveera
FREE

2 months ago

Thanks @Medim , do you know how to create custom templates like that?


qveera
FREE

2 months ago

Deployed the template



qveera
FREE

2 months ago

Seems like I need to have my own github


qveera
FREE

2 months ago

I will create it now


2 months ago

You can also link my repo if you don't want to create one yourself


qveera
FREE

2 months ago

====================

Starting Healthcheck

====================

Path: /healthz

Retry window: 5m0s

Attempt #1 failed with service unavailable. Continuing to retry for 4m55s

Attempt #2 failed with service unavailable. Continuing to retry for 4m43s

Attempt #3 failed with service unavailable. Continuing to retry for 4m31s

Attempt #4 failed with service unavailable. Continuing to retry for 4m22s

Attempt #5 failed with service unavailable. Continuing to retry for 4m3s

Attempt #6 failed with service unavailable. Continuing to retry for 3m37s

Attempt #7 failed with service unavailable. Continuing to retry for 2m56s

Seeing these errors on the main n8n


qveera
FREE

2 months ago

Are you not getting?


2 months ago

nope


2 months ago

want me to record a video of the entire process?



qveera
FREE

2 months ago

Thank You So Much @Medim , it helped


qveera
FREE

2 months ago

https://github.com/qveera/n8n-docker something wrong witht his?


2 months ago

looks fine


qveera
FREE

2 months ago

Thank you so much it is working now


qveera
FREE

2 months ago

how can I add a file to the docker?


qveera
FREE

2 months ago

I need to add a file to which I use in my content creation


qveera
FREE

2 months ago

it is a font file


2 months ago

U add it to your repo and include it in your dockerfile


2 months ago

it


qveera
FREE

2 months ago

GOt it


qveera
FREE

2 months ago

I want to keep it inside the worker


qveera
FREE

2 months ago

ADD noto-serif-condensed-black-italic.ttf /home/node/

This is how I need to do it?


qveera
FREE

2 months ago

In my locker docker which has only one n8n instance, I kept the file here and it is working

1384370864321204200


qveera
FREE

2 months ago

Is it possible to see the folders and files of railway?


qveera
FREE

2 months ago

Able to add it


qveera
FREE

2 months ago

thanks bro


qveera
FREE

2 months ago

You are the saviour


qveera
FREE

2 months ago

How can I access the files created by my automation ? I create some temp files and I need to delete them at the end of the automation. Normally when something fails, it does not delete the fails.


2 months ago

Hmm, can you access it directly through n8n? otherwise u would need to use the Filebrowser template but considering your usecase it would be a hassle to do so.


qveera
FREE

2 months ago

Sure


a month ago

!s


Status changed to Solved medim about 2 months ago


Want to install FFMPEG and other tools along with n8n - Railway Help Station