realies / soulseek-docker

🐳 Soulseek Docker Container
https://hub.docker.com/r/realies/soulseek/
MIT License
216 stars 35 forks source link

Soulseek/Gluetun port conflict (6080) #69

Closed barelyelectric closed 1 year ago

barelyelectric commented 1 year ago

Soulseek and Hexchat are conflicting with port 6080 through Gluetun. In Gluetun's firewall setting I can open the port fine, but once Soulseek is assigned to the Gluetun container for network access (using Unraid), Gluetun controls any port change. This creates a collision if multiple containers are trying to pass a particular port to Gluetun.

My question is: can I change that port 6080 for the webui to be something else in the container itself or does that start breaking things? I've seen other docker containers allow the container port to be changed with a docker argument or at the very least in the gui of the program, but I don't see that for Soulseek (or Hexchat). The sledgehammer solution is to spin up a second Gluetun container and start using that for containers with port conflicts that I can't seem to resolve any other way.

goffy59 commented 1 year ago

This should help you:

docker run -d \ --name=soulpiagluetun \ --cap-add=NET_ADMIN \ --restart=always \ --label=com.centurylinklabs.watchtower.monitor-only=true \ -e TZ=timezone \ -e VPN_SERVICE_PROVIDER="private internet access" \ -e OPENVPN_USER=username \ -e OPENVPN_PASSWORD=password \ -e VPN_PORT_FORWARDING=on \ -v /home/docker/soulpiagluetun:/gluetun \ -e SERVER_REGIONS=region \ -p 6080:6080 \ qmcgaw/gluetun:v3.34.1

you could also try changing -p (enter port number you like):6080 \

personally i just like to keep the containers as default as possible but be sure to forward the port on your gluetun after you have made sure both containers are in the same docker network via placing --network=container:soulpiagluetun \ on the soulseek container (i dont put it on gluetun).

docker run -d \ --name=soulseek \ --restart=always \ --network=container:soulpiagluetun \ --label=com.centurylinklabs.watchtower.monitor-only=true \ -e TZ=timezone \ -v "/home/docker/soulseek/appdata":"/data/.SoulseekQt" \ -v "/raid0/soulseek/downloads":"/data/Soulseek Downloads" \ -v "/home/docker/soulseek/logs":"/data/Soulseek Chat Logs" \ -v "/raid0/soulseek/shared":"/data/Soulseek Shared Folder" \ -e PGID=100 -e PUID=1000 \ realies/soulseek

barelyelectric commented 1 year ago

Sorry if I wasn't clear before. I was looking for the ability to change the default port used by soulseek for the webgui. That's an extremely rare thing to require as one would just forward the container port to a different host port or put it on the gluetun network and be done with it. The trouble occurs when you have multiple docker containers trying to pass that same port through gluetun, which will accept both port 6080 from each container but will only resolve one. Containers with the same ports need to arrive at gluetun already changed. Many containers utilize a boot option to set that port, or at least you can usually set it within the running app itself - neither of which is an option here. I actually started building a container just to grasp the concept but it does appear to be a soulseek specific option and has less to do with building the image. I'm pretty sure of all this but of course I could be wrong.

The only fix I've managed is additional gluetun containers. One for regular connections and another for all the containers that have ports that conflict with no way to change them.

goffy59 commented 1 year ago

I run multiple gluetun containers and it works pretty well in my virtual machine. I have one for soulseek and one for torrents so i can get separate port forwards. You can only forward 1 port per PIA connection (max of 10 connections I think). So 10 different port forwards as long as you make additional vpn containers. This would be a suggested workaround but sadly without changing the config internally inside the container I dont see another way of doing this. I will leave it to someone with more knowledge to recommend a solution to your problem.

realies commented 1 year ago

Sorry for taking a while; there's a new environment variable called NOVNC_PORT that configures this: https://github.com/realies/soulseek-docker/commit/3ff36e240b634e7b95134bfaf53baa50bbd9b7d6