User Tools

Site Tools


Building owncloud client for Raspberry pi's raspbian

I use my Raspberry pi as an owncloud client to synchronize my NAS and my server. Unfortunately, the official package is not up-to-date so I have to build it by myself.

Update!: this page has been updated for client 2.5.0 compatible with raspbian stretch.

DISCLAIMER :!: Tested on raspbian stretch on raspberry pi 3. Feedback welcome on twitter.

Note: if you need a newer version of the client, just tweet me @sgripon.

Download binaries

If you don't want to compile by yourself, you can get the debian package installer from:

To install:

sudo dpkg -i owncloud-client-2.5.0_armhf.deb

If there are missing dependencies, this command should automatically install all:

sudo apt-get install -f

If not, you should be able to install manually missing packages with apt-get.


You can add my ppa to the source.list. Add line:

# For stretch, support versions > 2.5.0.
deb [trusted=yes] stretch/
# For jessie until version 2.3.2
deb ppa/

to /etc/apt/sources.list


sudo apt-get update
sudo apt-get install owncloud-client

Raspberry pi emulator

I use raspberry pi emulator to build owncloud. See Raspberry pi emulator. This is to avoid too much writing on SD card and breaking it too quickly.


Most of the build instructions are from owncloud official website ( with some adjustments for RPI.

Get owncloud client sources from official github web site here:

This tutorial assumes that the work is done on raspbian in folder /home/pi/dev/owncloud-client. If not, change all paths.

On your pi:

  cd /home/pi/dev/owncloud-client

Some dependencies are necessary to build the two packages.

  sudo apt-get install libssl-dev
  sudo apt-get install libsqlite3-dev
  sudo apt-get install zlib1g-dev
  sudo apt-get install qt5-default libqt5webkit5-dev qttools-dev-tools qt5keychain-dev

You will need to install cmake if not already done to build both:

  sudo apt-get install cmake

Let's build

The following script downloads and builds the source code (remove download command (wget) if already done). The script must be invoked with the desired client version:

./ 2.5.0

The script should work for future versions unless ownlcoud changes files naming.
# Download and extract source from official github website
if [ ! -f v$ ]; then
unzip v$
# Build
mkdir client-build 
cd client-build
cmake -DWITH_DOC=TRUE -DCMAKE_BUILD_TYPE="Release" ../client-$1

Then, installation. The following script must be run as root:

sudo ./ 2.5.0
cd client-build
# Prepare a redistribuable package
make package
make install

Build a debian package

In /home/pi/dev/owncloud-client, create a deb folder:

cd /home/pi/dev/owncloud-client
mkdir -p deb/owncloud-client

First thing is to copy all needed files to this new folder. We are lucky, the “make install” command has produced a file with all files installed, so it can be used with rsync:

cd deb/owncloud-client
rsync  --files-from /home/pi/dev/owncloud-client/client-build/install_manifest.txt / .

Add also libraries installed manually:

cp /usr/local/lib/arm-linux-gnueabihf/ usr/local/lib
cp /usr/local/lib/arm-linux-gnueabihf/ usr/local/lib

Then, follow tutorial How To Build a Debian Package.

The full script to build the debian package:
mkdir -p deb/owncloud-client
cd deb/owncloud-client
rsync --files-from $DIR/client-build/install_manifest.txt / .
cp /usr/local/lib/$1 usr/local/lib
cp /usr/local/lib/$1 usr/local/lib
mkdir DEBIAN
cat <<EOT>> DEBIAN/control
Package: owncloud-client
Version: $1+debian+rpi3
Depends: libqt5dbus5, libqt5webkit5, libqt5xml5, libsqlite3-0, libqt5concurrent5, zlib1g, libqt5keychain1, libqt5network5, libqt5gui5, libqt5core5a, libstdc++6, libgcc1, libc6
Priority: optional
Section: net
Architecture: armhf
Essential: no
Installed-Size: 1024
Maintainer: Sebastien Gripon <>
Description: GUI app to sync a folder to ownCloud
 Specify one ore more directories on the local machine to sync your ownCloud
 server, and always have your latest files wherever you are. Make a change to
 the files on one computer, it will flow across the others using these desktop
 sync clients.
cat <<EOT>> DEBIAN/postinst
set -e
echo "Postinst running ..."
echo "Done"
chmod 0755 DEBIAN/postinst
# Build package
cd $DIR/deb
dpkg-deb --build owncloud-client
# Rename package
mv owncloud-client.deb owncloud-client-$1_armhf.deb

Must be invoked as sudo with version number as argument:

sudo ./ 2.5.0

Launch at startup

If you want to launch owncloud client automatically at startup, just add this line:


at the end of /etc/xdg/lxsession/LXDE/autostart

Note that owncloud client needs a graphical session to be launched so if you want to launch the client at raspi boot, it must be configured to start X automatically.

Older Versions

Older versions can have a different build sequence:

Share this page:

building_owncloud_client_for_raspberry_pi.txt · Last modified: 2018/11/02 09:06 by sgripon

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki