Synology DiskStation

This is an incredibly easy process if the folder is shared :stuck_out_tongue: get your folders fixed and then just drop the files in. You should never need to be in @appstore folder

yes, now everything is accessible. what i had before was the result of not creating the /conf, /addon, and /userdata before installing. if you don’t do that, turns out it will install without error, but put those directories in the @appstore folder. i wasted a ton of time on figuring that one out, but i appreciation the conversation that helped me sort it out.


Start over then, you’ll make your life a lot easier

And rpi has its own set of problems. They’re fine machines but you already have a very capable machine

HI Synology Peers,

I’m at a point now where I need to upgrade my OH to 2.4 due to binding requirements. I’ve seen a lot of different discussions about the upgrade; mostly on the GitHub Synology thread.

Package -

I understand there is not a upgrade button/feature yet. I am “somewhat” savy with ssh and vi.

I saw a post by @cniweb on GitHub below:

“Hi, a automatic update is not implementet, at the moment. But you can use the manuel update mechanism from OH himself.”

Are these the steps -->

My current OH 2.3.001 is a standard install via the Synology web interface using the shared folder option (openhab). I have not created any symbolic links to anything (I saw issues around this on threads). I have lots of add-on Jar’s dropped in the folder including the updated/rewritten zWave binding.

Can anyone please provide a list of steps for me to follow for the upgrade that they used?

Best, Jay

you can’t even use the built in method because synology uses 7z instead of zip. There are steps to make it work and i think cniweb is going to incorporate those changes at some point but as of now it’s best to just back it up yourself.

the main points would be to backup your entire conf folder, userdata folder, and addons folder.

you’ll want to restore the entire conf folder and probably addons folder but just pieces of the userdata folder. that one is a bit harder
from userdata you probably only need/want:
uuid (file)
openhabcloud (folder)
jsondb (folder)
config/org/openhab/ (there are files in here you may want like habpanel.config and that might be the only one, the others are rebuilt)


Thank you for taking the time to jot down some notes. I have a few questions . . .

Can I unzip the on a Windows box and drop the entire contents onto the Synology via a share? Good or bad idea?

Either way using the SPK or the ZIP; what directory should I execute “what” script to start the upgrade? I do have a share already called openHAB which has the v2.3 SPK sitting in it on the Synology; is this the place to drop the v2.4 SPK or ZIP in?

Picture of v2.4 unzipped:

I’m assuming I do NOT uninstall OH 2.3?

Here are 2 screen shots of the unzipped content for /scripts & /wizard_uifiles. Is there an order of execution of scripts?

Picture of /scripts of v2.4 unzipped:
Picture of /wizard_uifiles of v2.4 unzipped:
Best, Jay

How do I automate this script above on a schedule? Use scheduler with what syntax?

I’ve made the changes from Zip to 7z already.

Best, Jay

Would it be possible to use a modified update script (changing unzip to 7z) from runtime/bin folder on a Synology? I’m not sure if the used paths and variables are correct on a Synology.

Furthermore: what about file system permissions?

You install the SPK as any other. I would uninstall 2.3 first to be sure there’s no leftover cruft.

if you’ve modified the backup/restore scripts then you’ll run your backup script prior to uninstalling 2.3
COPY these modified scripts because they’ll be overwritten by the new install.

I would still make a copy of it yourself as well.

Install the new SPK and run the restore your modified scripts and then restore. That should cover it.

@jackzone I would ask @jwiseman for his scripts. I dont currently have modified scripts, i restore by hand.

permissions are set during the install

I modified the OH canned backup scripts but they aren’t running (not sure how to schedule them). What I have been doing with OH backups on the Synology is the following for many months now.

  1. I attached a SSD on the back of the unit via the USB port and use HyperBackup on the /homes/openhab directory nightly.
  2. My Sonology is attached to a Windows network via Active Directory and I copy/paste the entire /homes/openhab directory every few days to my Windows network.
  3. My setup is probably not the norm; I actually have 2 Synology’s in a HA pair, with one of them being the primary (so by default, a failure of a unit would not take me down).

