0% found this document useful (0 votes)
38 views38 pages

Install Owncloud 10 On Raspberry Pi 3 With Raspbian Stretch Installed

This document provides instructions for installing ownCloud 10 on a Raspberry Pi 3 running Raspbian Stretch. It involves updating the system, installing LAMP server, downloading additional dependencies, downloading and extracting the ownCloud files, and configuring ownCloud via the web browser. An external hard drive is also mounted for additional storage capacity and ownCloud is configured to allow secure access over the web.

Uploaded by

Maria Mensor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views38 pages

Install Owncloud 10 On Raspberry Pi 3 With Raspbian Stretch Installed

This document provides instructions for installing ownCloud 10 on a Raspberry Pi 3 running Raspbian Stretch. It involves updating the system, installing LAMP server, downloading additional dependencies, downloading and extracting the ownCloud files, and configuring ownCloud via the web browser. An external hard drive is also mounted for additional storage capacity and ownCloud is configured to allow secure access over the web.

Uploaded by

Maria Mensor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed

NOT ON YOUTUBE FAQ OFFICE 365 MICROSOFT OFFICE FORUM

 HOME TECH TIPS MAC OS X LINUX VIRTUALIZATION WINDOWS WINDOWS SERVER RASPBERRY PI WORDPRESS

Install ownCloud 10 on Raspberry PI 3 with Raspbian Search the site 

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

tutorial I’ll be downloading and installing the following software / packages we


will be using to setup ownCloud 10:

Steps to install ownCloud 10 on the Raspberry pi with Raspbian Stretch:


Install OwnCloud 9 on
Raspberry Pi 3 …
Update Raspberry pi System June 12, 2016 • 30 Comments
Install LAMP Server
Install ownCloud dependencies
Install Owncloud 10 How to Restore Windows
Photo Viewer Windows …
Mount an External Hard drive for larger storage capacity
September 7, 2015 • 29 Comments
Enable SSL for secure access
Owncloud configuration via web browser
Turn Your Raspberry Pi 3
If you don’t have a Raspberry PI I would personally recommend buying the into a …
June 18, 2016 • 22 Comments
Raspberry pi-3 kit with a 32 GB Micro SD card so that you don’t have to mount
an external drive. unless you want to store more than 32GB of data.
Solved: Setup was unable to
Video Tutorial: create a …
July 27, 2016 • 20 Comments

Reset Windows 7 Login


Password Without Third …
December 19, 2016 • 16 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

b. Change user password


“For Security when accessing form the WAN”

c. Change locale to en_US.UTF8


Select “Localisation Options” –> “Change Locale”

d. Memory split, allocate 16M to video graphics


Select “Advanced Options” –> “Memory Split”

e. Overclock to Modest or Medium


Select “Overclock” (if available)

Then Finish, and auto reboot. Upon re-boot you would need to update the RPI
and its packages.

Update the Raspberry Pi and its packages

sudo su 

apt update && apt upgrade 

Now we need to install and configure LAMP Server.

Install LAMP Server


Open Terminal or simply ssh to the Raspberry pi.

Install Apache web server


apt install apache2 -y 


https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 4/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed

Start and enable Apache on boot

systemctl start apache2 

systemctl enable apache2

Install the required packages:

We need to install additional packages required by Owncloud Server

apt install -y apache2 mariadb-server libapache2-mod-php7.0 


\
php7.0-gd php7.0-json php7.0-mysql php7.0-curl \
php7.0-intl php7.0-mcrypt php-imagick \
php7.0-zip php7.0-xml php7.0-mbstring

Install Owncloud:

Download Owncloud 10 package:

cd /tmp 

wget https://download.owncloud.org/community/owncloud-10.0.10.tar

Extract Owncloud and change the permission

tar -xvf owncloud-10.0.10.tar.bz2 

chown -R www-data:www-data owncloud

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

How to Install ownCloud 10 on Raspberry PI 3 with Raspbia…


Raspbia…

Setting up Raspberry Pi for Owncloud 10 Server


1. Turn on the Raspberry Pi. From the terminal or SSH enter the following
command:

sudo raspi-config 

The following changes needs to be made in the Raspberry Pi configuration

a. Expand the root filesystem to have enough space for the cloud
Select “Advanced Options” –> “Expand Filesystem” (if available)

SanDisk 32GB Mobile SanDisk 8GB microSD High


MicroSDHC Class 4 Flash Capacity (microSDHC) Card -

$6.68 $8.59 $6.70

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/ 

Exit /tmp directory.

cd 

Configure Apache Web Server

Create a new configuration file under /etc/apache2/sites-available

sudo nano /etc/apache2/sites-available/owncloud.conf 

And then paste these lines and save it

Alias /owncloud "/var/www/html/owncloud/" 

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

<IfModule mod_dav.c>
Dav off
</IfModule>

SetEnv HOME /var/www/html/owncloud


