Hello! Always glad to see people wanting to tinker with Nextcloud, but you’ll probably need to switch from the snap to a more traditional install if you want to dig into it. If you’re looking at running non-Nextcloud things along-side an unmodified Nextcloud, then adding a “reverse proxy” to your setup might be your thing.
Snaps are designed to have a limited interface for configuration (here is Nextcloud’s). Powerful (and easily misconfigured) conf files are set up in a way that works best for the most users
, and are a read-only part of the snap image.
Edit: See the responses from @kyrofa and @PritishSehzpaul below. The snap is designed so that the config file can be edited, after all. You can also modify the snap itself, though this goes against the point of packaging it as a snap in the first place.
What can I do without complicating things?
For most uses, you’ll be able to do what you need using the above snap interface (for example, configuring trusted names and SSL). If you’re looking at adding custom HTML pages (not Nextcloud apps?), you might need a bit more configurable of a solution. Two options below.
I might want to play around with these things. How?
If you’re on the fence about switching to classic install, have a look at the article “Snap or VM?” in the that same wiki. You can check out the install script in the VM repo, or manually install on the server of your choice (docs).
I really just want to be able to run another webapp or serve static files on the same server
You’ll need to set up another web server process (Apache, nginx, etc) outside the snap. It can be on the host server, inside a VM, or anywhere else that can reach your Nextcloud snap and be reached by your end users.
You can modify php parameters and everything else you need for your other app(s), then have it forward Nextcloud requests through to your Nextcloud snap (this could make your Nextcloud url
http://mysite/nextcloud rather than just
http://mysite, for example, depending how you set it up).
There are lots of tutorials about this, but here’s a quick one from DigitalOcean: Use Apache as Reverse Proxy using mod_proxy. You can substitute
apt where they use
aptitude, it does the same thing for those commands, and is installed by default on recent Ubuntu.
Answers to those specific questions
They’re all read-only, but here’s where things live:
You can restart the Apache server using
sudo snap restart nextcloud.apache
There isn’t a php daemon as such in this configuration - looks like it is run per-request, so you wouldn’t even need to restart Apache to apply any changes. Just reload/refresh the page.
Nextcloud doesn’t have a daemon at all, it’s all just php. See above.