I’m going to describe how to set up Freenas with the popular plugins couchpotato, sickBeard or sickRage and transmission to use them for downloading movies or series and streaming them via DLNA as well as mounting the storage on Linux.

This post is also available in German!

I integrated SABnzbd! You’ll find a how-to in my other blog post

If you want to know how to setup Headphones, look here

With this setup, I manage my movie collection and my wanted movies with couchpotato, which uses transmission to download them. I also use SickRage to download TV series. Then I can stream them with the DLNA-server to my TV.

I’m running Freenas on a HP ProLiant G7 MicroServer N54L. Freenas itself is running on a micro-USB stick. I’m not going to describe how to download and install Freenas on the stick, as described in detail in the docs.

Table of contents

Configuration

After starting the server and waiting some minutes Freenas is available under a web-front end. The URL is a local IP-address, which is shown when Freenas has finished starting. After opening it, you’re presented with the installation wizard.

freenas_wizard

Choose your preferred language, timezone and key mapping, then press next. In the next step you can create a pool, but press skip, because we’re going to create one later.

The next step asks you to choose a directory service for authentication. If you already have one on your network, enter the details now, otherwise press skip again.

Skip the next step again, because we’re going to configure network shares later.

The last step is to configure mail, which you can also skip for now.

Now you’re done with the initial wizard and you should see this:

freenas_wizard_done

Press confirm.

Network settings

Next on we have to edit the network settings. Go to network > Global configuration. There you can change the name of your Freenas, set the default gateway, name server and so on. Since I use my server at home, I set the gateway and name server to the address of my router. If you want to, you can enable the netwait feature. If enabled, your server will ping the addresses in the IP list when it starts to check if a network connection is possible.

freenas_network_settings

General settings

There are some more settings that you should know about and edit. Open the System > General tab.

Let the Protocol option set to HTTP.

The next option defines the address and port your Freenas-installation listens to; set it to the IP-address the Freenas currently listens on. Set the HTTP-port to 80 and the HTTPS port to 443. Next on there are specific settings for your language, keyboard map and timezone. Set it according to your preferences.

If you’re not using a syslog server or directory service, leave the last two options empty.

freenas_network_settings_1

Overview of storages and jails

The next steps will include creating storages and jails. To get a better understanding on how these components will work together, my beautiful girlfriend created two diagrams that show how the magic happens.

The first image shows the storages and jails that I created and what jails can access which storages.

freenas_overview
The second image shows the steps that happen, when you want to download a movie or series via Couchpotato/SickRage.

freenas_download_overview

Creating storage devices

Now is the time to add some storage to your server. That is the most important part and you should carefully read the documentation the Freenas community offers. I will not go into detail on what volumes or RAIDs to use. It mainly depends on your needs and what you’ve got hardware-wise.

My use-case is a simple movie- and music-streaming server with no personal or private information saved on it.

To simply create a new empty volume and attach disks to it, open Storage > Volumes > Volume Manager, give your new volume a name, add your disks and configure the layout.

freenas_volume_manager

Creating datasets

To logically separate your files, e.g. movies from music, you can create datasets. These datasets can have separate permissions, quotas, etc. allowing you more control over your data.

I created datasets for every kind of data I want to manage: movies, series, music, downloads and torrent-files. To create a dataset click on your created storage, then hit the Create dataset-button (the one that looks like an excel-document with a plus). There, set the name for the dataset. You can ignore all other options for now, as they are for advanced users.

Changing permissions of the storage

Since there are many plugins and users who want access to your storage, you’ll have to configure the permissions for it. The best way is to set the ownership of the storage to nobody and give read/write/execute permissions to everybody. You should only do this, if you trust the users of your network. To change permissions, click on the Storage tab, select the volume you want to edit and click the first button in the bottom line that displays hard disks and a key. There, set the Owner (user) to nobody, the Owner (group) to nogroup and activate all buttons in the mode. Type of ACL should be set to Unix. Tick the box that says Set permission recursively so all other folders and files in the volume will have the same permissions.

freenas_permissions

Adding sharing options

Since I want to access my music and movie collection not only with my TV but also with the computers I’m using, I have to add sharing possibilities. Freenas offers NFS, CIFS and AFP out-of-the-box. I don’t have an Apple-gadget or Windows machine at home, so I’ll only need NFS.

NFS

To add a NFS-share click on Sharing > Unix (NFS) Shares > Add Unix (NFS) Share. There first add all the storages-directories in the Path options you want to share. You should create a separate share for every dataset. Next press the Advanced button, set the options Mapall User and Mapall Group to nobody and nogroup respectively.

freenas_nfs

When you’re done, you can mount the directories via NFS, the address is the IP-address of your freenas-installation plus the folder you shared, e.g.

192.168.0.102:/mnt/media/movies

Installing the plugins

Installing plugins is very easy, as long as you stick to the available ones provided by Freenas. In the Plugins-menu, click on the plugins and then on Install, to install them. Each plugin is installed into a jail, a separate “operating system” in Freenas itself, but we’ll get to that in the next section.

When you’re done, your plugin-page should look like this: freenas_plugins

Enabling access to the jails

SSH to your Freenas

You’ll likely need command-line access to your Freenas installation and to the jails as well. To enable SSH access to Freenas, go to Services and click on the screwdriver next to SSH. Tick the Login as root with password box and save the settings.

After that, open Services -> Control Services and enable the SSH-Service by clicking the red OFF-button. freenas_ssh

Now you’re able to connect to your Freenas with SSH by entering the following line into your terminal-emulator of choice:

ssh root@192.168.0.105

(change the address to the address of your Freenas)

Then enter the admin-password and you should be connected to your box.

Using Putty to enter your Freenas

If you’re on Windows and want to connect to your Freenas-installation using Putty, you have to enter the IP-address of Freenas into the Host Name-field, then press open.

putty

If Putty cannot connect, you probably didn’t use the correct IP-address or you forgot to enable SSH.

Entering the jails

To enter one of the installed jails, type jls on the command-line. There you’ll see the available jails. To connect to them, enter jexec # tcsh where # is the number of the jail.

[root@freenas] ~# jls
   JID  IP Address      Hostname                      Path
     1  -               bit_1                         /mnt/media/jails/bit_1
     2  -               couchpotato_1                 /mnt/media/jails/couchpotato_1
     4  -               ownbutt_1                    /mnt/media/jails/ownbutt_1
     8  -               dlna_1                        /mnt/media/jails/dlna_1
[root@freenas] ~# jexec 8 tcsh
root@dlna_1:/ #

Adding storage to the jails

Now we’ll have to add the storage to the plugins, so Couchpotato, transmission and the DLNA-server can access the same storage and work together. Since jails are separate systems in the server-OS itself, they cannot by default access other parts of your system.

To add the storage, go to Jails, click the plus next to the plugin, open the Storage tab and click Add storage. You’ll then have to enter the source and destination addresses.

The source is the storage or dataset you created in the first place. If you did not create datasets before, you either have to do this now or create normal directories as sources with mkdir on the server. The destinations are directories in the jails that get mapped to the storages outside the jails.

If the destination addresses in the jails do not exist, tick the Create directory-box. Here’s an example:

freenas_storage_jail

To manually create the directories, enter the jail, then you can create directories with the following command:

mkdir -p /media/downloads

Then enter the following command the get the permissions right:

chmod -R 777 /media/downloads

The following part is really tricky as Transmission, Couchpotato and SickBeard/SickRage behave very differently with the directories they download data to. I had to edited the following configuration multiple times, so be sure to stay up to date.

  1. Transmission: You need the download-directory where it downloads the data to.

    - Download-Source: /mnt/media/downloads
    - Download-Destination: /media/downloads
    
  2. couchpotato: You need the downloads-directory where transmission puts its data into; you’ll also need the movies-directory, where couchpotato moves the downloaded and renamed movies to.

    - Download-Source: /mnt/media/downloads
    - Download-Destination: /media/downloads
    
    - Movie-Source: /mnt/media/movies
    - Movie-Destination: /media/movies
    
  3. Sickbeard/SickRage: You need the series-directory where SickBeard puts its data into. - Series-Source: /mnt/media/series - Series-Destination: /media/series

    - Download-Source: /mnt/media/downloads
    - Download-Destination: /media/downloads
    
  4. Plex: You’ll need every directory where files are located that you want to play using DLNA, e.g. movies and series.

    - Movie/Series/Music-Source: /mnt/media/{movies|series|music}
    - Movie/Series/Music-Destination: /media/{movies|series|music}
    

Configuring the plugins

Now that you have added the storage to the plugins, you can finally start them. Go to the Plugins-page and click the red OFF-button of all plugins. After that, they should be listed as on.

You can find the IP-addresses of the plugins here: freenas_ip_addresses

Transmission

Open the Freenas Transmission settings. The Download-Permissions have to be 777 so every plugin has access to the downloads and can move them from there.

freenas_transmission_settings

Next open the transmission-address in your browser. You’ll see the main interface of Transmission. Click the screwdriver icon in the down left corner to edit the settings. There you’ll see the download to option. There insert /media/downloads.

transmission_settings

UPDATE: HolyK in the Freenas-forums mentioned a great front end for the remote transmission server, transgui. You can find it here or in your favorite package manager. It’s a nice replacement for the rather featureless web front end of transmission. It’s available for Linux and even Windows.

Transmission GUI

After you installed it, point it to the IP address of your transmission-server and then you can see the movies downloading and even add torrent- or magnet-links so they will be downloaded to you Freenas.

Couchpotato

