Internal Error when configuring streams in NPM LXC installation #522

Closed
opened 2026-02-04 19:28:54 +03:00 by OVERLORD · 17 comments
Owner

Originally created by @akhdanfadh on GitHub (Feb 19, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

nginxproxymanager.sh

📂 What was the exact command used to execute the script?

bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/nginxproxymanager.sh)"

📝 Provide a clear and concise description of the issue.

When attempting to configure streams in Nginx Proxy Manager (NPM) LXC, the UI consistently returns an "Internal Error" message. The system logs indicate a structuredClone is not defined error, probably a potential Node.js version compatibility issue(?)

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

🔄 Steps to reproduce the issue.

  1. Install NPM in a Proxmox LXC container using the community scripts
  2. Navigate to Streams configuration on the NPM web interface
  3. Configure any new stream, for example:

Incoming Port: 25565
Forward Host: crafty.home.arpa
Forward Port: 25565
TCP Forwarding enabled

  1. Click Save

Expected Behavior:

Image

Actual Behavior:

Image

Paste the full error output (if available).

System logs (journalctl -u npm -f):
Feb 19 07:25:29 nginx-manager node[3594]: [2/19/2025] [7:25:29 AM] [Express ] › ⚠ warning structuredClone is not defined

🖼️ Additional context (optional).

  1. Issue has been verified on fresh NPM LXC installation. The only change from default settings was the configuration of VLAN during LXC creation and disabling IPv6, which was necessary for network connectivity in my environment. All other settings were left at their defaults.
  2. Tested with different stream configurations (Minecraft/Crafty server ports, RustDesk ports) - same error persists
  3. HOWEVER, it was SUCCESSFULLY tested on a fresh Alpine Docker LXC created using the proxmox script with the following docker-compose configuration:
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    network_mode: "host"
    environment:
      DISABLE_IPV6: 'true'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    healthcheck:
      test: ["CMD", "/usr/bin/check-health"]
      interval: 10s
      timeout: 3s
