Posted by: Ian | June 20, 2010

Install Crashplan on a Qnap Atom (TS-x59)

This guide is a modified version of the original by as there are some bits that didn’t quite work.

How to install and enable CrashPlan on the QNAP nas (Atom models)

Install: Opware (qpkg, from qnap homepage)

From an SSH run this:

ipkg update
ipkg install nano
ipkg install cpio
ipkg install bash
ipkg install coreutils
cd /opt
ln -s /opt/bin/bash /bin/bash
tar zfx CrashPlan_2010-03-08_Linux.tgz
rm CrashPlan_2010-03-08_Linux.tgz
cd /opt/CrashPlan-install

Edit the (I use the command “nano“)

BINSLOC=”/bin /opt/bin /usr/bin /usr/local/bin”

Install Crashplan (command is: “./”) using “admin” user and into “/opt/crashplan”

Getting it to start on reboot

edit /etc/config/qpkg.conf, and add: (I use the command “nano /etc/config/qpkg.conf”)

Name = CrashPlanStarter
Version = 0.1
Enable = FALSE
QPKG_File =
Date = 2009-12-06
Shell = /share/MD0_DATA/.qpkg/crashplan/
Install_Path = /share/MD0_DATA/.qpkg/crashplan
Author =

now we must create the “/share/MD0_DATA/.qpkg/crashplan/”:

mkdir /share/MD0_DATA/.qpkg/crashplan

use your favorite scp program to transfer the, attached to the guide. into “/share/MD0_DATA/.qpkg/crashplan”

Last but not at least, run the command:

chmod +x /share/MD0_DATA/.qpkg/crashplan/

In addition edit /opt/qpkg/crashplan/bin/CrashPlanEngine and add the line:

BINSLOC=”/bin /opt/bin /usr/bin /usr/local/bin”

To start crashplan use the webadmin of the QNAP, to start the QPKG, that we have just made.

or you can start crastplan manualy to test if it works. (It will not start on reboot, there you must enable it using the webadmin)

cd /opt/crashplan/bin

ln -s /opt/bin/bash /bin/bash

./crashplan start

Here is the file – Note I’ve modified the sleep intervals.

/bin/echo -e “Error: $*”
exit 1
# Determine BASE installation location according to smb.conf
publicdir=`/sbin/getcfg Public path -f /etc/config/smb.conf`
if [ ! -z $publicdir ] && [ -d $publicdir ];then
publicdirp1=`/bin/echo $publicdir | /bin/cut -d “/” -f 2`
publicdirp2=`/bin/echo $publicdir | /bin/cut -d “/” -f 3`
publicdirp3=`/bin/echo $publicdir | /bin/cut -d “/” -f 4`
if [ ! -z $publicdirp1 ] && [ ! -z $publicdirp2 ] && [ ! -z $publicdirp3 ]; then
[ -d “/${publicdirp1}/${publicdirp2}/Public” ] && BASE=”/${publicdirp1}/${publicdirp2}”
# Determine BASE installation location by checking where the Public folder is.
if [ -z $BASE ]; then
for datadirtest in /share/HDA_DATA /share/HDB_DATA /share/HDC_DATA /share/HDD_DATA /share/MD0_DATA; do
[ -d $datadirtest/Public ] && BASE=”/${publicdirp1}/${publicdirp2}”
if [ -z $BASE ] ; then
echo “The Public share not found.”
_exit 1
case “$1” in
if [ `/sbin/getcfg ${QPKG_NAME} Enable -u -d FALSE -f /etc/config/qpkg.conf` = UNKNOWN ]; then
/sbin/setcfg ${QPKG_NAME} Enable TRUE -f /etc/config/qpkg.conf
elif [ `/sbin/getcfg ${QPKG_NAME} Enable -u -d FALSE -f /etc/config/qpkg.conf` != TRUE ]; then
_exit  “${QPKG_NAME} is disabled.”
/bin/echo “Enable CrashPlanStarter”
echo 1048576 > /proc/sys/fs/inotify/max_user_watches
/bin/sleep 30
source /etc/profile
/bin/sleep 60
mkdir /var/lib/crashplan
cp /share/MD0_DATA/.qpkg/crashplan/.identity /var/lib/crashplan/
#    #sleep 120
/opt/crashplan/bin/crashplan start
/bin/echo “Disable CrashPlanStarter”
/opt/crashplan/bin/crashplan stop
cp /var/lib/crashplan/.identity /share/MD0_DATA/.qpkg/crashplan/
$0 stop
$0 start
echo “Usage: $0 {start|stop|restart}”
exit 1
exit $RETVAL

One final thing is after starting and setting up crashplan as you want run the following command to save the identity for CrashPlan:

cp /var/lib/crashplan/.identity /share/MD0_DATA/.qpkg/crashplan/

Now it should work after a restart 🙂


  1. This site was a lot better back in the day =p

  2. Got it up and running perfectly on a QNAP TS-509, but after running non stop for 2 month the NAS was rebooted. Now it doesn’t backup anymore. Service can be stopped/started from the webinterface, but no backup is registered anywhere,,

  3. I followed these directions, and they worked to a tee! The only problem is, crashplan is starting but i cannot connect to it. I did a netstat -a and 4243 and 4242 are not on there and not listening. I have setup headless clients on other QNAP Nas’s before but using the home version not the pro version. Also, when i run IP tables, it causes a problem, an error and doesn’t work.

    I need to get this working for a client ASAP. Any ideas?

Leave a Reply

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

You are commenting using your 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


%d bloggers like this: