How to use custom packages in n8n on Sliplane

Jonas Scholz - Co-Founder von sliplane.ioJonas Scholz
3 min

Sometimes n8n workflows need extra tools like FFmpeg to process video, or Python libraries for specialized scripts. The standard n8n image doesn't include these, so you'll need to build your own Docker image with the packages baked in.

The good news: it's straightforward. Create a GitHub repo with a Dockerfile, point Sliplane to it, and you're done. Your custom packages will persist across deploys, and you keep all of Sliplane's conveniences — automatic volume backups, logs, and one-click redeploys.

Step 1 — Create a Dockerfile in a GitHub repo

Start with a new GitHub repository (public or private) and add a Dockerfile. Here's a simple example that adds FFmpeg:

FROM n8nio/n8n:1.93.0

USER root
RUN apk add --no-cache ffmpeg
USER node

This Dockerfile starts with a specific n8n version, switches to root to install FFmpeg via Alpine's package manager (apk), and switches back to the regular user.

Commit and push this to GitHub. You can use any branch - just remember which one for the next step.

Pinning the version (like 1.93.0) keeps things predictable. When you want to upgrade n8n, just update the version tag in your Dockerfile and push again.

Step 2 — Deploy it as a Sliplane service

Create a new service in Sliplane that points to your GitHub repo:

  1. In Sliplane, click New Service and choose Repository (Github).
  2. Connect your GitHub repo and select the branch with your Dockerfile.
  3. Add these three environment variables:
    • HOST="0.0.0.0"
    • WEBHOOK_URL="https://$SLIPLANE_DOMAIN"
    • N8N_ENCRYPTION_KEY="randomsecurekey" (replace with a strong, random key)
  4. Mount a volume to /home/node/.n8n (you can name it anything, like n8n-data).
  5. Save the service.

Sliplane will build your Dockerfile and start the service. Your custom image runs exactly like the official one, with the same volume backups and logs.

Step 3 — Use your custom tools in workflows

With your custom image running, you can now use the installed packages in any workflow. Add an Execute Command node and call your tool directly:

ffmpeg -version

n8n-ffmpeg

This confirms FFmpeg is available. For actual work, use whatever command and flags you need. Convert a video, extract audio, resize images, etc.

The beauty of baking packages into your image is that they persist. Restarts, redeploys, and even n8n version upgrades (when you update your Dockerfile) won't lose your custom tools. Everything stays in place because it's part of the image itself.

That's it. Three steps: Dockerfile in GitHub, Sliplane service pointing to it, and the environment variables n8n needs. Your workflows now have access to any packages you need.

Need Node.js packages instead? Check out How to use custom npm packages in n8n on Sliplane for installing npm libraries for your Function nodes.

Welcome to the container cloud

Sliplane makes it simple to deploy containers in the cloud and scale up as you grow. Try it now and get started in minutes!