Install Owncloud 10 On Raspberry Pi 3 With Raspbian Stretch Installed
Install Owncloud 10 On Raspberry Pi 3 With Raspbian Stretch Installed
HOME TECH TIPS MAC OS X LINUX VIRTUALIZATION WINDOWS WINDOWS SERVER RASPBERRY PI WORDPRESS
Stretch Installed
1.9k Share Tweet Share Share
Newsletter
Shares Get weekly Video Tutorials tips and trends
via email!
Our goal is to install ownCloud 10 on the Raspberry pi with Raspbian Stretch
Email
installed. We are not just installing ownCloud but also mounting an external
drive for lager capacity of data storage and to be able to access it from
anywhere in the world with internet access. Join Now
This tutorial assumes that you have a fully functional Raspberry pi-2 or 3 100% Privacy. We don't spam.
with Raspbian installed and a 8 GB Micro SD card Minimum!. If you haven’t
installed Raspbian then check out my guide on how to install Raspbian via
Popular Posts
NOOBS.
Install ownCloud 10 on Raspberry PI
3…
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 1/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
There are many ways to install ownCloud onto a Raspberry Pi. This particular October 6, 2017 • 44 Comments
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 2/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Ads by Amazon
Then Finish, and auto reboot. Upon re-boot you would need to update the RPI
and its packages.
sudo su
Install Owncloud:
cd /tmp
wget https://download.owncloud.org/community/owncloud-10.0.10.tar
It will produce a new directory called owncloud. We need to move this directory
to /var/www/html/ directory
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 5/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
sudo raspi-config
a. Expand the root filesystem to have enough space for the cloud
Select “Advanced Options” –> “Expand Filesystem” (if available)
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 3/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
mv owncloud /var/www/html/
cd
<Directory /var/www/html/owncloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 6/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
ln -s /etc/apache2/sites-available/owncloud.conf /etc/apache2/s
a2enmod headers
systemctl restart apache2
a2enmod env
a2enmod dir
a2enmod mime
mysql -u root -p
You’ll be prompted to enter the Pi User password. Then execute the underneath
commands in blue:
If you’re mounting and external hard drive for additional storage capacity skip
this step and continue to Mounting and Setting up an external hard drive
underneath.
If you are NOT mounting and external hard drive proceed to open the web
browser and type the following address:
http://192.168.1.140/owncloud
Change the IP address in blue to your Raspberry pi IP address. You will see the
following Owncloud configuration window:
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 8/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Username: owncloud
Password: 12345
Database: owncloud
Server: localhost
Click on ‘Finish Setup’ button. That’s it. We’re good to go. Owncloud 10
installed on Raspbian Stretch is now ready for use.
1. Having an NTFS drive we will need to install a NFTS package by entering the
following:
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 9/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
4. Make the user www-data owner of the mounted drive and make its
permissions read, write and execute:
5. Now we need to get the gid, uid and the uuid as we will need to use them so
the pi will remember it even if we plug it into a different USB port. Enter the
following command for the gid:
id -g www-data
id -u www-data
7. Also we meed to get the UUID of the attached external hard drive so the Pi
can remember this drive even if you plug it into a different USB port.
ls -l /dev/disk/by-uuid
8. Then copy the light blue letters and numbers of the sda1 entry usually
located on the bottom. Should look something like (numbers&letters ->
../../sda1). See picture below:
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 10/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
9. Now add your drive into the fstab file so it’ll boot with the proper permissions.
10. Add the following line to the bottom of the file, updating uid, guid and the
UUID with the values we got above. (It should all be a single line). Dont forget to
replace the UUID number to yours in stead of the one you copied from here.
UUID=F6941E59941E1D25 /media/ownclouddrive auto nofail,uid=33,g
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 11/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
sudo reboot
12. Now the drives should automatically be mounted. If mounted we’re all good
to go. To check it enter:
sudo ls /media/ownclouddrive
If there are files inside the drive you should be able to see them here. If it’s an
empty drive you might not see anything so don’t be surprise if nothing shows up.
If you want to be absolutely positive that the drive is properly mounted, unplug
the drive from the RPI plug it onto a PC since the drive is formatted “NTFS” it
should be easily detected by the PC, open it, create an txt file name it test, then
eject it and plug it back to the RPI and run the following command:
sudo ls /media/ownclouddrive
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 12/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
2. You should be presented with a simple setup screen, Here enter a username
and password to create an admin account.
3. Click on Storage & database dropdown and enter your external hard drive
directory: /media/ownclouddrive (Skip this if you didn’t setup an external
drive).
Username: owncloud
Password: 12345
Database: owncloud
Server: localhost
5. Click on ‘Finish Setup’ button. That’s it. We’re good to go. Owncloud 10
installed on Raspbian Stretch is now ready for use.
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 13/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Done! !! all is left is to configure your devices to access your ownCloud storage.
External Access
To allow devices like your phone or tablet to access your cloud from anywhere
in the world with internet access you must enable SSL then enable port
forward:
Port Forward
Log into your router and get the WAN IP address:
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 14/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Now we need to add the WAN IP to your trusted IP list and not to be overwritten
by ownCloud. To do this open the Owncloud config file, enter:
Here add the WAN IP (External IP address) you just got from the router or
Google to the trusted domains array. Your new entry should look something like
this:
1 => 'xxx.xxx.xxx.xxx',
X are just placeholders. Replace the X’s with the WAN IP Address.
Now update the URL of the overwrite.cli.url line with your WAN IP Address. It
should look something like this:
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 16/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Now log into your router and navigate to the port forward section.
Port forward SSL port 443 to the Raspberry pi internal IP (LAN IP) address and
save settings.
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 17/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Now your RPI ownCloud is ready to be accessed externally (WAN) and from
your devices just download the ownCloud App and enter: “https:// WAN IP
Address” on the address bar or devices. below is an example:
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 18/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
1.9k
Shares
Miguel
I started this tech blog back in 2011 as a place to write down
processes I took to fix my client systems and network. Now I write
some tips and tricks to help others with the tech issues that one
might encounter.
Latest Comments
Tim
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 19/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Author
Miguel
Sadekur Rahman
Author
Miguel
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 20/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Sadekur Rahman
Chip
Miguel, Thank you for the easy setup. I do have one question.
Can you add external storage after install.
Reply
Author
Miguel
yes
Reply
Chip R
Hello Miguel,
Thnaks you for the very easy setup video. I do have one question.
Can you configure /add an external drive if you have setup to use
internal storage?
Thanks!
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 21/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Chip
Reply
Author
Miguel
Sadekur Rahman
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 22/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
And
You are accessing this site via HTTP. We strongly suggest you
configure your server to require using HTTPS instead as
described in our security tips.
And
How can I acces anywhere in the world with internet access..
Thanks for those tutorial
Reply
Kieran
Hello Miguel,
Thank you very much for a wonderful tutorial, and accompanying
video (with a very calm and level delivery!)
I am totally indebted to you for the fact that, with your help, I have
owncloud running beautifully on my Raspberry Pi 3, but I have
one last question.
I set everything up with a small USB stick, that I had laying
around, and all is good, I want to purchase a powered external
hard-drive but wanted to know if is possible to keep the USB stick
and add the (yet to be bought) HDD as well?
would I need to run the whole mounting a directory process then
add the UUID number to fstab? or will this be problematic… and
would it be best to simply remove the USB stick and start again
with the (new) HHD?
Many thanks mate, you’re the best.
Reply
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 23/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Author
Miguel
Sadekur Rahman
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 24/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
David
I followed all the steps, put an pendrive for more storage and I
recive this when i try to create de admin acount
Error while trying to create admin user:
Failed to connect to the database: An exception ocurred in driver:
SQLSTATE[HYT000][1045]Acces denied for user
‘owncloud’@’localhost’ (using password:YES)
Reply
Author
Miguel
David
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 25/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
David
David
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 26/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Author
Miguel
Benjamin Berghaus
Hi Miguel
Hi Luiz
First: thanks for this great tutorial, Miguel! I
just wanted to second Luiz’ question – I
wondered how to do this, too. Setting up a
dynamic DNS solution at afraid.org is rather
simple, but I wonder whether simply adding
the dynamic dns address
(myaddress.mooo.com) would be sufficient
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 27/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Benjamin Berghaus
Author
Miguel
thanks
Leukos
Hi Miguel,
Nice tutorial by the way,
If we want create multiple users, how do we process ?
create an other user in the mysql database ?
Reply
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 28/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Author
Miguel
no. once you log into owncloud top right corner dropdown
select add users and create one
Reply
Pat
Hi Miguel,
when i try to access my owncloud site the following message
pops up:
‘http://……./owncloudException occurred while logging exception:
Cannot modify header information – headers already sent by
(output started at /var/www/html/owncloud/config/config.php:1)
#0 [internal function]: OC\Session\Internal->trapError(2, ‘Cannot
modify h…’, ‘/var/www/html/o…’, 106, Array)
#1 /var/www/html/owncloud/lib/private/legacy/response.php(106):
header(‘HTTP/1.1 500 In…’)
#2 /var/www/html/owncloud/lib/base.php(437):
OC_Response::setStatus(‘500 Internal Se…’)
#3 /var/www/html/owncloud/lib/base.php(581): OC::initSession()
#4 /var/www/html/owncloud/lib/base.php(1013): OC::init()
#5 /var/www/html/owncloud/index.php(54):
require_once(‘/var/www/html/o…’)
#6 {main}
Problem went out like this:
I have done your tutorial step by step, everything was fine and
working. Then I realized that I have used the sd card Id from the
raspberry and not the hdd. So I have tried to change the directory
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 29/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
and then I got a message file is missing. I copied all the new files
from the sd card to the HDD and this message came and I wasn’t
able to access the owncloud site again
Can you please help me with this? Can I somehow delete all files
and start over again or reset the all settings of owncloud and
MySQL?
Kind regards
Pat
Reply
Author
Miguel
Sky
Hey Miguel,
Great guide!!
Everything went well except im trying to do something a bit
deffernt and need your HELP.
Im running octopi, which is a raspbian based print server for my
3d printer. http://www.octoprint.org
I want to also run ownCloud on this same Pi.
after rebooting the pi i can breifly get to 192.168.1.100/owncloud
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 30/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Author
Miguel
Sky
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 31/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Author
Miguel
Sky
loads
if i got to 192.168.1.100:100/owncloud
ownCloud loads (by specifying port:100)
While this works fine locally. i imagine it
may be problematic if i want to access
remotely over SSL…?
Sky
Sky
Author
Miguel
Viki
Author
Miguel
Reply
spintox
Phil
Hey Miguel, first things first: … basically thanks for my own cloud
«IP-Adress»/0wncloud
didn’t work for me with firefox, probably a typo in your tutorial,
«IP-Adress»/owncloud did the trick
Reply
Author
Miguel
samet
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 35/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Author
Miguel
Aaron Moore
Hey Miguel
Excellent tutorial, but I must admit it took me a couple of
attempts……. Just have to follow every step to the letter!
Thanks for my RPi server
Aaron
Reply
Leave a Reply
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 36/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
Comment
Comment Text*
Name*
Email*
Post Comment
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 37/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 38/38