I see that some snaps are trying to provide a web server on port 80 or 443. Examples are: Nextcloud, ONLYOFFICE and Fidus Writer (which I am working on). Yet I didn’t see any logic that deals with more than one package wanting to occupy port 80. Is the idea simply that we don’t worry about users trying to use the same port for several things? Or is there a general way to let the configure hook check whether port X is occupied and if so pick port Y instead?
Also, within the Fidus Writer snap we want to run a languagetool server. That server really only needs to be accessible from the Fidus Writer daemon. If I puck some random port (like: 8027) and do not give the languagetool daemon plugs for network and network-bind will that isolate it from everything else running on the machine? Will I still need to worry about port collision?