Parallel OSMC and ownCloud on Raspberry pi 3

Hello, i just got the new raspberry pi 3 and i want to use it as media center and owncloud storage.
I read some topics about this but did not saw the instruction how to do it.

What do you install and configure first whats the correct order to use both of them in parallel.

Thank you!

Well you might first want to read the FAQ and Wiki which would have made you understand that OSMC is an operating system (based on Debian). Therefore obviously you first install OSMC which then you can use to install owncloud on. Owncloud is an webbased application which would require an Webserver (either Apache or nginx). You basically can follow any tutorial for installation of owncloud on raspberry or Debian Jessie.

I have installed OwnCloud on RPI 2B. It was very easy using instructions from OwnCloud site. The packet you install is then very easy to update using standard apt-update.

I have installed Nextcloud (a new fork of owncloud) using the guide here: Simple Nextcloud Installation on Raspberry Pi | Unix etc. and I can access it fine from within my own LAN.

But I run into problems when I try to secure it - ie. setup HTTPS and use a dynamic domain to access it from the internet. Any guide I find ends up having something incompatible with OSMC (a config file will be missing or somewhere else, certain configs don’t work, etc.)

Does anyone have an idiot’s guide to hardening/securing Nextcloud on OSMC?

OK, I’ve now got HTTPS working thanks to this guide: How To Create a SSL Certificate on Apache for Ubuntu 14.04 | DigitalOcean and now the Android app works (it needs https, it seems).

Also had to add my web address to /var/www/html/nextcloud/config/config.php:
‘trusted_domains’ =>
array (
0 => ‘’,
1 => ‘’,

Now I just need to figure out how to force it to redirect all http to https…

In /etc/apache2/sites-enabled/default

 <VirtualHost *:80>
     Redirect /
 <VirtualHost *:443>
         DocumentRoot /var/www/
         SSLEngine on
         SSLCertificateFile /etc/apache2/server.crt
         SSLCertificateKeyFile /etc/apache2/server.key

There might be more you want to add under the virtualhost *:443, but thats up to you, this should make it work.

OK, that did it. I edited /etc/apache2/sites-enabled/default-ssl.conf and the Virtualhost *:443 part was already there (from a previous step in the above mentioned guide), I just had to add the Virtualhost *80 to that part.

I think I had added that (or something similar) to 000-default.conf, but now that it’s in the right file it’s forcing everything to https.

Great! Thanks JS.