Just a little background on why I am even taking the time to write this. You might be saying, there are already guides out there to do this. While this is true none of these guides take into account the uniqueness of the dated FreeNAS CrashPlan plugin.
Overview
After following countless guides online, I was still unable to fully configure my laptop to backup to a CrashPlan installation running on my FreeNAS machine. After playing around and messing with it for the better part of the day I figured it out. It turns out that due to the fact the current version of the CrashPlan plugin, as of FreeNAS-9.3-STABLE-201511040813 is CrashPlan 3.6.3_1. Since the newest version of CrashPlan is actually 4.4.1, this causes an issue when trying to connect to a headless CrashPlan installation on FreeNAS.
Big thanks to sirkkalap for his write up where most of this came from. https://github.com/sirkkalap/freenas-crashplan-howto
How-to : Crashplan & Freenas
Pre-requisites
1. Install CrashPlan 3.6.3 on your computer you want backed up but do not log in once the installation is complete.
http://downloads.tomsguide.com/-CrashPlan,0301-47759.html
2. FreeNAS-9.3-RELEASE-x64
Install
Step 1: Install the Crashplan plugin
Install Crashplan
Step 2 : Accept TOS
Step 3 : Enable Crashplan plugin
Step 4 : Create a sshd user for the Crashplan jail, enable TCP forwarding
To configure the Crashplan running inside a FreeNAS jail we need to use another machine that has graphical user interface. The jail has no user interface, only text console. Below is an overview of the connection that lets us use another machines GUI to configure the server running inside headless jail.
To login to jail when no sshd is available in it you must either a) use jexec command on FreeNAS console or b) use the jail console in FreeNAS WebUI.
a) Connect to jail. If you are on FreeNAS login. Note that the JID may be different.
b) Open terminal to jail from WebUI
Install bash (it is required during the crashplan automatic updates)
Enable sshd and crashplan (crashplan may already be enabled). The instructions below are taken from the FreeNAS wiki
Edit /etc/rc.conf
Create User for ssh-access
Create a new user, note that the user needs to be in group wheel
Start the sshd manually this one time:
Now, let's create a tunnel. This will redirect my laptop port 4200 to port 4243 on the crashplan jail. The console will stay open, you may close it when you are done with the step 7.
Use PuTTY, a telnet and SSH application for Windows and Linux, to forward port 4200 on the local computer to port 4243 on the remote computer.
Port Forwarding with PuTTY
1. Open PuTTY.
2. Go to the settings for Connection > SSH > Tunnels.
3. Enter these settings:
Source port: 4200
Destination: localhost:4243
4. Click Add.
5. Go to the Session settings.
6. Enter the appropriate connection information in Host Name (or IP address) field.
(Optional) To save these connection options for later reuse, enter a label in Saved Sessions and click Save
7. Click Open to open the SSH tunnel.
8. Sign in to the remote computer using your SSH credentials.
Step 5 : Verify Crashplan is running and listening
Step 6: Mount storage directories
From the FreeNAS GUI you must configure the storage for the jail so that you can back up the filesystem. This can be done if you go to:
Step 7 : Configure Crashplan UI to connect to remote host (through ssh-tunnel)
Configure the desktop (my laptop) to use the ssh tunnel by editing the ui.properties file. Make a backup of the file, if you use the Crashplan on the desktop machine too. This change will divert the connections to port 4200, so it will not work without the ssh-tunnel and it will not connec to local crashplan any more.
You may find the file in the following location:
Change the service port to 4200 by removing un-commenting (removing #) the #servicePort=4200 line, which we will use to tunnel to the remote connection.
Restart the Crashplan service by typing services.msc into the Start Menu search box.
Locate the Crashplan service and click restart.
Step 8: Connect with Crashplan UI and update.
Launch the modified Crashplan UI on the desktop (my laptop). Ssh-tunnel must be open. Immediatly after you login the UI will exit and the crasplan plugin will start the update process. This process in incremental, that means that the crasplan plugin will restart itself many times, until reaching the latest version.
*Mine did not do this action. I was able to log in and configure the headless server. When configuring your headless server, be sure to configure the directory where you want to store your backups.
To change your backup directory, in Crashplan, go to Settings>General Tab and click the Configure button to the right of "Inbound backup from other computers" near the bottom, you can change the default backup location.
This is where things got interesting for me.
unknown to me, during this time, my FreeNAS plugin decided it was going to update itself. The update may take some time, so you may want to wait a while before you continue.
1. From the FreeNAS GUI Restart the CrashPlan Jail
After doing this you can see how the version numbers increase with
Once the update is complete, make sure the client (desktop application) is the same version as the plugin, because even though they are supposed to auto update to the latest version, if there is a difference it will not work.
Step 9: Copy the authentication token required after the update
Follow the instruction in this Step 1
You can find the plugin token here on the FreeNAS box
Step 10: Connect with Crashplan UI...Finally!
your settings should be reverted in order to continue. Step 9 should have you reset this.
you may need to:
Restart the Crashplan service by typing services.msc into the Start Menu search box.
Locate the Crashplan service and click restart.
Now launch the UI client, login and configure your backups.
You may close the ssh-tunnel at this point when the Crashplan UI is closed.
Common Problems
After update to 3.6.3 (happens automatically, pushed from Crashplan) the service fails to start. Thanks to mstinaff thread: http://forums.freenas.org/index.php?threads/crashplan-3-6-3.18416/ we now have a working solution to this.
You need to manually update a file. First make a backup:
The original file for
looks like this:
You will need to update it to look like this:
Finally, you need to stop and start the jail. Without doing this the plugin will not start correctly.
Overview
After following countless guides online, I was still unable to fully configure my laptop to backup to a CrashPlan installation running on my FreeNAS machine. After playing around and messing with it for the better part of the day I figured it out. It turns out that due to the fact the current version of the CrashPlan plugin, as of FreeNAS-9.3-STABLE-201511040813 is CrashPlan 3.6.3_1. Since the newest version of CrashPlan is actually 4.4.1, this causes an issue when trying to connect to a headless CrashPlan installation on FreeNAS.
Big thanks to sirkkalap for his write up where most of this came from. https://github.com/sirkkalap/freenas-crashplan-howto
How-to : Crashplan & Freenas
Pre-requisites
1. Install CrashPlan 3.6.3 on your computer you want backed up but do not log in once the installation is complete.
http://downloads.tomsguide.com/-CrashPlan,0301-47759.html
2. FreeNAS-9.3-RELEASE-x64
Install
Step 1: Install the Crashplan plugin
Install Crashplan




To configure the Crashplan running inside a FreeNAS jail we need to use another machine that has graphical user interface. The jail has no user interface, only text console. Below is an overview of the connection that lets us use another machines GUI to configure the server running inside headless jail.

To login to jail when no sshd is available in it you must either a) use jexec command on FreeNAS console or b) use the jail console in FreeNAS WebUI.
a) Connect to jail. If you are on FreeNAS login. Note that the JID may be different.
Code:
[root@freenas] ~# jls JID IP Address Hostname Path 1 - crashplan_1 /mnt/zpool/jails_2/crashplan_1 [root@freenas] ~# jexec 1 /bin/tcsh
b) Open terminal to jail from WebUI

Code:
pkg install bash # crashplan is expecting bash to be in /bin ln -s /usr/local/bin/bash /bin/bash
Enable sshd and crashplan (crashplan may already be enabled). The instructions below are taken from the FreeNAS wiki
Edit /etc/rc.conf
Code:
... sshd_enable="YES" crashplan_enable="YES ...
Create User for ssh-access
Create a new user, note that the user needs to be in group wheel
Code:
root@crashplan_1:/ # adduser Username: crashplan Full name: Uid (Leave empty for default): 1001 Login group [crashplan]: Login group is crashplan. Invite crashplan into other groups? []: wheel Login class [default]: Shell (sh csh tcsh nologin) [sh]: tcsh Home directory [/home/crashplan]: Home directory permissions (Leave empty for default): Use password-based authentication? [yes]: Use an empty password? (yes/no) [no]: Use a random password? (yes/no) [no]: Enter password: (ENTER YOUR PASSWORD) Enter password again: (ENTER YOUR PASSWORD) Lock out the account after creation? [no]: Username : crashplan Password : ***** Full Name : Uid : 1001 Class : Groups : crashplan wheel Home : /home/crashplan Home Mode : Shell : /bin/tcsh Locked : no OK? (yes/no): yes pw: mkdir(/home/crashplan): No such file or directory adduser: INFO: Successfully added (crashplan) to the user database. Add another user? (yes/no): no Goodbye!
Start the sshd manually this one time:
Code:
root@crashplan_1:/ # service sshd start ...
Now, let's create a tunnel. This will redirect my laptop port 4200 to port 4243 on the crashplan jail. The console will stay open, you may close it when you are done with the step 7.
Use PuTTY, a telnet and SSH application for Windows and Linux, to forward port 4200 on the local computer to port 4243 on the remote computer.
Port Forwarding with PuTTY
1. Open PuTTY.
2. Go to the settings for Connection > SSH > Tunnels.
3. Enter these settings:
Source port: 4200
Destination: localhost:4243
4. Click Add.
5. Go to the Session settings.
6. Enter the appropriate connection information in Host Name (or IP address) field.
(Optional) To save these connection options for later reuse, enter a label in Saved Sessions and click Save
7. Click Open to open the SSH tunnel.
8. Sign in to the remote computer using your SSH credentials.
Step 5 : Verify Crashplan is running and listening
Code:
[root@freenas] ~# jexec crashplan_1 sockstat -4 USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS crashplan sshd 4149 5 tcp4 192.168.1.103:22 192.168.1.83:53226 root sshd 4147 5 tcp4 192.168.1.103:22 192.168.1.83:53226 root java 3952 56 tcp4 127.0.0.1:4243 *:* root java 3952 57 tcp4 *:4242 *:* root java 3951 56 tcp4 127.0.0.1:4243 *:* ...
Step 6: Mount storage directories
From the FreeNAS GUI you must configure the storage for the jail so that you can back up the filesystem. This can be done if you go to:
Code:
Jails -> crashplan_1 -> Storage -> Add Storage

Step 7 : Configure Crashplan UI to connect to remote host (through ssh-tunnel)
Configure the desktop (my laptop) to use the ssh tunnel by editing the ui.properties file. Make a backup of the file, if you use the Crashplan on the desktop machine too. This change will divert the connections to port 4200, so it will not work without the ssh-tunnel and it will not connec to local crashplan any more.
You may find the file in the following location:
Code:
Linux (if installed as root): /usr/local/crashplan/conf/ui.properties Mac: /Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties Solaris (if installed as root): /opt/sfw/crashplan/conf/ui.properties Windows: C:\Program Files\CrashPlan\conf\ui.properties
Change the service port to 4200 by removing un-commenting (removing #) the #servicePort=4200 line, which we will use to tunnel to the remote connection.
Code:
servicePort=4200
Restart the Crashplan service by typing services.msc into the Start Menu search box.
Locate the Crashplan service and click restart.
Step 8: Connect with Crashplan UI and update.
Launch the modified Crashplan UI on the desktop (my laptop). Ssh-tunnel must be open. Immediatly after you login the UI will exit and the crasplan plugin will start the update process. This process in incremental, that means that the crasplan plugin will restart itself many times, until reaching the latest version.
*Mine did not do this action. I was able to log in and configure the headless server. When configuring your headless server, be sure to configure the directory where you want to store your backups.
To change your backup directory, in Crashplan, go to Settings>General Tab and click the Configure button to the right of "Inbound backup from other computers" near the bottom, you can change the default backup location.
This is where things got interesting for me.
unknown to me, during this time, my FreeNAS plugin decided it was going to update itself. The update may take some time, so you may want to wait a while before you continue.
1. From the FreeNAS GUI Restart the CrashPlan Jail
After doing this you can see how the version numbers increase with
Code:
root@crashplan_1:/ ee /usr/pbi/crashplan-amd64/share/crashplan/log/app.log
Once the update is complete, make sure the client (desktop application) is the same version as the plugin, because even though they are supposed to auto update to the latest version, if there is a difference it will not work.
Step 9: Copy the authentication token required after the update
Follow the instruction in this Step 1
You can find the plugin token here on the FreeNAS box
Code:
root@crashplan_1:/ cat /var/lib/crashplan/.ui_info
Step 10: Connect with Crashplan UI...Finally!
your settings should be reverted in order to continue. Step 9 should have you reset this.
you may need to:
Restart the Crashplan service by typing services.msc into the Start Menu search box.
Locate the Crashplan service and click restart.
Now launch the UI client, login and configure your backups.
You may close the ssh-tunnel at this point when the Crashplan UI is closed.
Common Problems
After update to 3.6.3 (happens automatically, pushed from Crashplan) the service fails to start. Thanks to mstinaff thread: http://forums.freenas.org/index.php?threads/crashplan-3-6-3.18416/ we now have a working solution to this.
You need to manually update a file. First make a backup:
Code:
root@crashplan_1:/ # cd /usr/pbi/crashplan-amd64/share/crashplan/bin root@crashplan_1:/usr/pbi/crashplan-amd64/share/crashplan/bin # cp -v run.conf run.conf.bkp
The original file for
Code:
/usr/pbi/crashplan-amd64/share/crashplan/bin/run.conf
looks like this:
Code:
SRV_JAVA_OPTS="-Dfile.encoding=UTF-8 -Dapp=CrashPlanService -DappBaseName=CrashPlan -Xms20m -Xmx1024m -Djava.net.preferIPv4Stack=true -Dsun.net.inetaddr.ttl=300 -Dnetworkaddress.cache.ttl=300 -Dsun.net.inetaddr.negative.ttl=0 -Dnetworkaddress.cache.negative.ttl=0 -Dc42.native.md5.enabled=false" GUI_JAVA_OPTS="-Dfile.encoding=UTF-8 -Dapp=CrashPlanDesktop -DappBaseName=CrashPlan -Xms20m -Xmx512m -Djava.net.preferIPv4Stack=true -Dsun.net.inetaddr.ttl=300 -Dnetworkaddress.cache.ttl=300 -Dsun.net.inetaddr.negative.ttl=0 -Dnetworkaddress.cache.negative.ttl=0 -Dc42.native.md5.enabled=false"
You will need to update it to look like this:
Code:
SRV_JAVA_OPTS="-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider -Dfile.encoding=UTF-8 -Dapp=CrashPlanService -DappBaseName=CrashPlan -Xms20m -Xmx1024m -Djava.net.preferIPv4Stack=true -Dsun.net.inetaddr.ttl=300 -Dnetworkaddress.cache.ttl=300 -Dsun.net.inetaddr.negative.ttl=0 -Dnetworkaddress.cache.negative.ttl=0 -Dc42.native.md5.enabled=false" GUI_JAVA_OPTS="-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider -Dfile.encoding=UTF-8 -Dapp=CrashPlanDesktop -DappBaseName=CrashPlan -Xms20m -Xmx512m -Djava.net.preferIPv4Stack=true -Dsun.net.inetaddr.ttl=300 -Dnetworkaddress.cache.ttl=300 -Dsun.net.inetaddr.negative.ttl=0 -Dnetworkaddress.cache.negative.ttl=0 -Dc42.native.md5.enabled=false
Finally, you need to stop and start the jail. Without doing this the plugin will not start correctly.