Installing and Setting up NextCloud, and website help

Dropbox is being dumb now, so I guess it’s time to figure out how to setup NextCloud.

Before getting too far into this, I wanted to find out how this works. I have a VPS with a functional (yet very basic) website running. I want to have the NextCloud installed and running local, on a server on my home network.

Is it possible to have the web portion of a local NextCloud install run on (or connect to?) a remote VPS-based sub-domain? If that makes sense?

you mean you want to route your nextcloud through your vps? or just use a subdomain of the domain that the VPS has?

Does the website need to be hosted on the same system where the nextcloud software and storage is located?

yes

damn

you could run an always on VPN to your vps and set up a reverse proxy for it.

1 Like

I don’t know, just hosting nextcloud on my VPS might just be the easiest option at this point. Not a ton of space, but probably enough.

I need to redo the VPS from scratch, though. Something weird is going on with grub and the kernels.

should be able to host from your own place. what does your domain situation look like?

Through namecheap. Need to figure out subdomains still.

I could just change all the IPs to my public home IP. Internet is garbage 6 down, .75 up. I don’t think the IP changes often, but it’s not static. And I should be moving in a few months.

just make a new A record with whatever subdomain in the host and your home ip.

I think it’s dawning on me.

So i keep the VPS IP for the main site and any other subdomains I decide to make, but do a subdomain tied to my home IP for the nextcloud.

1 Like

Just to clarify the storage does not have to be on the same server as the web server and Nextcloud software. My Nextcloud server is on my desk running in a Udoo x86 while the storage is accessed via a mount point to my FreeNAS.

External storage support is included out of the box as well.

I have a guide here. which hopefully helps (although somewhat out of date now). Your setup scenario sounds a little different to mine though.

Nextcloud is enterprise grade software. In that scenario it would be setup as detailed in this whitepaper.

1 Like

I’ve been working on domain name records stuff before installing and setting up nextcloud.

Before doing the subdomain thing on the local system nextcloud will be installed on, I was trying to figure out subdomains on the VPS.

Following some guides, it seems pretty straight forward. Multiple guides all say the same thing, and I have double checked and I have nginx setup correctly and the files are all in the right place.

But when going to the subdomain in a browser the index.html from the main site is displayed. I’m not sure why.

I’m doing the DNS records through DigitalOcean, as they seem to suggest doing it that way. I have DO’s nameservers setup at NameCheap, and the A records are setup at DO and pointing to the droplet IP address.

I’m going to let it sit for a while or overnight to see if it just needs time to update records or something. Otherwise, it might be that DO can’t do DNS records for other IPs?

So if anyone is familiar with subdomains and wants to lend some expertise here, I’d be thankful.

I went ahead and removed all the DNS record stuff from DigitalOcean and set it all up with NameCheap. This is what I have for records there:

Does that look correct?

If so, I have my website files set up on my VPS like this:

/var/www/domain.com/index.html

and

/var/www/forum.domain.com/index.html

Is this correct?

If so, then I have the two nginx config files in

/etc/nginx/sites-available/

top domain is:

server {
        listen 80 default_server;
        root /var/www/domain.com;
        index index.php index.html index.htm index.nginx-debian.html;
        server_name domain.com;

        location / {
                try_files $uri $uri/ =404;
        }

	location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        }

	location ~ /\.ht {
                deny all;
        }
}

And subdomain is:

server {
        listen 80;
        root /var/www/forum.domain.com;
        index index.php index.html index.htm index.nginx-debian.html;
        server_name forum.domain.com;

        location / {
                try_files $uri $uri/ =404;
        }

	location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        }

	location ~ /\.ht {
                deny all;
        }
}

Both of these are linked to

/etc/nginx/sites-enabled/

I’ve removed the actual domain name for now.

I’m not sure what I’m doing wrong. When I go to the subdomain the index file for the main domain is displayed.

Not true an nginx proxy could forward the traffic to the specific endpoint of a VPN to the vps from the actual nextcloud server with port forwarding inside the tunnel

Just require some interesting masquerading and NATing. I’m currently working on it. It’s not for the faint of heart at all

Could you knock it off with the ahckchyually? I literally said this only a few posts later.

Your domain settings seem correct. I don’t know about nginx… I always stick with Apache.

I didn’t read after your post last night got tired sorry.