Most likely I will be following @waspie advise/instructions and do the restore by copying my “key” files/folders back over manually from my Windows backups. I have a TON of tweaked settings across numerous files for performance tuning that I want to re-incorporate back into 2.4.

I haven’t decided “when” I’m going to upgrade (I’m a bit scared, I have 15k lines of rules code which is overwhelming if it works but fails on some of the rule logic) but I will let everyone know when I do the upgrade and what steps it took to upgrade.

The biggest factor of why I’m upgrading is because I’ve just started learning about MQTT and it requires a minimum of OH 2.4 (new core things/items defs) needed with the newer MQTT v2.5 binding in order to get my Roomba commands to work.

Best, Jay

@jwiseman while you’re at it,I would use 2.5.0 M1
modify your /etc/hosts to point whatever the URL in the .SPK file is to point to localhost. That will make it fail downloading the openhab distribution files and fallback to held in your public folder. So, download and rename the m1 zip file to 2.4 as seen in the .SPK file. M1 has some good MQTT fixes in it that you’ll want.

Hey Scott,

Few questions . . .

What is the URL to the M1 Zip File, jFrog, Maven, etc. so I can manually download it?

In the v2.4 /scripts/ file; this is where v2.4 it’s getting downloaded. I copied/pasted the URL into a browser and just change it to 2.5.0 but it gives me a 404 error.

echo "Set instance variables..." >>$LOG

# Add more files by separating them using spaces


Best, Jay

There seems to be no 2.5.0 directory at the moment:

@jwiseman @jackzone

select linux - apt - milestone
scroll down to manual installation and then click the big unmissable download link

Upgraded OH from 2.3.001 to 2.5m1 on a Synology:

I first wanted to thank the folks that helped me put this list together in this thread (@waspie & @Dennis1108 @ github )

Over all impression in the last 12 hours is the stability and consistency of 2.5m1. The logging has really improved in the events log. CPU usage has been reduced by 50%.

My Synology OH Setup:

Two DS716 setup in a HA cluster configuration (active/passive)

* RAID-1 drives in both units
* One USB SSD drive hanging off one of the DS716 units to backup OH to
* Two AEOTec USB zWave controllers (which are copies of each other)
* Using OH v2.3.001 from the Package Center (never updated to v2.3.005)
* I’m using these bindings:
	- zWave v2.5, HUE, Sonos, WeMo, Onkyo, Amazon Echo, Unifi, MQTT, Open Weather Map, Mail, Air Quality, IP Camera, Nest, Network, Samsung TV, Synology Surveillance Station, Climacons, HUE Emulation, CalDAV
* Majority of my OH configuration has been done with single configuration files for things, items and rules.  I have around 15k lines of code in the rules file since starting in June 2018.
* I'm running HABPanel on three Samsung tablets on walls

Steps I Followed:

1.	Backup the entire \homes\openHab directory to another machine (do it twice, just in case)

2.	Stop OH via the Package Center

3.	Reboot the Synology to insure all OH hooks are disconnected

4.	Uninstall OH v2.3.001 from the Synology via Package Center

5.	Rename \openHAB\openhab public folder that contains the installation files \openHAB\openhab to \openHAB\openhab2.3 to insure there isn’t any conflict during this upgrade process

6.	Download OH2.4 for Synology (PKG & ZIP)

	b.	Unzip a copy of the of the ZIP on a PC for later review and copying over to the Synology

7.	Copy openHAB- over to \openHAB public folder (not the \homes\openhab directory)

8.	** Package Center, Manual Install, look for openHAB- on your local PC

	a.	Choose 3rd destination /var/services/homes/openhab
	b.	I did NOT choose to install tmpfs or zWave options.  I get the latest zWave binding (JAR) from the latest build online since it changes every week with new updates to it (Thanks @chris !)
		i. If you had zWave running natively on v2.3; you’ll need to completely reset up zWave devices from scratch, there was a complete rewrite done (lucky for me; I did this on 2.3 prior to this upgrade)

9.	Reboot the Synology

10.	OH should auto start after the reboot, take a look at the log files to see what errors could be coming up.  Mine was multiple IPs bound to interfaces.

	2019-04-05 17:09:05.041 [WARN ] [] - Found multiple local interfaces - ignoring
	2019-04-05 17:09:05.063 [WARN ] [] - Found multiple local interfaces - ignoring <--
	2019-04-05 17:09:05.065 [WARN ] [] - Found multiple local interfaces - ignoring

	You can resolve this from either the GUI Paper, System, Network setting or adding this line item in the runtime.cfg file

11.	Wait for OH 2.4 to completely start up; look at the openhab.log to verify complete startup

12.	Stop OH 2.4 via Package Center

13.	Download v2.5m1

		i.	Select Linux - apt - milestone
		ii.	Scroll down to manual installation and then click the big unmissable download link
		iii.Download OH 2.5m1 runtime and openhab-addons-2.5.0.M1.kar files

	b.	Modify your /etc/hosts to point to the main domain URL in the openHAB- file to localhost. You’ll need to SSH into your system and go into super user mode in order to modify this file

                     if you have a HA cluster; make sure to add it to both device hosts file)
		ii.	This will make it fail downloading the openHAB distribution files from the Internet and fallback to held in your \openHAB public folder (not your \homes\openhab folder)

	c.	Download and rename the file to as seen in the /scripts/ file within .SPK file. 

	d.	Copy over the newly renamed to /openHAB/ public folder (not your \homes\openhab folder) from your PC

	e.	Copy over openhab-addons-2.5.0.M1.kar to the /addon’s directory; this will be used to pull the bindings from since the domain host entry points to your localhost now

14.	Blow away and recreate the /userdata/tmp and /userdata/cache directories as a precaution.

15.	Startup OH via Package Center (which will still show v2.4), review the logs to insure it starts up fine

16.	Stop OH via Package Center

17.	The main restore points would be your entire /conf folder,  /userdata folder, and “some” of /addons JAR’s.  

	a.	/userdata you probably only need/want:
		i.	uuid (file)
		ii.	openhabcloud (folder)
		iii.jsondb (folder)
	b.	/config/org/openhab/ (there are files in here you may want like habpanel.config, the others are rebuilt)
	c.	Copy/paste entries from your copy of your /userdata/etc/org.ops4j.pax.logging.cfg into the new logging file which is different than v2.3 so don’t overwrite the entire logging file

18.	Once v2.5m1 is running stable; start adding addon’s via the GUI slowly.   You will see a system performance issues when adding a lot of bindings semi-quickly.

	a.	Insure this file is in the /addon’s directory you downloaded previously --> openhab-addons-2.5.0.M1.kar
	b.	You’ll want to use the GUI for all addon’s that exist in your installation vs. dropping them into the addon’s directory (one at a time to insure each work).
	c.	The only addon’s I dropped into the directory where ones that were NOT part of the GUI selections (one off bindings)
	d.	You will see duplicate binding entries in the GUI binding area 1.13 and 1.14 along with 2.4 and 2.5m1, choose the 2.5m1 options 
	e.	Modify your addon’s.cfg file for binding entries to insure the bindings load the next time you clear cache/tmp directories

The ONLY major issues I encounter was:

	1.	Sitemaps, all my slider items had to be committed out –
	2.  Having some duplicate bindings running from 2.4 and 2.5m1 that I had to manually stop and uninstall
	3.  Changing some startup rule logic - I'm guessing 2.5m1 is a bit more strict on item states

