Powershell support for v3.0

Describe the problem/error/question

Hi,
I understand that n8n v3.0 will only support a Docker-based setup. We are currently running n8n v2 and have a custom PowerShell node as part of our workflow.
Does anyone know whether this custom PowerShell node will still work with n8n v3.0, particularly when running n8n in Docker? Are there any changes or migration steps we should be aware of?

Hey @EspieNL, while you wait for a response, here are some things that might help:

Suggested resources

Automatically matched to your question.

Docs:

Forum:

@Anshul_Namdev, @Wouter_Nigrini, @Erick_Torres - you’ve helped with similar issues before, can you take a look?

Automatically suggested by n8n’s community bot. It’s a pilot - please share feedback here.

Hi @EspieNL Welcome!

Custom nodes as a mechanism are not going anywhere, nothing in the v3 announcements touches N8N_CUSTOM_EXTENSIONS or community packages, and the migration guide is not published yet so there is nothing more specific to point at. Your actual risk is not the node, it is the PowerShell binary it shells out to:

  1. The official image is Alpine based and ships no PowerShell, so the node loads fine in Docker and then fails the moment it spawns pwsh or powershell.exe.
  2. If your scripts are pure PowerShell Core, extend the image and install pwsh in it. Microsoft does not publish Alpine packages any more, so it is the tar.gz plus icu-libs route, or base a sidecar on Microsoft’s own PowerShell image and have the node call that over SSH or HTTP.
  3. If the scripts need Windows itself, Active Directory, Exchange, registry work, no container will run them. Keep a Windows host reachable and turn the PowerShell step into a remote call, with the custom node invoking it over PowerShell remoting or a small HTTP wrapper.

You do not have to wait for v3 to find out which case you are in. Run your current v2 in Docker today with the custom node mounted, and whatever breaks there is exactly what v3 will break, with time to fix it on your own schedule.

Hi @EspieNL
The tar.gz route is the one to take, and the step that bites on the n8n image is that apk itself was removed from it, so a plain apk add in your Dockerfile fails before PowerShell is ever downloaded. Copy apk back in from a stock Alpine image first, then install the dependencies and the musl build of pwsh:

FROM n8nio/n8n
USER root
COPY --from=alpine:3.22 /sbin/apk /sbin/apk
COPY --from=alpine:3.22 /lib/apk /lib/apk
COPY --from=alpine:3.22 /usr/lib/libapk* /usr/lib/
RUN apk add --no-cache ca-certificates less ncurses-terminfo-base krb5-libs libgcc libintl libssl3 libstdc++ tzdata userspace-rcu zlib icu-libs curl \
 && apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust openssh-client \
 && curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.6.5/powershell-7.6.5-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \
 && mkdir -p /opt/microsoft/powershell/7 \
 && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \
 && chmod +x /opt/microsoft/powershell/7/pwsh \
 && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh \
 && rm /tmp/powershell.tar.gz
USER node

Build it, swap n8nio/n8n for the new tag in your compose file, and point the node at pwsh.

Another alternative

FROM n8nio/n8n:latest
USER root
# Install PowerShell Core
RUN apt-get update && apt-get install -y wget apt-transport-https software-properties-common \
    && wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb \
    && dpkg -i packages-microsoft-prod.deb \
    && apt-get update && apt-get install -y powershell
USER node

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

I believe this will not work due to this

Hi,

Thank you all! Those are all good suggestions. I’ll have a look at them and see which approach works best.

I’d prefer to keep all the automation together in n8n if possible. Otherwise, another option I’m considering is spinning up a PowerShell Universal instance, delegating the PowerShell actions to it, and exposing them through an API endpoint.

The Dockerfile in that screenshot copies /sbin/apk, /lib/apk and /etc/apk and leaves out /usr/lib/libapk*. apk in Alpine is dynamically linked against libapk, so with those three lines the binary is present but cannot start. The snippet in post 4 copies the library as well, and it is the same restore n8n’s docs give for the Execute Command node.
The apt-get version cannot run at all. The n8n image is built on Alpine, there is no apt, dpkg or Debian feed inside it. Its base Dockerfile ends with apk del apk-tools, which is the only reason apk is missing, and copying it back from a stock Alpine image is the supported way around that.
@EspieNL keeping everything inside n8n is the derived image in post 4, with the node calling pwsh. PowerShell Universal earns its place only if the scripts need Windows itself, then the custom node or an HTTP Request node calls its endpoint and n8n stays the orchestrator.

I think it should, depending on @EspieNL

Hmmm… I will try your solution for my use case. Finger crossed…

[opc@kjl n8n]$ sh queue.sh
[+] Building 6.8s (21/21) FINISHED
 => [internal] load local bake definitions                                                                         0.0s
 => => reading from stdin 2.40kB                                                                                   0.0s
 => [n8n-worker-2 internal] load build definition from Dockerfile                                                  0.0s
 => => transferring dockerfile: 740B                                                                               0.0s
 => WARN: InvalidDefaultArgInFrom: Default value for ARG docker.io/n8nio/n8n:${N8N_VERSION} results in empty or i  0.0s
 => WARN: InvalidDefaultArgInFrom: Default value for ARG docker.io/n8nio/n8n:${N8N_VERSION} results in empty or i  0.0s
 => WARN: InvalidDefaultArgInFrom: Default value for ARG docker.io/n8nio/n8n:${N8N_VERSION} results in empty or i  0.0s
 => [task-runners-2 internal] load build definition from Dockerfile.runners                                        0.0s
 => => transferring dockerfile: 441B                                                                               0.0s
 => WARN: InvalidDefaultArgInFrom: Default value for ARG n8nio/runners:${N8N_VERSION} results in empty or invalid  0.0s
 => WARN: InvalidDefaultArgInFrom: Default value for ARG n8nio/runners:${N8N_VERSION} results in empty or invalid  0.0s
 => [n8n-worker-1 internal] load metadata for docker.io/library/alpine:3.22                                        2.4s
 => [n8n-worker-1 internal] load metadata for docker.io/n8nio/n8n:2.37.7                                           1.3s
 => [task-runners-1 internal] load metadata for docker.io/n8nio/runners:2.37.7                                     1.3s
 => CACHED [n8n-worker-2 internal] load .dockerignore                                                              0.0s
 => => transferring context: 2B                                                                                    0.0s
 => [task-runners-1 1/3] FROM docker.io/n8nio/runners:2.37.7@sha256:9ddeb7c4797f5bda2aa746364848e9e8c5f8f50b8355e  0.0s
 => [task-runners-2 internal] load build context                                                                   0.0s
 => => transferring context: 1.71kB                                                                                0.0s
 => CACHED [task-runners-1 2/3] RUN /opt/runners/task-runner-python/.venv/bin/python -m ensurepip --upgrade &&     0.0s
 => CACHED [task-runners-1 3/3] COPY n8n-task-runners.json /etc/n8n-task-runners.json                              0.0s
 => [task-runners-1] exporting to image                                                                            0.0s
 => => exporting layers                                                                                            0.0s
 => => writing image sha256:74a76a02ad68325f5a16a44441a74453da029bfd597720a6f149fecf7330ad4f                       0.0s
 => => naming to docker.io/library/n8n-task-runners-1                                                              0.0s
 => [task-runners-2] exporting to image                                                                            0.0s
 => => exporting layers                                                                                            0.0s
 => => writing image sha256:f1d73faa06a99cc57d123deaeeb1eea11407831d0fa63c45b6d6ba52408ff106                       0.0s
 => => naming to docker.io/library/n8n-task-runners-2                                                              0.0s
 => [task-runners-2] resolving provenance for metadata file                                                        0.0s
 => [task-runners-1] resolving provenance for metadata file                                                        0.0s
 => CACHED [n8n-worker-1 stage-0 1/5] FROM docker.io/n8nio/n8n:2.37.7@sha256:4fed2bb0f79c98a6c677b106cf91923c8b58  0.0s
 => [n8n-worker-2] FROM docker.io/library/alpine:3.22@sha256:14358309a308569c32bdc37e2e0e9694be33a9d99e68afb0f5ff  0.5s
 => => resolve docker.io/library/alpine:3.22@sha256:14358309a308569c32bdc37e2e0e9694be33a9d99e68afb0f5ff33cc1f695  0.0s
 => => sha256:14358309a308569c32bdc37e2e0e9694be33a9d99e68afb0f5ff33cc1f695dce 9.22kB / 9.22kB                     0.0s
 => => sha256:2c9d26f410d032d5b1525aa8a873e238b05b90c4ae8618743d4311f0cc827e37 1.02kB / 1.02kB                     0.0s
 => => sha256:2c15e55df5d63efb31b629a557df305130612a16feb029c93447e54dda2c4189 627B / 627B                         0.0s
 => => sha256:738128faa30f570583b0e57efd831e0e6a2a9aacf1be88c8f4c1ef8a5b7033cc 4.12MB / 4.12MB                     0.3s
 => => extracting sha256:738128faa30f570583b0e57efd831e0e6a2a9aacf1be88c8f4c1ef8a5b7033cc                          0.1s
 => [n8n stage-0 2/5] COPY --from=alpine:3.22 /sbin/apk /sbin/apk                                                  0.0s
 => [n8n-worker-1 stage-0 3/5] COPY --from=alpine:3.22 /lib/apk /lib/apk                                           0.1s
 => [n8n-worker-1 stage-0 4/5] COPY --from=alpine:3.22 /usr/lib/libapk* /usr/lib/                                  0.1s
 => ERROR [n8n-worker-2 stage-0 5/5] RUN apk add --no-cache python3 py3-pip &&  pip3 install --no-cache-dir reque  3.4s
