Installing ownCloud 8.1 on a Raspberry Pi

Finally I'm at the end. These are the tings I have done before I now can start installing ownCloud on my Raspberry Pi.

  1. Change default users on Raspberry Pi
  2. Mount ext4 USB flash drive to Raspberry Pi
The current version of ownCloud is 8.2.2 and this version would be better, cause it has full PHP7 support. But I will now install 8.1, cause there are some problems with 8.2.2 and the calendar app does not support PHP7 at the moment. But ownCloud 9 will come soon in 2016. The last time I have installed ownCloud is a while ago and so I will start with Manual Installation on Linux.


Let's install the requirements MySQL, PHP and Apache2.

sudo apt-get update
sudo apt-get install mysql-server php5 apache2 libapache2-mod-php5 php5-gd php5-json php5-mysql php5-curl php5-intl php5-mcrypt php5-imagick

Download ownCloud

Now we can download ownCloud from the Download Page and extract it. Please do not forget to verify the MD5 or SHA256 sum.

tar -xjf owncloud-8.1.5.tar.bz2

After that we will move the owncloud directory to your USB flash drive.

mv owncloud /media/gordon/sandisk/.

Configure Apache2

First we need to edit the file /etc/apache2/sites-available/000-default.conf like this.

<VirtualHost *:80>
	ServerName raspberrypi

	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html

	<Directory /var/www/html>
  	  Options +FollowSymlinks
  	  AllowOverride All

 	  <IfModule mod_dav.c>
  	    Dav off

 	  SetEnv HOME /var/www/html
 	  SetEnv HTTP_HOME /var/www/html


	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

Now we will link /var/www/html to /media/gordon/sandisk/owncloud and restart apache.

sudo ln -s /media/gordon/sandisk/owncloud /var/www/html
sudo service apache2 restart

After that we just have to make sure that /media/gordon/sandisk/owncloud is readable for www-data and we can visit http://raspberrypi in our browser to install ownCloud.

Next Previous