SetEnv HTTP_HOME /var/www/html/owncloud

</Directory>

Create Symbolic link



sudo su 

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

Additional apache configuration

Execute these commands to enable some modules

a2enmod headers 
systemctl restart apache2
a2enmod env
a2enmod dir
a2enmod mime

Create a MySQL database and user:

mysql -u root -p 

You’ll be prompted to enter the Pi User password. Then execute the underneath
commands in blue:

MariaDB [(none)]> create database owncloud; 


Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> create user owncloud@localhost identified by


Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> grant all privileges on owncloud.* to ownclou


Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;


Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit;
Bye
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 7/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed

Configure Owncloud via web browser

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

Here enter a username and password to create an admin account then


immediately underneath enter your MySQL details as follow:

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.

Mounting and Setting up an external hard drive


These instructions are for mounting an NTFS formatted hard drive and allowing
ownCloud to store files onto it. Now would be a good time to plug in the external
Hard Drive to the RPI.

1. Having an NTFS drive we will need to install a NFTS package by entering the
following:

sudo apt-get install ntfs-3g -y 

2. Make a directory we can mount to:

sudo mkdir /media/ownclouddrive 

3. Create and add the www-data user to the www-data group:

sudo groupadd www-data 


sudo usermod -a -G www-data www-data 

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:

sudo chown -R www-data:www-data /media/ownclouddrive 


sudo chmod -R 775 /media/ownclouddrive

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 

6. Now to get the uid enter the following command:

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.

sudo nano /etc/fstab 

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

11. Reboot the Raspberry Pi:

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

The txt file you created should be there.

Basic First Access Setup

1. Open your browser and enter the IP address provided, in my case is


192.168.1.140/owncloud you’ll be directed to your ownCloud storage server.

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).

4. Immediately underneath enter your MySQL details as follow:

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

Or Google what is my IP address?

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:

sudo nano /var/www/html/owncloud/config/config.php 


https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 15/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed
sudo nano /var/www/html/owncloud/config/config.php

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:

'overwrite.cli.url' => 'https://xxx.xxx.xxx.xxx/owncloud', 

Here is an example of the completed config.txt file.

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

Once done save and exit the the config.php.

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

About The Author

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

hi ! i’m a beginner in raspberry and i’ve got a probleme at this step:


MariaDB [(none)]> create user owncloud@localhost identified by ‘12345’;
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MariaDB server version for the right
syntax to use near ‘‘12345’’ at line 1
and i don’t know how to solve this :/
Thanks for this tutorial!
Reply

Author
Miguel

Manually enter the command in blue in stead of copying


and pasting
Reply

Sadekur Rahman

Hi.. I need ur help


I can’t setup ssl
Plzz help me
Reply

Author
Miguel

where are you stuck? 


Reply

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

Apache2 server r not restarting


Can u send me mail
[email protected]
Plzz
Reply

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

yes. when you decide to use an external Drive, you would


need to go through the mounting a directory process and
change the path. run this command in the terminal:
sudo nano /var/www/html/owncloud/config/config.php
or
sudo nano /var/www/owncloud/config/config.php
and change the datadirectory to /media/owncloud
then move your owncloud data:
sudo mv /var/www/html/owncloud/data /media/owncloud
or
sudo mv /var/www/owncloud/data /media/owncloud
then restart
sudo service apache2 restart
or
sudo apache2 restart
Reply

Sadekur Rahman

Hi Miguel..i’m a beginner in raspberry. Please help me have got a


problemes. how to fix this step:Transactional file locking should be

configured to use memory-based locking, not the default slow
database-based locking

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

Hi Kieran, yes, is possible to keep the USB stick and add


the (yet to be bought) HDD as well.
yes, you would need to run the whole mounting a directory
process then add the NEW UUID number to fstab. just
add the same line immediately underneath with the new
one.
if you are planning on using the new HDD for owncloud
data then you would need to move the owncloud files to
the new directory once mounted.
sudo nano /var/www/html/owncloud/config/config.php
or
sudo nano /var/www/owncloud/config/config.php
and change the datadirectory to /new/directory
then move your owncloud data:
sudo mv /var/www/html/owncloud/data /new/directory
or
sudo mv /var/www/owncloud/data /new/directory
/new/directory being the HDD directory you mounted
then restart
sudo service apache2 restart
or
sudo apache2 restart
Reply

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

Hi Miguel.. Plzz reply


Plzz help me
Reply

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

did you set up the password to be yes or 12345 as


specified in the video?
Reply

David

I changed the pass in the two code lines.


How can i view the database created?
Reply

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

I removed the database and create a new


one. Creating the new database without any
problem, but when i went to create the user
with the following command “”create user
owncloud@localhost identified by ‘12345’;””,
the program returned an error.
I think that i will do all the steps again using
an external HHD.
I wil post if a do it properly.
Reply

David

I did it again, and it works.

Luiz Gustavo Gregorio

Hi, need some help here,


