Introduction
If you're running n8n in Docker and need to use FFmpeg, integrating it seamlessly can save you a ton of time. This quick guide walks you through enabling FFmpeg directly in your n8n Docker Compose setup—no fuss, no extra effert.
Requirements:
- A self-hosted n8n instance (running in Docker)
- Access to your server’s terminal or SSH
- Docker and Docker Compose installed
- Basic familiarity with editing docker-compose.yml and creating a Dockerfile
Step 1 - Open Your Docker Compose File
First, locate your docker-compose.yml file of n8n in your server. If you didi not host the n8n on your server, check out the link n8n Docker compose Instaltion it is the original website of n8n and you can go it step by step.
Open up your docker-compose.yaml file in your code editor. You’ll want to make sure you have this volume setup:
volumes:
- ./local-files:/filesThis tells Docker to map your local-files folder from your computer to the /files folder inside your container. This way, you can work with files on your local machine directly from n8n.
Step 2 - Donwload ffmpeg file
Now, restart your n8n container to make sure the changes take effect. Next, you’ll need to download FFmpeg. Head over to the website FFMPEG Static Build and download the latest version to your local-files defined in compose.yaml. Just paste this commands in your Terminal.
1wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
2tar -xf ffmpeg-release-amd64-static.tar.xz
3mv ffmpeg-7.0.2-amd64-static/ffmpeg ./local-files/ffmpeg
4chmod +x ./local-files/ffmpegThis will download FFmpeg and extract the files, move the ffmpeg binary to your local-files folder (so it's accessible to the container).
Step 3 - Test it on your n8n instance
Now, head to your n8n instance and add an Execute Command node. In the command box, type:
/files/ffmpeg -version and execute the workflow.
If everything’s set up right, you should see the FFmpeg version printed out. That means it worked! If not, double-check your steps to make sure everything’s in place.
Summary
That’s it 💥! You’ve now got FFmpeg running inside n8n. This setup will stay permanent, so you can use FFmpeg for video and audio processing directly in your n8n workflows.
Feel free to reach out if you run into any issues or need more help! Just leave a command below this blog!