------
 > [n8n-worker-2 stage-0 5/5] RUN apk add --no-cache python3 py3-pip &&         pip3 install --no-cache-dir requests pandas yfinance tqdm --break-system-packages:
0.264 fetch https://dhi.io/apk/alpine/v3.24/main/aarch64/APKINDEX.tar.gz
2.656 fetch https://dl-cdn.alpinelinux.org/alpine/v3.24/main/aarch64/APKINDEX.tar.gz
2.730 fetch https://dl-cdn.alpinelinux.org/alpine/v3.24/community/aarch64/APKINDEX.tar.gz
3.224 ERROR: unable to select packages:
3.224   alpine-baselayout-data-3.7.0-r0:
3.224     breaks: world[alpine-baselayout-data><Q1tfZDGjG7PsKvlvSWOyut/xSSGTM=]
3.224   busybox-1.37.0-r20:
3.227     breaks: world[busybox><Q12Ip20urYvnb2Rb6ibe7tKi516F0=]
3.227     satisfies: busybox-binsh-1.37.0-r20[busybox=1.37.0-r20]
3.230   c-ares-1.34.8-r0:
3.230     breaks: world[c-ares><Q1wXUH8XKJTCwcBBI2B3oAwu6w36c=]
3.230     satisfies: libcurl-8.22.0-r0[so:libcares.so.2]
3.230   libcrypto3-3.5.7-r0:
3.230     breaks: world[libcrypto3><Q1fMV+vy41XaJyAuf7tK/Uk30WtLM=]
3.230     satisfies: openssh-client-common-10.3_p1-r1[libcrypto3>=3.1.0]
3.230                openssh-client-common-10.3_p1-r1[so:libcrypto.so.3]
3.230                libapk-3.0.8-r0[so:libcrypto.so.3]
3.230                libssl3-3.5.7-r0[libcrypto3=3.5.7-r0]
3.230                libssl3-3.5.7-r0[so:libcrypto.so.3]
3.230                openssh-keygen-10.3_p1-r1[libcrypto3>=3.1.0]
3.230                openssh-keygen-10.3_p1-r1[so:libcrypto.so.3]
3.230                ca-certificates-20260611-r0[so:libcrypto.so.3]
3.230                python-3.14-3.14.7-r1[so:libcrypto.so.3]
3.230                libcurl-8.22.0-r0[so:libcrypto.so.3]
3.230                openssh-client-default-10.3_p1-r1[so:libcrypto.so.3]
3.230                librdkafka-2.14.1-r0[so:libcrypto.so.3]
3.230                ssl_client-1.37.0-r20[so:libcrypto.so.3]
3.230                openssh-server-10.3_p1-r1[so:libcrypto.so.3]
3.230                openssh-10.3_p1-r1[so:libcrypto.so.3]
3.230   ca-certificates-bundle-20260611-r0:
3.230     breaks: world[ca-certificates-bundle><Q14vbcmPNbf3xeWsw0j56C3xuenh0=]
3.230     satisfies: nodejs-26-26.5.1-r0[ca-certificates-bundle]
3.230                libcurl-8.22.0-r0[ca-certificates-bundle]
3.230   libgcc-15.2.0-r7:
3.230     breaks: world[libgcc><Q1UV7fcFMGsFjYvgWn/WTJpJRqEks=]
3.230     satisfies: nodejs-26-26.5.1-r0[so:libgcc_s.so.1]
3.230                libheif-dav1d-1.23.0-r0[so:libgcc_s.so.1]
3.230                libstdc++-15.2.0-r7[so:libgcc_s.so.1]
3.230                mpdecimal-4.0.1-r0[so:libgcc_s.so.1]
3.230                libheif-1.23.0-r0[so:libgcc_s.so.1]
3.230                libde265-1.0.18-r0[so:libgcc_s.so.1]
3.230                libheif-libde265-1.23.0-r0[so:libgcc_s.so.1]
3.230                librdkafka-2.14.1-r0[so:libgcc_s.so.1]
3.230   libstdc++-15.2.0-r7:
3.230     breaks: world[libstdc++><Q1YzBumVv0KvAtIeRfwZXOK0ZsoJ0=]
3.230     satisfies: nodejs-26-26.5.1-r0[so:libstdc++.so.6]
3.230                libheif-dav1d-1.23.0-r0[so:libstdc++.so.6]
3.230                mpdecimal-4.0.1-r0[so:libstdc++.so.6]
3.230                libheif-1.23.0-r0[so:libstdc++.so.6]
3.230                libde265-1.0.18-r0[so:libstdc++.so.6]
3.230                libheif-libde265-1.23.0-r0[so:libstdc++.so.6]
3.230                librdkafka-2.14.1-r0[so:libstdc++.so.6]
3.230   nghttp2-libs-1.70.0-r0:
3.230     breaks: world[nghttp2-libs><Q17a/oK6/rH93Yy58SQ/w9P9jtLMk=]
3.230     satisfies: libcurl-8.22.0-r0[so:libnghttp2.so.14]
3.230   libssl3-3.5.7-r0:
3.230     breaks: world[libssl3><Q1qEqDiyacUIdRQs3fQPStBu26n8o=]
3.230     satisfies: python-3.14-3.14.7-r1[so:libssl.so.3]
3.230                libapk-3.0.8-r0[so:libssl.so.3]
3.230                libcurl-8.22.0-r0[so:libssl.so.3]
3.230                librdkafka-2.14.1-r0[so:libssl.so.3]
3.230                ssl_client-1.37.0-r20[so:libssl.so.3]
3.231   ssl_client-1.37.0-r20:
3.231     breaks: world[ssl_client><Q1X/jYDHH0y0Fk2wAEVcrW1xmB0sw=]
3.231   libcurl-8.22.0-r0:
3.231     breaks: world[libcurl><Q1kbDOjTNfTLBDGh5TFBDwRTs+4WM=]
3.231     satisfies: git-2.55.0-r0[so:libcurl.so.4]
3.231                librdkafka-2.14.1-r0[so:libcurl.so.4]
3.231   libexpat-2.8.4-r0:
3.231     breaks: world[libexpat><Q1RfLP1IJdcWQPBRz0xHGwaGIKny4=]
3.231     satisfies: python-3.14-3.14.7-r1[so:libexpat.so.1]
3.231                git-2.55.0-r0[so:libexpat.so.1]
3.232   libapk-3.0.8-r0:
3.232     breaks: world[libapk><Q1JcAMm/CkGo2LvCdjE5I6w1mMtA4=]
------
[+] up 0/5
 â ™ Image n8n-n8n-worker-2   Building                                                                                6.9s
 â ™ Image n8n-task-runners-1 Building                                                                                6.9s
 â ™ Image n8n-n8n            Building                                                                                6.9s
 â ™ Image n8n-task-runners-2 Building                                                                                6.9s
 â ™ Image n8n-n8n-worker-1   Building                                                                                6.9s
Dockerfile:15

--------------------

  14 |     # Now install Python + your packages

  15 | >>> RUN apk add --no-cache python3 py3-pip && \

  16 | >>>     #pip3 install --no-cache-dir requests lxml openpyml pandas yfinance tqdm --break-system-packages

  17 | >>>      pip3 install --no-cache-dir requests pandas yfinance tqdm --break-system-packages

  18 |

--------------------

target n8n: failed to solve: process "/bin/sh -c apk add --no-cache python3 py3-pip && \tpip3 install --no-cache-dir requests pandas yfinance tqdm --break-system-packages" did not complete successfully: exit code: 34

[opc@kjl n8n]$

It doesn’t work. If I recall correctly, apk has been dropped from the Alpine image. The documentation needs updating.

That log says apk itself starts now, and the failure has moved into the package database. Every constraint in it has the form name><Q1..., which is apk’s identity-hash pin, and the world file in the current image pins every installed package to its exact hash. COPY --from=alpine:3.22 /lib/apk /lib/apk replaces the installed-package database with the one from a stock 3.22 image, so apk no longer knows nodejs-26, librdkafka or openssh are installed, tries to pull them from the 3.24 repo, and none of those match the pins. Drop that line, copy only the binary and its library, and copy them from the Alpine the image is built on, which your log shows as 3.24:

FROM n8nio/n8n:2.37.7
USER root
COPY --from=alpine:3.24 /sbin/apk /sbin/apk
COPY --from=alpine:3.24 /usr/lib/libapk.so* /usr/lib/
RUN apk add --no-cache python3 py3-pip
USER node

The same two COPY lines replace the three in post 4 for the pwsh build, and leave out the edge line there as well, lttng-ust and openssh-client are optional. This is the form confirmed on the n8n issue tracking the apk removal:

Great!!! Now I have 2 ways to run python