Struggling with Initial Install

Hi all!

I’m attempting a home NextCloud server on Ubuntu with the Snap package. I’m not a linux server guru, more of a windows desktop support guy and gamer. Some of the documentation might as well be in Latin for me.

Here’s where I seem to be stuck:
chown -R www-data:www-data /var/www/nextcloud/

The folder doesn’t exist, which makes me think I missed a step. I have no idea which though. And for some reason I can’t just make the folder, which makes me think I missed another something else.

Where did I go wrong?

Stay safe!

you must first create the folder that is missing there. then you paste the Nextcloud installation file there.

or you have not properly extracted the Nextcloud archive.

these are the default folders (var / www / …) that the browser can access externally. if you configure Nextcloud correctly, there will be no personal files in there at the end

1 Like


I made the folder. Now I’m getting a different message.
Gives me a 403 (forbidden)

The https version gives me an error about the SSL being too long.

Looks like I can’t extract to that nextcloud folder.

The Folder needs the rights from user/group www-Data.

chown -R www-data:www-data /var/www/nextcloud/
chmod -R 755 /var/www/nextcloud/

the same with the data folder
chown -R www-data:www-data [path to data]
chmod -R 755 [path to data]

1 Like

Did the first two steps. No problem there.

I’m not sure what the path to data is. I have two folders named data.

Reading this now.

The data path is set during the setup in your browser.

1 Like

In case of the Nextcloud snap package, really no manual setup step should be required? /var/lib/cloud/data sounds like it is the data dir, but it should have correct permissions already.

Nextcloud snap docs:

  1. Install
  2. Done :wink:
1 Like

So if I’m still unable to get to my site after doing the snap install, what went wrong?

I’m still getting 403 after doing these with the path mentioned above.

chown -R www-data:www-data [path to data]
chmod -R 755 [path to data]

sudo -u www-data php /path/to/nextcloud/occ files:scan --all
Gives me:
Could not open input file: /path/to/nextcloud/occ

This forum software is amazing.

Just discovered something.
When I go to localhost I get an Apache PHP page instead of the NextCloud login page I see in the tutorial. So it looks like something went wrong there.

Still, when I go to localhost/nextcloud, I get the forbidden page.

I don’t have snap- install, but it is important to know the differences for understanding the documentation for non-snaps.
So the occ- command is named nextcloud.occ, and if you already have an Apache server running, nextcloud may be available at nextcloud.local, not localhost.
But it may be better to deactivate your Apache first and than start the snap.

Or you set up a non-snap- installation as described in the docs if your server is already running Apache and mysql. For good performance on small systems, this should be the better way.
Are you completely stuck to ubuntu? I do have OpeneSuse Basic Apache described and setting up Nextcloud on it should be easy…

1 Like

I started from scratch with the Snap install and it worked perfectly.

I must have screwed up the snap installation.

Thanks guys!