Originally created by @akhdanfadh on GitHub (Feb 19, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? nginxproxymanager.sh ### 📂 What was the exact command used to execute the script? bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/nginxproxymanager.sh)" ### 📝 Provide a clear and concise description of the issue. When attempting to configure streams in Nginx Proxy Manager (NPM) LXC, the UI consistently returns an "Internal Error" message. The system logs indicate a `structuredClone is not defined` error, probably a potential Node.js version compatibility issue(?) ### ⚙️ What settings are you using? - [ ] Default Settings - [x] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 🔄 Steps to reproduce the issue. 1. Install NPM in a Proxmox LXC container using the community scripts 2. Navigate to Streams configuration on the NPM web interface 3. Configure any new stream, for example: > Incoming Port: 25565 > Forward Host: crafty.home.arpa > Forward Port: 25565 > TCP Forwarding enabled 4. Click Save ### Expected Behavior: ![Image](https://github.com/user-attachments/assets/e25b7f53-09b0-42db-84c7-cdba184306df) ### Actual Behavior: ![Image](https://github.com/user-attachments/assets/55873188-b3a3-420a-9176-657ea8541769) ### ❌ Paste the full error output (if available). System logs (`journalctl -u npm -f`): `Feb 19 07:25:29 nginx-manager node[3594]: [2/19/2025] [7:25:29 AM] [Express ] › ⚠ warning structuredClone is not defined` ### 🖼️ Additional context (optional). 1. Issue has been verified on fresh NPM LXC installation. The only change from default settings was the configuration of VLAN during LXC creation and disabling IPv6, which was necessary for network connectivity in my environment. All other settings were left at their defaults. 2. Tested with different stream configurations (Minecraft/Crafty server [ports](https://www.reddit.com/r/nginx/comments/jm2hyg/minecraft_server_on_nginx_proxy_manager_question/), RustDesk [ports](https://github.com/community-scripts/ProxmoxVE/discussions/2388#discussioncomment-12241886)) - same error persists 3. HOWEVER, it was SUCCESSFULLY tested on a fresh Alpine Docker LXC created using the proxmox script with the following docker-compose configuration: ```yaml services: app: image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped network_mode: "host" environment: DISABLE_IPV6: 'true' volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt healthcheck: test: ["CMD", "/usr/bin/check-health"] interval: 10s timeout: 3s ```
OVERLORD added the not a script issueexternal labels 2026-02-04 19:28:54 +03:00
Author
Owner

@tremor021 commented on GitHub (Feb 19, 2025):

What version of NPM is that?

Image

@tremor021 commented on GitHub (Feb 19, 2025): What version of NPM is that? ![Image](https://github.com/user-attachments/assets/dfa7cfc8-332c-43be-8d50-dd7a813c6e24)
Author
Owner

@akhdanfadh commented on GitHub (Feb 19, 2025):

Both docker (which is working) and bare metal LXC (which is not) are v2.12.3

@akhdanfadh commented on GitHub (Feb 19, 2025): Both docker (which is working) and bare metal LXC (which is not) are v2.12.3
Author
Owner

@tremor021 commented on GitHub (Feb 19, 2025):

i'm on 2.12.2 and it works just fine. its something about your version or you have some finicky stuff going on with your network

@tremor021 commented on GitHub (Feb 19, 2025): i'm on 2.12.2 and it works just fine. its something about your version or you have some finicky stuff going on with your network
Author
Owner

@akhdanfadh commented on GitHub (Feb 19, 2025):

Do you mind to build and test on a fresh NPM LXC? And update it if not automatically installed the latest version. Just to make sure if this is about version breaking changes or my environment.

@akhdanfadh commented on GitHub (Feb 19, 2025): Do you mind to build and test on a fresh NPM LXC? And `update` it if not automatically installed the latest version. Just to make sure if this is about version breaking changes or my environment.
Author
Owner

@akhdanfadh commented on GitHub (Feb 20, 2025):

I know that the script is a workaround around the official docker installation and was managed by the GOAT @tteck himself. If anyone can replicate my issue, I suggest to update the script to disable the update command and this relevant question when installing (either force to install the latest working version v2.12.2 or the old v2.10.4).

WDYT @MickLesk @tremor021? Sorry for the tag if that is inappropriate.

@akhdanfadh commented on GitHub (Feb 20, 2025): I know that the script is a _workaround_ around the official docker installation and was managed by the GOAT @tteck himself. If anyone can replicate my issue, I suggest to update the script to disable the `update` command and [this](https://github.com/community-scripts/ProxmoxVE/blob/e1ecc8d6cf3a44056a2a02dd69f9d3c9ce9d8d3d/install/nginxproxymanager-install.sh#L71) relevant question when installing (either force to install the latest working version v2.12.2 or the old v2.10.4). WDYT @MickLesk @tremor021? Sorry for the tag if that is inappropriate.
Author
Owner

@tremor021 commented on GitHub (Feb 21, 2025):

As this is a bug in the NPM code, we can't really do anythng about it until they release a fix.

@tremor021 commented on GitHub (Feb 21, 2025): As this is a bug in the NPM code, we can't really do anythng about it until they release a fix.
Author
Owner

@MickLesk commented on GitHub (Feb 21, 2025):

https://github.com/ZeroDeng01/nginx-proxy-manager/pull/1

@MickLesk commented on GitHub (Feb 21, 2025): https://github.com/ZeroDeng01/nginx-proxy-manager/pull/1
Author
Owner

@akhdanfadh commented on GitHub (Feb 21, 2025):

@tremor021 I am assuming you are well aware that there is no official bare metal installation of NPM, and ours is a workaround.

@MickLesk Thank you for the link. Reading the issue it seems that the bug relates to different database configuration. In our case though, as I wrote above, the log warning is different and I can use the docker installation as is. The default database for docker is sqlite and our workaround is sqlite as well.

All in all, I just want to suggest to at least put a text somewhere in our website to say that our LXC installation workaround would not work with the latest upstream NPM version, so do not update it carelessly until there is a proven working version. It might help someone out there.

But if you think this is really unnecessary, okay then. I just hope there is someone capable maintaining the NPM bare metal workaround here, I'm not. Thank you for maintaining this repo, though. Cheers!

@akhdanfadh commented on GitHub (Feb 21, 2025): @tremor021 I am assuming you are well aware that there is no official bare metal installation of NPM, and ours is a _workaround_. @MickLesk Thank you for the link. Reading the issue it seems that the bug relates to different database configuration. In our case though, as I wrote above, the log warning is different and I can use the docker installation as is. The default database for [docker](https://nginxproxymanager.com/setup/) is sqlite and our [_workaround_](https://github.com/community-scripts/ProxmoxVE/blob/666e170f7d28888d67f467396e7a1cfff8011031/install/nginxproxymanager-install.sh#L159C8-L159C27) is sqlite as well. All in all, I just want to suggest to at least put a text somewhere in our website to say that our LXC installation _workaround_ would not work with the latest upstream NPM version, so do not `update` it carelessly until there is a proven working version. It might help someone out there. But if you think this is really unnecessary, okay then. I just hope there is someone capable maintaining the NPM bare metal _workaround_ here, I'm not. Thank you for maintaining this repo, though. Cheers!
Author
Owner

@delusi0nal commented on GitHub (Mar 2, 2025):

I had exactly the same issue.
The problem was the Node.js version (16). structuredClone is added as of version 17.

Here is how I fixed it.
Type in your LXC console:

  • npm install n -g
  • n stable

Restart your LXC.
Hope this helps you as well.

@delusi0nal commented on GitHub (Mar 2, 2025): I had exactly the same issue. The problem was the Node.js version (16). structuredClone is added as of version 17. Here is how I fixed it. Type in your LXC console: - `npm install n -g` - `n stable` Restart your LXC. Hope this helps you as well.
Author
Owner

@lengschder97 commented on GitHub (Mar 11, 2025):

My node instance whas managed by nvm.
Type this to update Node.js

nvm install node
nvm use node
nvm alias default node

Then restart npm service

systemctl restart npm.service
@lengschder97 commented on GitHub (Mar 11, 2025): My node instance whas managed by nvm. Type this to update Node.js ``` nvm install node nvm use node nvm alias default node ``` Then restart npm service ``` systemctl restart npm.service ```
Author
Owner

@videodj commented on GitHub (Mar 21, 2025):

I've tried both options, but still can't get streams to work. My default Node.js is 23.10.0 and npm 11.2.0. What are my options to get streams working? Do I need do use docker instead of LXC?

@videodj commented on GitHub (Mar 21, 2025): I've tried both options, but still can't get streams to work. My default Node.js is 23.10.0 and npm 11.2.0. What are my options to get streams working? Do I need do use docker instead of LXC?
Author
Owner

@akhdanfadh commented on GitHub (Mar 22, 2025):

@videodj I've not yet tried the above solution actually, decided to go the official docker way for better support and maintained.

@akhdanfadh commented on GitHub (Mar 22, 2025): @videodj I've not yet tried the above solution actually, decided to go the official docker way for better support and maintained.
Author
Owner

@ivanlinares commented on GitHub (Mar 24, 2025):

@videodj I've not yet tried the above solution actually, decided to go the official docker way for better support and maintained.

Hi!, been following your issue with the community script for rustdesk, can you please point me where to find the docker solution? TIA

@ivanlinares commented on GitHub (Mar 24, 2025): > [@videodj](https://github.com/videodj) I've not yet tried the above solution actually, decided to go the official docker way for better support and maintained. Hi!, been following your issue with the community script for rustdesk, can you please point me where to find the docker solution? TIA
Author
Owner

@timtjtim commented on GitHub (Mar 28, 2025):

I had to change the systemd service file in /lib/systemd/system/npm.service to use the nvm node version, found via which node, so my systemd service file looks like

[Unit]
Description=Nginx Proxy Manager
After=network.target
Wants=openresty.service

[Service]
Type=simple
Environment=NODE_ENV=production
ExecStartPre=-/bin/mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge
ExecStart=/root/.nvm/versions/node/v22.14.0/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=250
WorkingDirectory=/app
Restart=on-failure

[Install]
WantedBy=multi-user.target

note the change to the ExecStart line

then

systemctl daemon-reload
systemctl restart npm.service
@timtjtim commented on GitHub (Mar 28, 2025): I had to change the systemd service file in `/lib/systemd/system/npm.service` to use the nvm node version, found via `which node`, so my systemd service file looks like ``` [Unit] Description=Nginx Proxy Manager After=network.target Wants=openresty.service [Service] Type=simple Environment=NODE_ENV=production ExecStartPre=-/bin/mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge ExecStart=/root/.nvm/versions/node/v22.14.0/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=250 WorkingDirectory=/app Restart=on-failure [Install] WantedBy=multi-user.target ``` note the change to the `ExecStart` line then ``` systemctl daemon-reload systemctl restart npm.service ```
Author
Owner

@tremor021 commented on GitHub (Mar 28, 2025):

@videodj I've not yet tried the above solution actually, decided to go the official docker way for better support and maintained.

not really sure why you keep emphasizing our script is a "workaround". The script is emulating a bare metal installation, and it works fine.

NPM worked just fine until it got updated to v2.12.3. After that they broke something, which is reported countless times on their github. I'm not really sure what "better support" means, but streams error is still not fixed for people who got it.

Also, 1300 ongoing issues on their github i a clear sign that the codebase is broken and problems arise all over the place.
This is labeled as non-script issue for a reason

@tremor021 commented on GitHub (Mar 28, 2025): > [@videodj](https://github.com/videodj) I've not yet tried the above solution actually, decided to go the official docker way for better support and maintained. not really sure why you keep emphasizing our script is a "workaround". The script is emulating a bare metal installation, and it works fine. NPM worked just fine until it got updated to v2.12.3. After that they broke something, which is reported countless times on their github. I'm not really sure what "better support" means, but streams error is still not fixed for people who got it. Also, 1300 ongoing issues on their github i a clear sign that the codebase is broken and problems arise all over the place. This is labeled as non-script issue for a reason
Author
Owner

@akhdanfadh commented on GitHub (Apr 3, 2025):

not really sure why you keep emphasizing our script is a "workaround".

I know that the script is emulating a bare metal installation, but the only official installation of NPM is by docker compose as see here. That's why I called that. In a way, tteck was kind of reverse engineering the installation by looking at the dockerfile. And if the docker way can configure NPM as is while the script not, then clearly there is something wrong in the script and ...

I'm not really sure what "better support" means

... thank you everyone for pointing what the problem is, so at least we know what's wrong and not just labeled it as non-script issue. If someone really cares about this, maybe they can test what's wrong first, then elaborate PR of probably @timtjtim's working solution into the script.

I know the ongoing issues on their repo, and that's my decision.
I don't want to make an enemy and waste my mental here.
I'm out, cheers!✌🏼

@akhdanfadh commented on GitHub (Apr 3, 2025): > not really sure why you keep emphasizing our script is a "workaround". I know that the script is emulating a bare metal installation, but the only official installation of NPM is by docker compose as see [here](https://nginxproxymanager.com/setup/). That's why I called that. In a way, tteck was kind of reverse engineering the installation by looking at the dockerfile. And if the docker way can configure NPM as is while the script not, then clearly there is something wrong in the script and ... > I'm not really sure what "better support" means ... thank you everyone for pointing what the problem is, so at least we know what's wrong and not just labeled it as non-script issue. If someone really cares about this, maybe they can test what's wrong first, then elaborate PR of probably @timtjtim's working solution into the script. I know the ongoing issues on their repo, and that's my decision. I don't want to make an enemy and waste my mental here. I'm out, cheers!✌🏼
Author
Owner

@tremor021 commented on GitHub (Apr 3, 2025):

@akhdanfadh I'm gonna go ahead and disappoint you right off the bat, majority of apps here turned into LXC's are Dockerfiles/Makefiles translated into bare metal installs. Are you gonna call them all workarounds? :)

The support i'm talking about, the one you call "better" is the one who produced the problem you have. The streams issue has been reported countless time on THEIR OFFICIAL GIHTUB and its not fixed for people who have it, so it CAN'T BE FIXED HERE BECAUSE OF THAT. Have to write it in caps, because you seem to refuse to accept facts for some reason. Not sure why you're so defensive about this.

I tested @timtjtim service file fix, it didnt fix the issue at my test LXC, so the issue is not in Node. Its in the app source. Nowhere in their source code is said that you have to use NVM, or that they use it... As there is a saying "Doing more of the same and expecting different result is definition of insanity", meaning that we can install the same Node version from every possible repo out there, its gonna work the same.

I'm sorry that you feel you're wasting your mental, but thats how life is. I'm just saying that your issue won't go away because official docker install got that same issue reported

@tremor021 commented on GitHub (Apr 3, 2025): @akhdanfadh I'm gonna go ahead and disappoint you right off the bat, majority of apps here turned into LXC's are Dockerfiles/Makefiles translated into bare metal installs. Are you gonna call them all workarounds? :) The support i'm talking about, the one you call "better" is the one who produced the problem you have. The streams issue has been reported countless time on THEIR OFFICIAL GIHTUB and its not fixed for people who have it, so it CAN'T BE FIXED HERE BECAUSE OF THAT. Have to write it in caps, because you seem to refuse to accept facts for some reason. Not sure why you're so defensive about this. I tested @timtjtim service file fix, it didnt fix the issue at my test LXC, so the issue is not in Node. Its in the app source. Nowhere in their source code is said that you have to use NVM, or that they use it... As there is a saying "Doing more of the same and expecting different result is definition of insanity", meaning that we can install the same Node version from every possible repo out there, its gonna work the same. I'm sorry that you feel you're wasting your mental, but thats how life is. I'm just saying that your issue won't go away because official docker install got that same issue reported
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#522