** Possible Hurdles for Some OH Synology Installations (I did NOT have to do this):

	a.	Remove the user in the Synology web UI
	b.	Reboot Synology
	c.	Following instructions from @Dennis1108
		ii.	I did NOT have to do this step but here’s what mine looked like:

	root@ds716cluster:~# df -h

		Filesystem      	Size  	Used 	Avail Use% 	Mounted on
		/dev/md0       		2.3G  	1.2G  	1.1G  53%	/
		none            	3.9G     	0  	3.9G   0% 	/dev
		/tmp            	3.9G   	23M  	3.9G   1% 	/tmp
		/run           	 	3.9G  	4.0M  	3.9G   1% 	/run
		/dev/shm        	3.9G  	4.0K  	3.9G   1% 	/dev/shm
		none            	4.0K     	0  	4.0K   0% 	/sys/fs/cgroup
		cgmfs           	100K     0  	100K   0% 	/run/cgmanager/fs
		/dev/drbd-md2   	3.5T  	2.1T  	1.5T  60% 	/volume1
		/dev/sdq1       	470G   	73M  	470G   1%	/volumeUSB1/usbshare

Best, Jay


Synology Peers,

Is it possible to upgrade a Synology from OH 2.4 to OH 2.5 w/o having the developer create a OH 2.5 SPK for the Synology?

The reason for the question is; the Unifi binding which does a lot of folks presence detections requires 2.5 now because of this --> based on @mgbowman statement of “as the required change to ExtensibleTrustManager isn’t in 2.4”.

Best, Jay

Hi jay, you should be able to work it out from this

Hi Jay,

Were you successful in upgrading to 2.5M1?

I’ve looked at your instructions and you lost me at step no.13.
Am I supposed just to add the following line in my host file?

I don’t have a public folder.
Where should I put the two zip files?
Here is a list of “openhab” folders on my DSM:

/volume1/homes/openhab/userdata/config/ org/openhab

Your help would be much appreciated.


Yes, following my instructions I got my Synology to OH 2.4 using OH 2.5 m1 bindings. Its so much more stable than OH 2.3 was.


Yes, but ONLY after you get OH 2.4 startup at least once. Once you put that line in the host file; OH will NOT download it’s packages from the Internet anymore. It will use the .KAR file to get them from which are the 2.5 m1 versions.

re: I don’t have a public folder.

When I installed OH 2.3 on my Synology from the canned package center; I choose the public folder option. It creates a folder called openHAB which the .SPK is placed in. This is where you put the .ZIP file and also the zip file fully extracted.

My public folder openHAB folder has this in it openhab (folder) , openHAB-2.4.0 (folder), (file) and openHAB- (file)

You may have to clear all your OH files/folders off your unit and install the OH 2.3 using the public folder option as step 1 in order to upgrade to OH 2.4 using my instructions. If you do so, please make sure you make a couple copies of all your configurations.

Best, Jay

Hi Jay,

Thank you for your prompt reply.

I was anxious to get this completed ASAP and almost instantaneous support from guys like you makes all the difference.

So, if I understand correctly the process is basically:

  • To make a new installation of OH2.4 to insure correct file structure (probably different from the 2.3.x).

  • Replacing the OH2.4 core application files with the 2.5M1 runtime files.

  • Replacing the essential ‘conf’ and ‘userdata’ files from the previous installation.

  • Forcing new addons to be extracted from a local source (the .KAR file) instead of an external source (done by modifying the host file).

What I still don’t understand is the importance of copying the OH2.4 spk file on the DSM.

Unless I am looking at the wrong places, I can’t find any existing .spk files from previous openhab folders or installations.

I was under the impression that these spk files were scripts that were executed only once in order to install the system files from an external repository and deleted afterward.

Also, why renaming the 2.5M1 runtime zip file when the intent is to extract it in the new OH2.4 folder? Is the zip file called by some other process?

As far as directory structure, my setup seems to be slightly different than yours.

I didn’t have a ‘public’ folder so the only ‘openhab’ folder that I had was homes/openhab.

This is where are my config files.

I am still not so sure where are located the application core files.

I would really appreciate if you could take a few more minutes to explain the bits that I am still missing or to guide me to a source of additional info.

Thank you in advance for your patience.


1 Like