FuguHub Your Personal File Sharing Solution

 

FuguHub

Manage Data Your Way

Installing FuguHub on the Synology DS110J NAS

The following installation tutorial was kindly provided to us by a FuguHub user.

The FuguHub team has not verified the instructions below.

This tutorial assumes you have a reasonable grasp of Linux, accessing the operating system of your NAS and are comfortable with applying modifications that may invalidate your warranty or options for technical support from Synology. This has only been tested on a DS110J, but in theory should work on any ARM based Synology device as they all run the same basic firmware (there may be slight differences in configurations of different devices, so you are encouraged to get to know your NAS before attempting any mods). A useful command reference is here: Basic_commands_to_get_around_the_Synology_Box_using_the_CLI and a list of ARM based Synology NAS devices is here: What_kind_of_CPU_does_my_NAS_have.

The basic steps are:

  • Setup your NAS to allow shell access (through the admin interface - follow the user guide)
  • Install bootstrap and IPKG
  • Use IPKG to install Adduser
  • Modify the inbuilt Apache server to use a different port or modify the FuguHub script once installed
  • Download and unpack the SheevaPlug version of FuguHub
  • Modify the daemon script
  • Run the install script
  • Fix the permissions
  • Start the server

Here are the details:

Before attempting to install FuguHub, you must modify your NAS. This entails applying a bootstrap and installing IPKG so that you can add additional packages from the command line. The detailed instructions for doing this are found at Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc.

Once you've got IPKG (which is good to have anyway), you need to install 'Adduser' and 'busybox' using (assuming you've logged in as root)

Ipkg install adduser Ipkg install busybox

Check that they installed correctly:

ipkg list_installed

Note that the Synology already comes with busybox, but depending on which firmware you have, it is better to update to the latest version. Busybox carries the 'addgroup' command that you'll need. You may also want to install nano as an easier to use text editor than vi.

Now, you'll need to decide what your preference is in terms of default interface. The Synology uses port 5000 for its admin interface, but uses the standard ports 80 and 443 for web server and PhotoStation. You can either move these on to an alternate port like 8080, or configure Barracuda to use alternate ports. If you want to do the former, you'll need to edit the following files:

/usr/syno/apache/conf/httpd-user.conf /usr/syno/apache/conf/httpd.conf

Look for the lines 'Listen 80' and change to an alternative port so that the lines read something like 'Listen 8080'. By doing this, access to the in-built web server and Photostation will require appending a ':8080' to the url. You can of course configure FuguHub to act as a reverse proxy by following these instructions: Running-two-web-servers-on-one-IP-address.

After modifying the Apache conf files you need to restart the Web server by issuing the command:

/usr/syno/etc/rc.d/S97apache-user.sh restart

If instead you'd rather run Barracuda on a different port, you'll need to modify the bdd script. We'll get to that in a moment.

Now that you have installed adduser, you can follow the basics of the SheevaPlug installation instructions. However, before you create the bd user, you will first need to create a daemon group as one does not exist by default on the Synology system. Do this by issuing the following command:

addgroup daemon

(if you don't specify a GID, the system will assign one)

The Synology system does not have a home directory, so it is best to create a home location for FuguHub on volume1. Thus, issue the following command

Mkdir /volume1/bd

Now go ahead and create a bd user, but specify the home directory (note this is a slightly different command from that suggested in the SheevaPlug install guide), i.e.

adduser -G daemon -h /volume1/bd -s /bin/ash bd

Note the shell for Synology is ash, not bash

Next, you need to download and unpack the SheevaPlug files:

cd /volume1/bd/ wget http://FuguHub.com/FuguHub.sheeva.tar.gz tar xvzf FuguHub.sheeva.tar.gz rm FuguHub.sheeva.tar.gz

Now, before installing, you need to make some mods to the bdd script. Use nano or vi

cd /volume1/bd/InstallDaemon nano bdd.sh

Edit the file to change the home location - look for the line

export BDHOME=/home/bd

and change it to

export BDHOME=/volume1/bd

At this point, if you decided earlier that you wanted FuguHub to run on a different port, you need to modify the line holding the daemon calling command.

Look for the line:

DAEMON="$BDHOME/bdd -d -u$BDUSER -h$BDHOME -r$BDWFS --threads $BDTHREADS \ --sessions $BDSESSIONS --connections $BDCONNECTIONS --pidfile bdd"

And change it to add in the port references like so:

DAEMON="$BDHOME/bdd -p8080 -s8443 -d -u$BDUSER -h$BDHOME -r$BDWFS --threads $BDTHREADS \ --sessions $BDSESSIONS --connections $BDCONNECTIONS --pidfile bdd"

where the -p and -s switches specify the http and https ports respectively.

Now run the install script and change the permissions as per the readme-sheeva.txt help file, viz:

./install.sh

Note you will get some errors, but that's fine, it doesn't affect the installation or the operation of the server.

cd .. chown -R bd /volume1/bd chgrp -R daemon /volume1/bd chmod -R o-w * chmod -R o-r * chown root bdd bd.zip chmod 750 bdd bd.zip

You should now be able to run the daemon by issuing the start command:

/etc/init.d/bdd start

It will also start automatically when you reboot. Point your browser at the ip address of the NAS making sure to strip off any port reference to the admin port (:5000) and either leave as a straight address if you moved the Synology web server or add the port of the FuguHub if you changed that and follow the setup procedure.