How to install apache2-utils for nextcloud snap?

Our nextcloud server has an A+ security rating according to the nextcloud scanner, but the unrelenting bot traffic is keeping me up at night.

I would like to put an htpasswd secured prompt for the whole site, how do I install apache2-utils for my snap nextcloud application? Ubuntu 24 if that matters.

Basically, it can’t.

If snap creator don’t use the warpper script, most of the snap’s executable files are read-only, which means they cannot be modified, and adding or removing new executable files is not possible.

But adding a password verification function does not necessarily require modifying the snap itself.

You can install a whole apache server as a reverse proxy server in front of NextCloud and let this proxy service do the basic password verification stuff.

1 Like

If the proxy approach is not good enough, you probably could “fork” the snap and craft it with your changes yourself (or let the canonical infrastructure build it for you)

1 Like

+1 to this approach. I would definitely recommend putting a proxy on top of the nextcloud service, without modifying the snap. Some options could be Anubis or Varnish as well, I’m less familiar with htpasswd. Any should work.