3

I installed nextcloud using sudo snap install nextcloud on my vps. Now I can connect to it at localhost:80 from the vps itself. If I forward the 80-th port via ssh from my local computer, then I can connect from it too. I want nextcloud to work at nextcloud.mydomain.dmn, so I obviously need to do some configuration, however I don't know how to do that with snap.

There is a readonly /snap/nextcloud/current/ directory with conf/httpd.conf. I can't edit it. It's provided by the following systemd unit:

# cat /etc/systemd/system/snap-nextcloud-2184.mount
[Unit]
Description=Mount unit for nextcloud

[Mount]
What=/var/lib/snapd/snaps/nextcloud_2184.snap
Where=/snap/nextcloud/2184
Type=squashfs
Options=nodev,ro

[Install]
WantedBy=multi-user.target

It seems there are not nextcloud-related config files in /etc except for systemd units.

3

The Nextcloud snap is as far I can see not using a vhost, so it doesn't serve Nextcloud for specific domains. You should open port 80 and 443 on your VPS and setup DNS so nextcloud.mydomain.dmnpoints to your VPS.

You'll have to configure Nextcloud to trust this new domain, this is described here (https://github.com/nextcloud/nextcloud-snap/wiki/Connecting-the-Nextcloud-Box-to-the-Internet#3-add-your-external-domain-to-nextcloud):

List the domains you're currently using

sudo nextcloud.occ config:system:get trusted_domains

Create a new entry

sudo nextcloud.occ config:system:set trusted_domains 2 --value=nextcloud.mydomain.dmn

Note: replace "your.domain" with the domain name registered at step 1 and replace the number 2 with the actual number where the new entry will be created. For a 3rd entry, you would use the number 3

That's it. Here is some more information about the snap: - https://github.com/nextcloud/nextcloud-snap/wiki/Included-CLI-utilities - https://github.com/nextcloud/nextcloud-snap/wiki/Enabling-HTTPS-(SSL,-TLS)

0

Nextcloud lauches his own Apache server when installed through snap. By default, it listens on port 80.

(source) You can activate ssl with:

sudo nextcloud.enable-https lets-encrypt

and add your domain to trusted domains in:

/var/snap/nextcloud/current/nextcloud/config/config.php

(source) You can also change the port:

sudo snap set nextcloud ports.https=444

And serve it behind a proxy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.