I understand that I must allow my WAN IP address to access
owncloud from anywhere in the world, however from time to time
when I reboot my modem and router I get a different IP Address.
Is there any other way to access it, or should I change
configuration everytime this happens?
Reply

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

You would need to tell the router to reserve an IP for the


RPI. “DHCP reservation”
example: https://www.youtube.com/watch?
v=2pS0Pz0EcLA
Reply

Luiz Gustavo Gregorio

Hi Miguel, sorry but I think I was not clear enough, I


am talking about the IP provided by my ISP, if there
is a modem reboot my ISP sometimes provide a
different value for IP.
Is there any easy way to work on that not having to
change it on owncloud configuration everytime?
Reply

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

for the owncloud config file.


Cheers
Benjamin
Reply

Benjamin Berghaus

Quick solution: yes, you can simply put


domain names in the config file. There
was one difficulty I had to fix: following
your guide, the SSL portion of Apache
did not start. I had to install / get this
going separately for an HTTPS
OwnCloud solution. Not to complain,
just to help, Thanks, Miguel!

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

1. under install owncloud exit the /tmp directory. cd


command
2. before you configure apache web server enter sudo su
and continue on.
Reply

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

But seconds later that wont load, and 192.168.1.100 takes me to


octopi print server
octopi uses /etc/haproxy/haproxy.cfg
but owncloud is using /etc/apache2/sites-available/owncloud.conf
Correct?
I dont know how to resolve this conflict. im a linux n00b.
Ive been talking on the octopi forum, but they’re not familiar with
owncloud.
https://discourse.octoprint.org/t/owncloud-on-octopi/2401
Hope you have time to help
Thanks
Reply

Author
Miguel

Hi sky, so to make sure you enter:


http://192.168.1.100/owncloud it works fine but after few
seconds the same http://192.168.1.100/owncloud takes
you to octopi print server correct?
Reply

Sky

if i reboot the pi http://192.168.1.100/owncloud will


load, but after a very short time after startup
http://192.168.1.243/owncloud/ will return not
found. 

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

Then 192.168.1.100 (no forward slash) will go to


the landing page for octopi, which seems fine for a
while.
But a little while after that the formatting @
192.168.1.100 gets broken
Ideally i would like to have
192.168.1.100/octopi
192.168.1.100 /owncloud
Reply

Author
Miguel

is going to return not foun becaused these


are 2 different IP addresses
“http://192.168.1.100/owncloud will load, but
after a very short time after startup
http://192.168.1.243/owncloud/ will return not
found.”
Reply

Sky

That was just a typo.


I got it working but what i did was
probably unconventional, and still
hoping for a proper solution.
I edited /etc/apache ports.conf to list to 
100 (not 80)
So now if i got to 192.168.1.100 octopi
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 32/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed

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

The OctoPi forum gave me this link which has


haproxy & apache configuration examples, but its
WAYY beyond my understanding. I suspect you will
know what it means
https://discourse.octoprint.org/t/reverse-proxy-
configuration-examples/1107
Reply

Sky

Not sure if you received my other reply so will type


again.
SHORTLY after rebooting pi
http://192.168.1.100/owncloud loads
But then fails to load
http://192.168.1.100 (no forward slash) will then
load which is octoprint page.
I suspect the haproxy thing is overriding the apache 
thing.
Reply
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 33/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed

Author
Miguel

By following this tutorial you are never going


to get owncloud without “/owncloud” even if
you just have owncloud installed on the pi.
a quick easy fix is to install and enable SSl
which uses port 443
https://www.avoiderrors.com/?p=37213 and
access your pi using https:// and not http
Reply

Viki

Hi Miguel! An many thanks for the instructions. Seems to work


well. However, I got problems when setting up to owncloud admin
account and storage folder. Got an error message “Can’t create or
write into the data directory /media/ownclouddrive”. I’m using
Seagate’s USB storage and was able to see the files there when
typing sudo ls /media/ownclouddrive.
Any ideas what might be the problem?
Reply

Author
Miguel

sudo chown -R www-data:www-data 


/media/ownclouddrive
sudo chmod -R 775 /media/ownclouddrive
https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/ 34/38
24/08/2020 Install ownCloud 10 on Raspberry pi 3 with Raspbian Stretch Installed

Reply

spintox

Awesome, works perfectly – thx Miguel


Reply

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

Fixed it. I placed a Number zero in stead of the letter


Reply

samet

hi, great tutorial, thanks.


i stuck on “.ocdata” file. it says file missing. i tried to re-permission 
using “sudo chown -R www-data:www-data

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

/media/ownclouddrive” and “sudo chmod -R 775


/media/ownclouddrive” but no result. am i missing something?
Reply

Author
Miguel

Hi you have commented in 2 different tutorials. Which one


do you need help? Raspbian or Dietpie?
Reply

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

AvoidErrors Copyright © 2020. Powered by Cloudways | Privacy

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

You might also like