Open the couchpotato-address in your browser. You’ll be greeted with the install wizard. Scroll down to advance in the wizard. Define a user name and password in the General section if you’d like and leave the port to 5050.

In the What download apps are you using?-section choose Transmission. As host enter the address of your Transmission jail (you can find the address in the jail-section of Freenas). Leave Directory empty so Couchpotato uses the transmission-default, which is /media/downloads.

couchpotato_transmission_settings

Scroll further down to Move & rename the movies after downloading? (skip the Are you registered at any of these sites?-part).

In the from-folder set the same folder you just used for the Transmission-directory (/media/downloads). The to-directory is where the renamed movies will be stored. Set it to the movie-source configured in the chapter Adding storage to the jails (/media/movies). Tick the Cleanup-box so leftover files will be removed after renaming the movies.

couchpotato_rename_settings

After that, scroll further down and click the huge red button and you’re done with the wizard.

On the main page of couchpotato, click the screw-icon in the lower left to get to the configuration-page. There are many things to tweak here, but I’m not going into detail about them. Right now you have to open the Settings menu. There in the general tab first click on Show advanced in the upper right. Scroll down, then enter 0777 in the fields Folder CHMOD and File CHMOD as shown below. If you do not do this, you probably will be getting an error-message later in Transmission, when downloading files (the download stops at around 4MB)!

couchpotato_advanced_settings_chmod

SickRage or SickBeard

Many people favor SickRage instead of SickBeard. When I initially wrote this guide, SickRage didn’t exist so I added it now to the guide. You can choose between installing SickRage and SickBeard (or even both!). If you want a comparison between them, take a look here.

For long-term updates choose SickRage!

SickRage

Install SickRage as usual and add the storages to the jail. Then open the web interface. The first thing you’ve got to do is to update it. After updating SickRage it will restart (if it doesn’t, restart by yourself from the freenas-frontend).

Back in the frontend again click the screws in the top right, in the drop-down menu on General. Here you’ll find the main settings. The important setting to change is Show root directories. Click new and choose your series-directory (/media/series). Last save the changes.

sickrage_general_settings

Now its time to a add downloader to SickRage. Click on the screw-icon > Search settings, then click on the Torrent Search-tab. There tick the box that says enable torrent search providers. In the drop-down-field under that choose Transmission. Then insert the IP-address of your Transmission-jail (including port, by default: 9091). In the Downloaded files location-field enter the Downloads-storage (/media/downloads/). Test the connection and save the changes. sickrage_torrent_search

The next step is to add providers for torrent-files, that we use to search for shows. Again, click on the screw, then Search Providers. The list shows all supported torrent-websites. The free providers are all the ones that have a little blue opened lock next to them!

The last thing to configure is the post-processing of downloaded shows. Open the settings and in TV Download Dir enter /media/downloads:

sickrage_postprocessing.png

Now searching and downloading shows should work with SickRage!

If you already have shows in your series-directories, you can now easily add them. Click on Shows in the upper menu, then Add shows and in the new windows, click Add existing shows: sickrage_add_shows

If all your shows are in a separate subdirectory, then it should look like this. By pressing Submit and afterwards filling out some information on each of your shows, SickRage will process these.

sickrage_add_existing_show.png

SickBeard

WARNING: I’m not using SickBeard anymore, so this my be out-of-date! Use with care.

Install SickBeard as usual and open the web interface. Since I currently only load movies with (free) torrents, there are some settings to make.

Open up the Search Settings tab in the config-tab. Disable the search for NZBs and enable the search for torrents. In the Torrent Black Hole enter the Torrent-Destination /media/torrentfiles* you configured in the jail-storage and save the changes. It should look like this:

sickbeard_search_settings

Then go to the Search Providers tab. There, check the box for EZRSS as it is the only free torrent search for series. If you are a member of any other torrent sites listed there, check the boxes for them and enter your credentials for this site. Again save the changes.

Next, go to the Post Processing settings. In the TV Download Dir, enter your Series-Destination /media/downloads and check the Scan and Process-box. You can also edit additional settings on this page but they are not important right now. In the end your settings should probably look like this:

sickbeard_post_process_settings

If you’re done, you can add new or existing shows and let them download!

Plex MediaServer

After installing the plugin, open the address of the Plexserver and you’ll be greeted with the End User License Agreement. Agree to it and the Server Setup will start. The Plex-Webinterface should find your Plexserver here: freenas_plex_add_server

Press next. Then you should add your media. Click add media and choose the storage-directories (/media/movies, /media/series) created earlier for the corresponding library type. After that click next and done and you’re finished! Now you should see the dashboard of Plex filling with your movies and music.

Conclusion

Now you are able to download movies and series with couchpotato and SickRage and transmission and once they’re downloaded, they are automatically available on you DLNA-server for further streaming.



Related posts: