Nextcloud Server Environment Setup

I am attempting an issue as a first-time contributor and am lost on how to properly set up the dev. environment. I use a VM for Ubuntu 20.04 and followed Development environment — Nextcloud latest Developer Manual latest documentation but ran into errors with no idea on how to remedy them, so any advice would be helpful.

Honestly, I am using a different dev environment. Thus, I do not know typical pitfalls of your dev environment setup.

Nevertheless, I am willing to help with the setup if I can. To help you, I however need more information on what you were doing and what the results are. What type of errors? Are there messages? Any clue what the problem is. What is working? What is not working?

On an M1 Macbook Air; used UTM to simulate a Ubuntu 20.04 OS; installed apache (apache2); chmod and cd into /var/www and cloned the repository. This is where the issues arise as I don’t have any experience with large open-source projects. Attempted “git submodule update --init” as it’s what the setup dictated but that failed due to there not being a repository. I believe I’m missing a key part as each issue arises from there not being that certain directory but I am not sure.

Thank you in advance for any help or resources.

So, your path that apache is publishing is /var/www?

What is located in /var/www after the git clone ... command? Have you successfully changed the folder to /var/www before trying to init the submodules?

BTW: You can add --filter blob:none to the git clone command to prevent too much data being downloaded.

So, within the /var/www directory, I cloned the rep; I think it’s easiest to just show an image so I attached a screenshot.

OK, most probably, your Ubuntu installation is using /var/www/html as the document root of the apache server. This is the default (not /var/www).

Next, you need to clone the server directly into the document root folder, typically. Just to be sure: There is no other page active on that machine, right? If there is, be careful to not remove existing data.

In your case , you will have to do

sudo chown entropy: -R /var/www/html
git clone --filter blob:none https://github.com/nextcloud/server.git /var/www/html
cd /var/www/html
git submodule update --init
mkdir data
sudo chown -R www-data: config data apps

That should install the basic server as described in the documentation.


You will have to clean up some other folders if this is working.

Okay, this has advanced my situation; thank you so much for the help. I may further reply to this post if I need further advisement if that’s fine.

Yes, you can write for sure.

It would be nice if you could mark the topic as solved once you are done with everything. (put a timed bookmark for yourself to remind yourself of it)

Okay, I will go ahead and mark it as solved. I did encounter another issue but I believe that’s covered in No database drivers (sqlite, mysql, or postgresql) installed - #3 by osrehe

1 Like

@Entropy_Time you can remove the folders /var/www/data and /var/www/server by calling

rm -rf /var/www/data /var/www/server

Then, there should be nothing in /var/www except for a folder html.

1 Like