Skip to content

Instantly share code, notes, and snippets.

Created March 4, 2014 16:26
Show Gist options
  • Save marlun78/9349792 to your computer and use it in GitHub Desktop.
Save marlun78/9349792 to your computer and use it in GitHub Desktop.
# How to install `ipkg` on a Synology DS214
After a couple of days of trying to get `ipkg` woking on my DS214 I found [this article]( by [trepmag]( It is written for the DS213j, but it’s been working for me and [others]( for the DS214 too.
I have done some minor changed to clarify some things, but if you are a Linux guy (unlike me) my changes might be of no use to you.
## Guide
### SSH
You need to have enabled `ssh` on your DiskStation. Then open up your terminal and type:
$ ssh root@[your-ds-ip]
Read more about how to setup SSH on your DiskStation [here](
### Create optware root directory
$ mkdir /volume1/@optware
$ mkdir /opt
$ mount -o bind /volume1/@optware /opt
### Setup ipkg
$ feed=
$ ipk_name=`wget -qO- $feed/Packages | awk '/^Filename: ipkg-opt/ {print $2}'`
$ wget $feed/$ipk_name
$ tar -xOvzf $ipk_name ./data.tar.gz | tar -C / -xzvf -
$ mkdir -p /opt/etc/ipkg
$ echo "src cross $feed" > /opt/etc/ipkg/feeds.conf
### Set PATH
Open `/etc/profile`:
$ vi /etc/profile
Type `i` to enable insertion mode. See more `vi`-commands [here](
Add `/opt/bin:/opt/sbin:` to the `PATH` variable.
Then press `ESC` and press `ZZ` to save and exit.
If you are signed in as `root` as I was, you need to do the same to the `/root/.profile` file - then:
$ source /root/.profile
### Create init scripts
The following steps will allow to automatically bind the /volume1/@optware directory to /opt and trigger the /opt/etc/init.d/* scripts.
Create the /etc/rc.local (chmod 755):
$ touch /etc/rc.local
$ chmod 755 /etc/rc.local
$ vi /etc/rc.local
# Optware setup
[ -x /etc/rc.optware ] && /etc/rc.optware start
Then press `ESC` and press `ZZ` to save and exit.
Create the `/etc/rc.optware` file (chmod 755):
$ touch /etc/rc.optware
$ chmod 755 /etc/rc.optware
$ vi /etc/rc.optware
#! /bin/sh
if test -z "${REAL_OPT_DIR}"; then
# next line to be replaced according to OPTWARE_TARGET
case "$1" in
echo "Starting Optware."
if test -n "${REAL_OPT_DIR}"; then
if ! grep ' /opt ' /proc/mounts >/dev/null 2>&1 ; then
mkdir -p /opt
mount -o bind ${REAL_OPT_DIR} /opt
[ -x /opt/etc/rc.optware ] && /opt/etc/rc.optware
echo "Shutting down Optware."
echo "Usage: $0 {start|stop|reconfig}"
exit 1
exit 0
(source: a working optware env)
I had trubbles copy/paste this code from Github and insert it into `rc.optware` with the `vi` editor and I had to go line by line to get it in correctly.
### Finaly
Reboot the DiskStation and you should be done!
As I said, I’m not a Linux guy, so if you spot a misstake, please let me know.
I hope this helps!
Good luck!
Copy link

Awesome, the detailed steps helped me install it on my station. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment