Synology NAS installation tutorial
This tutorial is designed to help you install ubooquity on a Synology NAS. Initial tutorial has been written quite a long time ago, by Matthew Sanders and the information it contained had become outdated. This updates should work for:
- Synology NAS running DSM6.0 version and more recent
- ubooquity v2.1
I recommend that you assign a static local IP address to your server through your router. This enables you to bookmark the Ubooquity web interface.
In this tutorial, 192.168.1.2 is used as an example of local IP for a Synology NAS. Replace it with your own.
- Synology brand NAS
- A Synology model capable of running the Java. Most recent models would run Java manager, check this page for a list of applicable models. If your model is not listed try installing Java using this separate tutorial.
- Internet access
- Synology DSM version 6 or greater (although the ssh procedure would work with DSM version 5)
- Install Java JRE 8 or greater on your server,
- Create a shared folder to serve as repository for all your comics and books
- Download the Ubooquity jar to a convenient place on your server,
- Tell you box to run ubbooquity on boot, 2 options here:
- Create an Upstart script in /etc/init (requires ssh access to your box),
- Use Synology’s task scheduler (requires DSM6.0 at least)
- Use the web interface to configure Ubooquity
ssh procedure was tested on Synology ds215j, running DSM 6.0.2-8451 Update 4) Java Manager application is not available on tested DSM SW/HW combination. Luckily it’s not necessary because Synology issued packages Java7 and Java8 that are platform specific so the process is even simpler. Just install the Java package and skip to next step. Ubooquity 1.10.1 definitely works with Java 8.
ssh procedure tested on Synology ds418+, with DSM 6.1 and Ubooquity 2.1.1 task scheduler procedure tested on synology ds418+ [see forum]
Prepare Synology NAS
- Use the Java Manager app supplied by Synology to install the latest JRE
- Create a shared folder as repository for all comics and ebooks files
- upload you comics/books to the shared folder
Open the webadmin interface 192.168.1.2:5000. Log in to the DSM and open the Control Panel
Open the Package Center and install the Java Manager.
Open the Java Manager application and follow the instructions to download the most recent Java SE Development Kit for your server architecture then choose the archive you downloaded and use it to install Java.
Create shared foled
- Create a shared folder titled “Comics”.
- Upload your comics to the shared folder, using ‘file manager’ for example
** note ** Ubooquity is not doing any management of the files/folder structure: you should pay attention to the way you arrange your comics in the folder as ubooquity will use the folder structure to determine the grouping it useswill display. In my setting I use one folder for each serie.
(option 1) Procedure with upstart script
- ssh must be anabled on your box for this procedure
if not already done: enable ssh access on your box
- Open the webadmin interface 192.168.1.2:5000. Log in to the DSM and open the Control Panel
- Open the Terminal & SNMP tab and enable the SSH service.
For security: it is usually recommanded to modify the ssh port to somthing less usual if you want to ssh your box from internet
- SSH in to your server using your admin password, but as the root user
- Browse to /var/packages/, download the Ubooquity archive, and Unarchive Ubooquity.zip
- Create an upstart script in /etc/init and start the jar
UPDATE DSM 6 Login with root is not possible anymore on DSM 6. Replace step 2 with the following 3 steps
- Login with admin and your admin password
- enter; sudo -i
- enter your password
- If you are using Windows download and run the Putty SSH client.
- Connect to your server through SSH at 192.168.1.2 then log in as the root user using the admin password. That is the same user you used to log in to the Synology DSM web interface.
- Browse to /var/packages/ using the command cd /var/packages
- Create the Ubooquity directory then enter it with
[ -d Ubooquity ] || mkdir Ubooquity && cd Ubooquity
- Download the Ubooquity archive with
wget -O ubooquity.zip http://vaemendis.net/ubooquity/service/download.php
- Unzip the archive then remove it with
7z x ubooquity.zip && rm ubooquity.zip
- Move to the Synology Upstart services directory (all services listed in this directory are started on boot) with
- Download the Ubooquity service script with
- Make the service script executable with
chmod 755 ubooquity.conf
- adapt the script to your environment if needed; you need to know vi to do this from ssh terminal; alternatively you can edit the script in your prefered text editor and then copy the modified script to cd
The Ubooquity service is now installed. It will start on boot and you can start or stop it at anytime using
start ubooquity or
stop ubooquity. You can also see the status of the ubooquity processs unsing
NOTE if Java8 is used
If you used Synology Java8 package instead of Java Manager then the service script will have the wrong path to the java binary. Edit the
/etc/init/ubooquity.conf and change path to java binary from:
exec /var/packages/JavaManager/target/Java/bin/java -jar -Xmx1024m /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -workdir "/volume1/Comics/Ubooquity"
exec /var/packages/Java8/target/j2sdk-image/bin/java -jar -Xmx1024m /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -workdir "/volume1/Comics/Ubooquity"
(option 2) Procedure with task scheduler
- requires DSM 6.0 or greater
- create ubooquity.sh script and save it on your box
- use task manager to tell your box to launch the script on startup
- Download the Ubooquity service script and save it on your server.
You can start with the file here ubooquity.sh
adapt the script to your environment and save it as ubooquity.sh on your server.
go in control panel, open ‘task manager’
- create a task in “planned tasks” with 2 options
- launch on boot
- use the script “ubooquity.sh” file from above
That’s it! it should start ubooquity automatically eveytime you restart your box To start ubooquity now without having to restart your box, simply run ‘execute’ from the web interface
- Browse to the Ubooquity administrator page
- Set the admin password
- Add your comics directory, enable OPDS then initiate a scan
- The Ubooquity web interface should be running at
192.168.1.2:2202. Go to
192.168.1.2:2202/adminand you will be asked to set the administrator password. Set the password.
- Edit the comics settings and add
/volume1/Comicsin the shared directory text area.
- Edit the advanced settings. Enable OPDS and add
.*Ubooquityto the scan exclusion pattern.
- Scroll to the top of the admin page to the General area and click ‘Launch new scan’. Your comics are now available at
192.168.1.2:2202and should be bookmarked.