Getting started with YouTransfer on Synology

YouTransfer is not only suitable as an enterprise file sharing solution, it can also be used at home! If you have a Synology NAS, you can have your own personal private file sharing solution up and running in less than 5 minutes. This getting started guide will help you configure your Synology DSM in a step-by-step tutorial.

Heads up: this article assumes that you have the latest version of Synology DSM 5.2+ and have already configured the device (incl. storage configuration)

Installing Docker

Synology DSM 5.2+ now fully supports docker, making it easier to install and run 3rd-party applications without the need for Synology specific support.

You can install Docker from the Synology Package Center:

Installing Docker using Synology Package Center

Once Docker is installed, you can access the application from the Main Menu. If you want, you can add a shortcut to your Sinology desktop.

Accessing Docker from the Main Menu

So how does Docker work? To some extend, Docker is exactly like the Synology Package Center. It will allow you to search for supported applications that are listed in the Docker Hub, the Docker counterpart of the Package Center repository. Once you've found an interesting application, like YouTransfer, you can download and run it using the Docker web interface on your Synology DSM.

The main difference between Docker and the Synology Package Center is the amount of available packages. Docker is not specific to your Synology system: the applications that are hosted on the Docker Hub are compatible with a variety of systems. Which is also why there are more applications available. This tutorial will only focus on installing YouTransfer, but it is highly recommended to check out other applications listed on the Docker Hub.

Installing the YouTransfer image

After opening the Docker application in Synology it will tell you that there are no running containers. When you click on the Container menu item a similar blank screen appears telling you that no containers have been created an that you should go to the Image tab. The Image tab will complain about the fact that you haven't downloaded any images. Yes, this sounds cumbersome and yes, the interface is somewhat confusing.

To make a long story short: go to the Registry tab and search for YouTransfer.

Search for the YouTransfer image

As you can see there are already multiple YouTransfer versions available. Don't you just love open source software? For now we'll select the official YouTransfer image (remie/youtransfer) and press the Download button. Docker will now ask you which version (or Tag) of the YouTransfer image you want to install.

Selecting the YouTransfer version

You can opt for the latest tag, but this will include unstable pre-release versions. It will give you additional features, but it might cause the application to malfunction. For regular use, it's recommended to select the stable version.

After selecting the tag Docker will add YouTransfer to the Image tab list and start downloading the image. Docker images are precompiled, so once it finished downloading you're all set. Click on the Launch button to open the Create Container modal window.

The Create Container modal

Type in a meaningful name for your Docker container and make sure to map the local port with the container port. In the above screenshot, the container port 5000 is mapped with port 80, which is the default port for hosting websites. Unfortunately, you can't map the container port 5000 with local port 5000 as this is the default port for the Synology DSM web interface. If you don't know which local port to choose, just stick with 80.

Click the Next button, which will bring you to step 2. You can skip this part of the Create Container modal, unless you really want to create a shortcut on your desktop.

Heads up: although it may be tempting to press the big blue Apply button in the Summary screen, there are still some advanced settings that need to be configured.

In the Summary screen, press the Advanced Settings button in the top right corner. This will open an additional modal window which will allow you to map local folders to the Docker container. By default, Docker images do not have persistent storage. Any data transmitted to the Docker image will be deleted once the Docker image is stopped.

To persist data in the Docker image, you'll need to mount a local folder to the Docker container. Click on the Add folder button and create a folder called config on your local file system. Select this folder and press select.

Adding config folder mapping

This folder should be mounted at /opt/youtransfer/config and must be writable. Repeat this for the uploads folder. Finally, you should end up with something like this:

Configuration of volume mount points

Just to be clear: the config and uploads folders can be placed anywhere on your file system. They do not need to be in a specific Docker folder. This is the default location and as such used in this tutorial.

Click OK to return to the Summary screen, which should look similar to this:

Final summary screen for YouTransfer Docker container

Click apply to return to the Image tab.

It could be that you will get a warning message about the fact that the local port configuration conflicts with other ports used by other services. This means that the local port 80 which we previously selected in Step 1 is already in use. Go back to the Create Container modal window and change the local port from 80 to 8080. Repeat this until you've found a port which is not yet in use.

Now that you've configured your image, you can go to the Container tab and start the YouTransfer Docker container. Once it started, you can double click on the container to get more details.

YouTransfer container is running!

If all went well, you can now access YouTransfer in your browser by going to http://[Synology-ip-address]:[local-port]/, which in the example resolves to http://10.0.0.16:8080/. Et voila!

YouTransfer is up and running

You're YouTransfer instance is ready to share some files.
Make sure to configure the instance by clicking on the Settings button in the bottom left corner.

Accessing files

You might want to be able to access uploaded files from you Synology File Station, just to make sure that the files are persisted.

Remember the two folder that we mounted to our Docker container? When uploading files, they will be stored in one of those folders on your local filesystem. The one that was mapped with /opt/youtransfer/uploads to be precise.

To demonstrate this, I've uploaded a dummy file to the Synology instance. The file is stored in the /Synology/docker/youtransfer/uploads folder which I configured in the Advanced Settings modal window:

Files are stored in the uploads folder

As you can see, the files names are somewhat cryptic. This is because YouTransfer stores all uploaded files using their unique token instead of their actual filename. Once downloaded, YouTransfer will make sure that their original filename is restored. Either way, you can rest assured that the files are now persisted on your Synology system and protected by whatever DSM storage type you selected.

Conclusion

Installing YouTransfer on the Synology DSM system using the Docker application is really easy. It will turn your local storage into an online file sharing platform for friends and family. All you need to do is send them a link to your system (incl. the port number) and you're good to go!

Bonus tip: If you worry about security, you can set-up a separate Docker container with nginx or Apache Httpd server as a reverse proxy with SSL enabled. This will be subject of another blog post, so make sure to check http://blog.youtransfer.io or follow our Twitter account to receive updates on new blog posts!