Ubuntu snaps network interface

Hello all wondered if anyone could help me. Ive got a new server for home that has file server, Plex and then a bunch of VMS.
Plex and nextcloud are snaps which are externally accesible. I have 2 interfaces 1 for internal stuff the other external. It seems that the snaps are network accesible on both interfaces. I was wondering if anyone had worked out how to configure just one of them.
There is a network manager ‘interface’ you can attach but I dont know if this what I am looking for as the documentation is quite thin.

can you only open ports to the external and leave the internal alone? would that not do this?

Yeah thats what I have done so far but there must be a way to just configure what its listening on.
This is the first I have really played with snaps I thought they would be the ideal for little server.

Snaps are supposed to work like local applications, so they have access to everything an application would. If you want a specific application to only listen on a single interface, you simply configure it that way.

Not to imply there’s no way to change that via the CLI somewhere, there surely is, but that isn’t the intended way to work with snaps.

I’m not sure if this is what you mean, but you can do stuff like sudo snap set nextcloud ports.http=8080 to change the port of nextcloud snap. Then you could set up a reverse proxy.

I find it strange that they would have server apps yet no obvious way to configure something like this.
Also there isnt a way to configure it in the app config.


1 Like

Perfect thank you very much. Now just need to find the nextcloud side. Cheers