OwnCloud on a Raspberry Pi


For a while I have been running OwnCloud to share images. I use a Raspberry Pi with Arch Linux and run OwnCloud through Docker.

In conclusion, the setup is not too difficult, accessing the Cloud through dedicated clients are reasonably fast, but the web interface is quite slow.

Arch Linux

To make more room for storage I have chosen the small GNU/Linux Distribution Arch Linux as the operating system.

I am new to Arch Linux and for future reference I include a section about installing and setting up.

Installation instructions for Raspberry Pi can be found here.


On a fresh system root is the only user and has username root.

The first thing to do is to change the password of root with passwd.


Bring the package manager Pacman and system up to date with pacman -Syu.

A few necessary packages for me are tmux, git, vim, sudo, mlocate and zsh. To be able run make, base-devel is also needed. When running a “cloud”, I find it useful to be able to monitor network traffic. nload fits my needs and taste.

In total:

pacman -S tmux git vim sudo mlocate zsh base-devel nload

To search for the package <package> use pacman -Ss <package>.

To generate the locate database run sudo updatedb.

User configuration

Add a new user, set information and add a password:

useradd -m -G wheel -s /bin/zsh robert
chfn robert
passwd robert

Add the user to the sudoers group:

Change the shell to zsh with chsh -s zsh.

I use rcm to manage my dotfiles and and as noted in the installation instructions it is available as a package for Arch Linux. However, it has to be installed as described here.


OwnCloud has a bunch of dependencies and to cut that corner I run OwnCloud in a Docker container.


Installing and running Docker is explained at Docker’s webpage.

Remember to add user to docker group:

sudo gpasswd -a ${USER} docker

One problem with using Docker on a Raspberry Pi is that the Pi is a 32 bit computer and most containers need a 64 bit computer. At the time of writing I have only found one container that works with a Pi and it is not the latest version of OwnCloud.

Download the container and start it with connections for HTTP(S):

docker pull comzone/rpi-owncloud6
docker run -d -i -t -p 443:443 -p 80:80 comzone/rpi-owncloud6

Updating Docker

The Docker package can be updated while the container is running, but the Docker client does not communicate with a container started under a previous version. Hence, from time to time it may be neccessary to stop and start a container.

At some point Docker began to complain when I restarted a stopped container (the error message is forgotten). Eventually I got it working by starting Docker with

sudo docker -d --exec-opt native.cgroupdriver=cgroupfs

One unfortunate thing is that despite the request, the docker process is not daemonized; I execute the command in a tmux session. With Docker running again, the container can be started with docker start CONTAINER ID, where CONTAINER ID is found from docker ps -a.

OwnCloud problems (2016-04-10)

My setup is working fine, but at some point my OwnCloud user ran out of space (as set in OwnCloud) and OwnCloud did not fail gracefully. In fact, I experienced a complete meltdown of OwnCloud – I could not access it in any way and eventually I deleted and reinstalled the container. Unfortunately this also meant that my OwnCloud settings and in particular the users and their passwords were lost.

>> Home