ownCloud on octopi? (achieved)


I would like to run ownCloud & octopi simultaneously off one raspberryPi3b, possible?

OwnCloud is a suite of client-server software for creating file hosting services and using them. https://owncloud.org/

See second post for UPDATE:


Ive made some progress.
Ive followed this owncloud install tutorial:
Video: https://youtu.be/0U7NATfeTxg
Site steps: https://www.avoiderrors.com/owncloud-10-raspberry-pi-3-raspbian-stretch/

UPDATE: after installing owncloud & robooting pi, can only breifly get to
Shortly later that page stops loading, but can octopi loads,
but after a short while longer that page become broken formatting wise.

UPDATE 2: sometimes when refreshing the apache defult page appears. seems to be a fight over the landing page, but still cant get to


If it was a stock OctoPi install then haproxy was running and /etc/haproxy/haproxy.cfg was the config file. Configuring it to include owncloud should be straight forward.

If something else is running on port 80, then you need to configure that instead. It appears to be Apache and the default page might just be a simple html file which you could edit to redirect to octoprint instead (which is actually listening on port 5000).


Or take a look at the Apache examples here.


Thanks for the reply.
After i finished installing owncloud, and rebooted the Pi, goes to octopi, and i cant access the anymore

I will take a look at haproxy.cfg but more precise steps might be needed.


Im taking a look at this right now.
as b-morgan mentioned octopi has haproxy, so should i try configure this?
Or do i need to do something with apache?

For Apache (with mod_proxy and mod_headers enabled)
Are these enabled already?

basically i would like to have a /octopi & a /owncloud option to go to which ever server. Is this difficult?


I have no idea how owncloud works so I can't answer whether this is difficult. I can tell you though that it should be easy to get OctoPrint proxied through Apache, whereas I don't know if it will be easy to get OwnCloud proxied by haproxy (since I don't know if owncloud in that case is run through apache or not).

What you could also do is have OwnCloud's Apache listen on a different port (let's say 81 instead of 80) and then proxy THAT in haproxy.


Ok i will try this. is it just a case of modifying the Apache cfg?
if so, could you please tell me where that file lives :pray:

Also not sure how to enable mod_proxy and mod_headers?


Uhm... Good question. It's been a while since I last configured an Apache under Debian. /etc/apache2/httpd.conf? But I don't know. Better look at the OwnCloud docs.

Regarding enabling those modules, look at the a2enmod tool (I think that was its name). I suggest googling for Apache configuration under Debian, that should find you your answers.


Btw, before I forget: I'm not sure I would recommend installing OwnCloud on the same machine as OctoPrint. You run the risk of interrupting prints if your OwnCloud processes should happen to eat up too many system resources. Feel free to do it anyhow, but don't open tickets if you run into performance issues :wink:


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

Dav off

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

Do you think i could change something in this folder to acheive what im trying to do?


Ok got access to ownCloud working.
I edited /etc/haproxy/haproxy.cfg

option forwardfor except`

to read

option forwardfor except*

But i still have the problem that is being hijacked by the "Apache2 Debian Default Page" so cant get to octoprint


So i got both working.
I reverted /etc//haproxy haproxy.cfg back to default.
And changed the /etc/apache ports.conf to list to port 100
so now goes to octoprint as usual
and goes to owncloud.
kind of a dodgy work around...

im going to get a print going shortly and monitor the CPU/Ram loads while also using ownCloud

UPDATE: So i ran htop via putty, and paid close attention to the cpu and ram resources used by octoprint, they were pretty low.
So then i logged into ownCloud and uploaded a 500mb video via the web interface over wifi.
Resource use did increase a LOT, but printing didnt seem effected.
So seems like a success on a Pi3b.

If someone at a future date knows a more elegant solution than mine, please let me know. At some point i will probably want SSL remote access to ownCloud, not sure how my solution will hold up then, but locally is ok.


@SkynetPrints Now you almost got there. You should have haproxy installed, right?
Go to your file /etc/haproxy/haproxy.conf and adopt it there. First add another backend. Just copy one of the existing backends and rename it. Suggestion:

backend owncloud
server owncloud_backend
reqrep ^([^\ :])\ /webcam/(.) \1\ /\2

The last line might be needed to be adopted according to your needs. It is easier to try it out and then to correct the errors if there are any.

Then register the backend in the frontend. Add something like

use_backend owncloud if { path_beg /owncloud/ }

You could make apache listen only on localhost. Then will no longer be reachable from outside but only the address

If problems arise look at /var/log/haproxy.log where all log should be going.