Setup Nextcloud – Ubuntu

Many of the developers at Owncloud left the project in favor of forking a new file share and sync service. So there is no reason why Nextcloud should fail, I’ve followed Nextcloud since their blog post in may and I have been very excited about the project.
The developers at Nextcloud are doing their best to give the users a more secure platform, fewer bugs and overall a better product! They even made Enterprise-features opensource! They haven’t released repositories like Owncloud have and I was talking with some of the guys on their IRC channel about it and everyone seemed happy about it because it was a pain in the ass to maintain and I often caused more trouble than expected for the users. So I don’t think we will see something like this in the near future but that shouldn’t stop you!

I can see there is a lot of the visitors at the site there is searching for “debian packages nextcloud”, “debian nextcloud”, “apt nextcloud package” and so on. And let me say this, there is no repositories or easy to install .deb files and ect. for nextcloud, but that shouldn’t be you brick wall! this is a easy and straight forward process there doesn’t take too long and it is easy to maintain and upgrade and should be a lot more bug free than Owncloud’s repositories.

Step 1. Setup LAMP

Ubuntu have a complete LAMP package in their repository so we don’t have to install
everything manually, yeah lucky us and applause to Ubuntu’s dev team.
So run the command and everything will be installed automatically, the only thing you will have to do is give Mysql a password when prompted for it.

Nextcloud need a couple of php-modules to function, so go ahead and install them and activate a2enmod-rewrite

It is recommended by nextcloud to use MariaDB there is a fork of Mysql to get the best performance so let’s install that

Step 2. Download & Configure Nextcloud

We have a fully functional LAMP server now and we only need to setup a database for Nextcloud and then download and configure Nextcloud.

We are going to download nextcloud, make sure you get the lates release

extract the tar ball and moove it to Apache’s web root.

Then we will give the files in /var/www/nextcloud the right permissions.
copy the content below and make a file called with vim /tmp/nextcloud_permissions and feel free to use your favorite text editor.

This is actually a script provided by Owncloud but is also working with Nextcloud because Nextcloud is a for off Owncloud.
Give the file permission to be executed with sudo chmod +x and run tile script.

Configure Apache

it will look something like This

add the changes in the configuration file below to you configuration file or just copy it.

Restart Apache

Configure MariaDB

The last thing we will need before the setup in the browser is to create a database and a database user, run each line separate and don’t forget to change tha nextcloud-password

and that is basically it! open up your browser and enter your IP/FQDN in the address field. you will see something like this.
Enter the credentials for your new admin user and insert the databseuser/password and database name that we created earlier!.


When you have finished the setup you will see a page like this, and I actually don’t think there is more to say about that other than enjoy you new nextcloud instanse! it os only waiting for being used by you and your users! if you have any questions feel free to ask.