Fossil Forum

fossil server: specify ip address to bind to
Login

fossil server: specify ip address to bind to

fossil server: specify ip address to bind to

(1) By anonymous on 2024-03-08 14:32:35 [link] [source]

Could we please add an option to fossil server to bind to a specific ip instead of either "all" or "127.0.0.1" (implicitely for ui)

There could be hosts with plenty of ip adresses, also "lo" often allows for more than just 127.0.0.1.

It would be nice to restrict that "bind ip", if wanted.

Additionally: could we probably allow binding to a unix domain socket instead of a network as well?

(2) By spindrift on 2024-03-08 15:46:02 in reply to 1 [link] [source]

Sometimes, for use cases where the questions you are asking are important, it turns out that running fossil behind a reverse proxy is a better solution than relying on more complex network architecture being provided by a SCM system.

Just as a thought.

(3) By Stephan Beal (stephan) on 2024-03-08 15:49:15 in reply to 1 [link] [source]

There could be hosts with plenty of ip adresses

They "could" be, but in all of fossil's years this has never been an issue. Are you saying that you have a system where its current binding approach is a problem?

Additionally: could we probably allow binding to a unix domain socket instead of a network as well?

Is this a feature you need or does this fall into the category of, "it would be technically interesting if fossil did this"?

This response is not intended to dissuade your request, but to convey that requests for additional complexity generally gain more traction when accompanied by a justification stronger than a hypothetical use case.

(4) By anonymous on 2024-03-08 20:50:47 in reply to 3 [source]

thanks for the quick response.

The Unix Domain socket indeed falls only into the categories "nice to have" and "technically interesting". On a multihomed system with hundreds of users I'd feel better with that. Even only listening on 127.0.0.1 would make it typically accessible for all local users, adding the full burden of setting up all kinds of security, users and such only for small all-day-personal repos. But if it's too much work: kick it. It's esoteric.

The -B <BIND_IP> alongside -P <PORT> for fossil server instead is probably only a one (or some?) line patch, and considered useful. My typical servers and routers have more than one interface to different VLANs. Yes, firewall and reverse proxy would also work. But adding a -B <BIND_IP> is most probably really peanuts.

Please note that cmd_webserver() already takes zIpAddr as parameter. Oh ... wait ... let me read the code closely! What's THAT?

It seems -P already supports this -- it is only not documented! fossil server -P IP:PORT is working.

OK, I'm changing my post. My wish is already fulfilled, if you like, please document it!

Thanks and have a nice weekend!

(5.1) Originally by anonymous with edits by Warren Young (wyoung) on 2024-03-09 00:02:13 from 5.0 in reply to 3 [link] [source]

(7) By sean (jungleboogie) on 2024-03-09 02:50:38 in reply to 5.1 [link] [source]

Ah, you're right!

fossil server --port 192.168.0.35:8080 ~/fossil-repos/warren.fossil &

Will only listen on 8080 for that IP address.

(6) By sean (jungleboogie) on 2024-03-09 02:43:51 in reply to 1 [link] [source]

Similar request... forumpost/8f21936ebd0b76e8