Remove public port from container / stack

I just started with a new nextcloud install. I had to provide a port for external access for it.
Now I added a “Load Balancer” with which I’m able to access the container fine. Obviously, I want to remove the “direct” public port from the container, so it’s only accessible through the loadbalancer.

However, this doesn’t seem to be possible through the webinterface (I can only change the port number), nor the API (I tried to delete the “ports” array, the “publicEndpoints” object, nothing seemed to do the trick).

Can someone point me in the right direction?

Thanks ain advance,

I can confirm that I have removed ports before in the web interface. When upgrading the service there is a minus sign on the right hand side of the port definition. v1.6.5.

Also, a less attractive option but works is to clone the service then delete the original. I have had to do that a few times in the past.

I can also confirm, that there is a “minus” button on the right hand side of “port mapping” when doing an Upgrade.
Just use this to remove the mapping. Version used: 1.6.7

That’s definitely not the case here. I’m also on 1.6.7 (rancher:latest) - maybe it isn’t possible because it has a sidekick container attached?
Going into any options, I’m unable to remove the port - only change it:

you are in EDIT mode.
to remove a port mapping you have to do UPGRADE.

1 Like

Click the little up-arrow in the top right corner of the page.

That did the trick - upgrade instead of edit :slight_smile:Thanks!