The new update will pick a random port for the file but on my docker I only allowed the port 15441. So I have an error with my port being open.
Update the docker so it does have a fix port and update the documentation.
Maybe adding a PORT env variable could be enought which would be written in the zeronet.conf file...
We could add it to line 25
CMD (! ${ENABLE_TOR} || tor&) && python zeronet.py --ui_ip 0.0.0.0 --fileserver_port ${FILESERVER_PORT}
I'm not using docker right now, so it would be nice if someone could add&test it.
(similar modification required for vagrant file)
I can prepare a PR tomorrow.
I have choose to just enforce the use of the default port 15441 because when starting the docker you can actually choose to which port you want it to be bind.
I believe this should be enough for what people want.
Also Vagrant doesn't need to be modified because if I am not mistaken it is the user who start the application and he can specify the use of port 15441. So no modification require.
It could work, but then Chinese peers won't be able to connect to the node as the GFW totally blocked the port 15441. So I would recommend to at least change it to other port eg. 26552.
You are right ! I forgot about that.
I will change it today.
Actually you can redirect the port when starting the container by doing this :
docker run -d -e "ENABLE_TOR=true" -v <local_data_folder>:/root/data -p 26552:15441 -p 127.0.0.1:43110:43110 nofish/zeronet
And you won't have problem. It will use the port 26552
Or maybe we can expose a range of possible port like this : https://stackoverflow.com/questions/28717464/docker-expose-all-ports-or-range-of-ports-from-7000-to-8000#28721643
It would be the best solution I believe
I tested using a range of ports in docker but you will actually have them block by docker which is not cool. When I tried with default range it would crash.
I believe letting the user picking which port he wants to bind zeronet port with is actually the best solution.
docker run -d -e "ENABLE_TOR=true" -v <local_data_folder>:/root/data -p 26552:15441 -p 127.0.0.1:43110:43110 nofish/zeronet
Is not really going to work, because the client will think it's running on 15441, it will report that port to the trackers and the other clients will try to connect to 15441.
I think simply changing it from 15441 to another port is the easiest option yet. If someone wants to change that, then it's possible by editing the docker file.
Oh ! Didn't thought about this.
Ok I will change.
Done.
Thanks!
Most helpful comment
We could add it to line 25
CMD (! ${ENABLE_TOR} || tor&) && python zeronet.py --ui_ip 0.0.0.0 --fileserver_port ${FILESERVER_PORT}I'm not using docker right now, so it would be nice if someone could add&test it.
(similar modification required for vagrant file)