OwnCloud on the Pi – Part 3 – OwnCloud

So it turns out that Gentoo has a package for OwnCloud already! Only the OwnCloud database doesn’t show it, and I want to run 2 owncloud implementations side by side (Family and Girlfriend). So I decided to go ahead and make sure everything would work fine…

First, I made sure I had the dependencies.

emerge –ask –onlydeps owncloud

It installed a list of things. When I tried to `emerge owncloud` it told me through symbols

[ N    *] Owncloud

that there was a missing keyword. So I decided not to trust that.

Instead, I figured I had installed enough, and downloaded the tarball to my wbeserver root (as /owncloud). This will become my family OwnCloud.

tar -xjvf own<TAB>

Just a note, when I say <TAB>, I mean “Press Tab and auto-complete, it’s not worth typing out”. If you have not yet learned Tab Autocompletion on the shell, then you are missing out and must learn right now.

I navigated to the webserver in my browser (I copied `owncloud` to /var/www/localhost/htdocs/, so I went to “”) and got a nice error:

Can’t create data directory (/var/www/localhost/htdocs/owncloud/data)

This can usually be fixed by giving the webserver write access to the root directory.

That’d be, for this,

chown -R apache:apache /var/www/localhost/htdocs/owncloud/install/data

Except it seems it doesn’t exist yet! I need to let it be created in the installation. Except I can’t install yet… This stinks of a missing dependency, to me.

So I finished the setup of the server first, enabling “mod_rewrite” in httpd.conf, and making sure AllowOverride was set to All.

cd /etc/apache2

vim httpd.conf

grep Allow */*

I got more files than I cared to make sense of with that last search. Luckily, the OwnCloud docs tell me that, for Gentoo, /etc/apache2/vhosts.d/00_default_vhost.conf should have

<Directory /var/www/localhost/htdocs/owncloud>

Options Indexes FollowSymLinks MultiViews

AllowOverride All

Order allow,deny

allow from all


and that I should run a different command to change the permissions:

chown -R apache:apache /var/www/localhost/htdocs/owncloud

So I followed the directions, and restarted Apache

/etc/init.d/apache2 restart

And got an error for my troubles.

* apache2 has detected an error in your setup:

AH00526: Syntax error on line 49 of /etc/apache2/vhosts.d/00_default_vhost.conf:

Invalid command ‘Order’, perhaps misspelled or defined by a module not included in the server configuration

* ERROR: apache2 failed to stop

Well then. Everybody seems to think I have a missing dependency. I can believe it.

Or I can just comment out the “Order”. A quick Google search tells me that’d be unadvised. So I googled the problem.

It turns out that the responsible module is loaded in httpd.conf using:

LoadModule authz_host_module modules/mod_authz_host.so

Except that IS loaded in httpd.conf! So what’s going on here?

And… then I discovered that the Order directive was removed from Apache 2.4!

The fixed version (I think, from my research) is:

<Directory /var/www/localhost/htdocs/owncloud>

Options Indexes FollowSymLinks MultiViews

AllowOverride All

Require all granted


Please do let me know if I flunked it up.

Anyway, so now Apache restarts!

And this time, when I loaded OwnCloud, I was met with a prompt:

Create an admin account

Boo yeah!

Username, password, and a few minutes to wait for installation to finish. When I clicked on the “Advanced” tab, I found an option: SQLite, or MySQL. I chose SQLite, I wasn’t that interested in using something so heavy as MySQL on the Pi, and OwnCloud configures SQLite itself!

I started using OwnCloud, and I found it to be sluggish. I suppose it IS running on the Raspberry Pi, after all…. Then I realized I was running a system upgrade using Emerge, and python really bogs down the computer. I will report back on the actual speed later.

Then I read the server logs, found that OwnCloud had an htaccess problem, using the old Deny directive.

tail /var/log/apache2/error<TAB>

So I fixed the htaccess file by replacing the line with:

Require all denied

and the error died.

So, things I did: Installed OwnCloud, got it working, tested a file upload, read the se

Things to do: See how well it performs when not emerging,  and get it working over SSL.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s