[tahoe-dev] FAQ-type question about ports
Brian Warner
warner at lothar.com
Fri Apr 13 00:55:46 UTC 2012
On 4/12/12 5:40 PM, Vladimir Arseniev wrote:
> If that's the case, why do default 1.9.1 installs still write them, and
> leave tub.port and tub.location commented out in tahoe.cfg? Is it for
> backward compatibility?
The port number isn't known until the node starts up (and asks the
kernel for a free port for the first time), then it gets written out to
the .port file. We didn't want the node to modify tahoe.cfg (seemed like
a bad idea at the time), so it writes it to an external .port file. When
tahoe.cfg:tub.port is empty, the external .port file gets used.
I'd have to double-check, but I'm pretty sure that when
tahoe.cfg:tub.port is present, it takes precedence, and the external
.port file is ignored (and probably overwritten).
(also, if you set the port number to "0", that means "ask the kernel for
a random free port", and I think it still writes the real portnum into
the external .port file, instead of writing "0" there).
So if you care what port it listens on, modify your tahoe.cfg . If you
don't, leave tahoe.cfg at the default and it'll pick a random one (and
will keep reusing that port in the future).
cheers,
-Brian
More information about the tahoe-dev
mailing list