Home Wiki > SDB:Nextcloud
Sign up | Login

SDB:Nextcloud

tagline: From openSUSE


Tested on openSUSE Recommended articles Related articles
Icon-checked.png

Icon-manual.png Icon-help.png
This article describes how to install Nextcloud on openSUSE. If you want the full package, you can buy a Nextcloud Box and add your Raspberry Pi 2.

Situation

Nextcloud!

Today computer work is not limited to a single machine any more. People have the urgent need to share their data over various computers, ie. desktop computers, laptops, mobile phones and such. For that a so called cloud-solution is very helpful.

Many people use tools or sites like Dropbox, OneDrive, Google Drive, Facebook, twitter etcetera. These solutions however are not good for your privacy and you lose control over your own data.

openSUSE believes it is important to protect your privacy and security and the solution for that is Free software. Something which protects both your content and is trust-worthy (source is available and can be modified).

Nextcloud is the next generation Enterprise File Sync & Share that was started by ownCloud inventor Frank Karlitschek to empower users to take back control over their data and communication. It runs on your computer, in your home network or on your web space with minimal requirements. First and foremost it allows you to store files on it and access it from everywhere you have access to the web. It is compatible with most platforms (Win/Mac/Linux/most mobile phones) without requiring you to install anything.

But there are more features: Nextcloud provides you with a media player, calendaring and contact management and with a desktop client you can automate your file backups.

If you want to test Nextcloud, you can check the demo instance at Nextcloud Demo Page


Nextcloud Server Setup

There are several options to easily set up and integrate Nextcloud with openSUSE distributions.

Install the Nextcloud package

The easiest option is to install Nextcloud package from obs repositories. There are packages available for openSUSE Leap 42.1, 42.2 and Tumbleweed (we recommend openSUSE Leap 42.1). You should be an administrator, so you can install Nextloud on your server.

1. Install Nextcloud (be careful you have to install LAMP first and change permissions of the files. Full install is described next).

zypper install nextcloud

2. Open http://serverIP/nextcloud to install your instance (admin user account). Be careful to create another folder with the proper permissions for your data (described next).

3. Login and use Nextloud.


Install from Source

First of all, let's install the required and recommended modules for a typical Nextcloud installation, using Apache and MariaDB.

zypper in apache2 mariadb apache2-mod_php7 php7-gd php7-json php7-fpm php7-mysql php7-curl php7-intl php7-mcrypt php7-zip php7-mbstring php7-zlib php7-openssl php7-fileinfo php7-pcntl php7-posix

Create Database (optional since it'll create eveything automatically)
Next step, create a database. First of all start the service.

systemctl start mysql.service
systemctl enable mysql.service

The root password is empty by default. That means that you can press enter and you can use your root user. That's not safe at all. So you can set a password using the command:

mysqladmin -u root password newpass

Where newpass is the password you want.

Now you set the root password, create the database.

mysql -u root -p

you'll be asked for your root password

CREATE DATABASE nextcloudb;
GRANT ALL ON nextcloudb.* TO ncuser@localhost IDENTIFIED BY 'dbpass';

Database user: ncuser Database name: nextcloudb Database user password: dbpass

You can change the above information accordingly.


PHP changes

Now you should edit the php.ini file.

nano /etc/php7/apache2/php.ini

change the values

post_max_size = 50G
upload_max_filesize = 25G
max_file_uploads = 200
max_input_time = 3600
max_execution_time = 3600
session.gc_maxlifetime = 3600
memory_limit = 512M

Apache Configuration

You should enable some modules. Some might be already enabled.

a2enmod php7
a2enmod rewrite
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime

Now start the apache service.

systemctl start apache2.service
systemctl enable apache2.service


Install Nextcloud

Before the installation, create the data folder and give the right permissions (preferably outside the server directory for security reasons). I created a directory in the /mnt directory. You can mount a USB disk, add it to fstab and save your data there. The commands are:

mkdir /mnt/nextcloud_data
chmod -R 0770 /mnt/nextcloud_data
chown wwwrun /mnt/nextcloud_data

Now download Nextcloud (find the latest version at install web page). Then unzip and move the folder to the server directory.

wget https://download.nextcloud.com/server/releases/nextcloud-12.0.4.zip
unzip nextcloud-12.0.4.zip
cp -r netcloud /srv/www/
chown -R wwwrun /srv/www/htdocs/nextcloud/

Make sure that everything is OK and then delete the folder nextcloud and nextcloud-12.0.4.zip from the root (user) directory.

Now open your browser to the server IP/nextcloud
Set your administrator username and password.
Your data directory is: /mnt/nextcloud_data
Regarding database, use the following.
Database user: ncuser
Database name: nextcloudb
Database user password: dbpass

Wait until it ends the installation.

For more information, please refer to Nextcloud documentation page.


Nextcloud Client Setup

Nextcloud has clients for all operating systems, ditributions and mobile-tablets. You can find everything at installation page.

Desktop Environment Intergration

GNOME

1. Insert your server address, username and password at online accounts (usermenu).

2. Open Nautilus and connect to server by clicking on the bookmark on the left panel.

Alternatevly, you can install Nautilus extension.

zypper in nautilus-extension-nextcloud nextcloud-client

KDE Plasma

A global accounts setting is coming in Plasma 5. In older versions of the KDE Plasma, you can access your files via WebDAV. For that, find the WebDAV link in the Nextloud Files app in the web interface by clicking the gear in the bottom-left:

Webdav1.png

You can then enter this address in the address bar in Dolphin (shortcut is CTRL-L, just like in web browsers. Clicking after the current location also gets you a text input field). Replace https with webdav and you can get to your files!

NOTE: KMail has 'external cloud storage' support, which includes WebDAV. Unfortunately, this does not work very well with Nextloud as it doesn't generate links which can be shared: the links will need your user credentials.

Alternatevly, you can install Dolphin extension.

zypper in nextcloud-client-dolphin nextcloud-client

Other desktops

If you have MATE

zypper in caja-extension-nextcloud nextcloud-client

If you have Cinnamon

zypper in nemo-extension-nextcloud nextcloud-client

Install Android App

You can install Nextcloud app from play store for free. Nextcloud works with DAVdroid. You can download it for free from F-Droid.

Install Apple App

You can install the application from iTunes.

Applications

Nextcloud ships with some basic applications installed. Nextcloud is community product, so there are many users who created some awesome applications for Nextloud. You can check the Application site (like appstore), and download the application matched with your Nextcloud version. Installation is pretty simple. Decompress the file and upload it in the apps folder. Finally, login and enable the application you just uploaded.

External links