Newbie~Noob Guide to FreeNAS, Plex, CouchPotato, Sickbeard (Torrent / Pirate Bay Version), and Transmission (FreeNAS 9.3.X)

By Zack - March 04, 2014

*NOTE* This is my newb guide. I'm a new too! If you don't trust anything here, look it up in the WIKI!!!! After multiple installs and multiple headaches I decided to write this for myself and others ;)  Be aware this isn't the most secure. It's using a user with full permissions and no passwords.

  • Buy the right hardware. Test it to make sure it works. (HDD's, ECC RAM, ETC)
  • Installing and upgrading FreeNAS (Make sure your USB drive is greater than 8 GB). On FreeNas 9.3 you'll need either 2 USB drives/cd drive... or a motherboard with IPMI to mount the boot image.
  • To fiddle with BIOS or the Console Setup you'll need a motherboard with IPMI (the best case scenario), a cpu with integrated graphics, or a cheap GPU. IPMI allows you to just control it via your desktop/laptop computer. You set up the BMC for IPMI in the BIOS. If you don't have a display, you can type "arp -a" in the windows command prompt to see if the IPMI IP Address is listed. Then just put that into your address bar and log in. Your motherboard should have information in the manual for it too.

[How-To] Giving Plugins Write Permissions to Your Data

  • Plugin -- UID -- Data-Directory list. If you ever have to re-install you can backup the /var/db/PLUGIN folder and restore it after an install.
  • If deleting plugin and re-installing make sure to : rm -r /var/run/PLUGIN
  • For CP I had to remove windows ACLS. (When you look at the directory, ls -l if the permissions have '+" signs on them it means they're enabled. To remove them recursively you can run this command: find . -type d -exec setfacl -b {} \;
  • For CP I had to run these group commands listed in the link above as well... 
  • pw groupadd -n media -g 816
    pw groupmod media-m media
Transmission Setup: 
Plex Setup:  
    • Add PlexPy Jail (you can also install it within the PMS Jail if you wish)
    • Open the shell through plexpy.
    • pkg install python2 databases/py-sqlite3 security/py-openssl security/ca_root_nss git
    • cd /usr/local/share/
    • git clone https://github.com/drzoidberg33/plexpy.git
    • chmod 777 plexpy or to allow one user: chown -R user:group plexpy
    • cd plexpy
    • python2 PlexPy.py
    • PlexPy will be loaded in your browser or listening @ http://localhost:8181 (http://192.168.1.xxx:8181)
    • To automate the PlexPy script just do this (in root directory):
      • cp /usr/local/share/plexpy/init-scripts/init.freenas /etc/rc.d/plexpy
      • chmod 777 /etc/rc.d/plexpy
        • edit /etc/rc.d/plexpy
          • edit the following line: ${plexpy_user:="xxxx"} I just used 'root'
      • edit /etc/rc.conf and add plexpy_enable="YES" to another line.
      • Restart the plexpy jail
      • service plexpy start or service plexpy stop or service plexpy status can now be run
    • If you get this error: env: python: No such file or directory
      /etc/rc.d/plexpy: WARNING: failed to start plexpy
       , just edit the first line in plexpy.py from
      #!/usr/bin/env python  to  #!/usr/local/bin/python2.7

CouchPotato Setup: 
Sickrage Setup (Torrent Version): 
Sickrage --> Sickchill

service sickrage stop
then
rm -r /usr/pbi/sickrage-amd64/share/sickrage/SickRage
fetch --no-verify-peer "https://github.com/SickChill/SickChill/archive/master.zip"
unzip master.zip
mv SickChill-master /usr/pbi/sickrage-amd64/share/sickrage/SickRage
chown -R media:media /usr/pbi/sickrage-amd64/share/sickrage/SickRage
rm master.zip
service sickrage start
Probably a change of git_remote_url to https://github.com/SickChill/SickChill.git in /var/db/sickrage/config.ini (always inside the jail) is needed for future updates.

Backing Up Plugins

Easiest way for me is creating cron jobs honestly.

Create a backup folder on your cifs share
Plugin Backup Folder Locations:
  • Plex: /mnt/v1/jails/plexmediaserver_1/var/db/plexdata/ 
  • Sickrage: mnt/VolumeData/jails/sickrage_1/var/db/sickrage/config.ini 
  • Couchpotato: mnt/VolumeData/jails/couchpotato_1/var/db/couchpotato/settings.conf 

In the FreeNAS Shell, run the following commands (Could also use scripts/cron jobs):
  • CouchPotato 
    • Backup 
      • cp /mnt/v1/jails/couchpotato_1/var/db/couchpotato/settings.conf /mnt/v1/media/Backups/ 
    • Restore 
      • cp /mnt/v1/media/Backups/settings.conf /mnt/v1/jails/couchpotato_1/var/db/couchpotato/ 
  • SickRage 
    • Backup 
      • cp /mnt/v1/jails/sickrage_1/var/db/sickrage/config.ini /mnt/v1/media/Backups/ 
    • Restore 
      • cp /mnt/v1/media/Backups/config.ini /mnt/v1/jails/sickrage_1/var/db/sickrage/ 
  • Plex 
    • Backup 
      • tar cvfz /mnt/v1/media/Backups/plexdata.tar.gz plexdata /mnt/v1/jails/plexmediaserver_1/var/db/
    • Restore 
      • tar xvfz /mnt/v1/media/Backups/plexdata.tar.gz /mnt/v1/jails/plexmediaserver_1/var/db/
Running PIA (Private Internet Access) through Transmission
  • When the blue screen pops up just make sure to hit enter. The 2 fields should already be checked.
  • Script Jafrey made on Gist
  • Source Thread
  • Verifying it's connected to the VPN you can use THIS METHOD or THIS. I'm sure there's other ways as well. Just hit activate under the torrent IP section.
  • If you want to change the location, just do this in the transmission jail.  
  • Use "wget http://smart-ip.net/myip -O - -q ; echo" to view what ip it's going through.
  • "ls -l /usr/local/etc/openvpn" will give a list of locations you can use.
  • If you're getting "Sorry, 'Auth' password cannot be read from a file", Exiting. You'll probably have to "pkg remove openvpn" and re-run the script.  See Here.

SSH/FTP SETUP: 

Optional Settings: 
Helpful Commands:

- To change user/group of a folder/file:

chown -R user:user */file of folder/


- Cron job log --> /var/log/cron

- Stripping Windows ACL's from folders (recursively)

find . -type d -exec setfacl -b {} \;

- To change permissions of a folder/file:

chmod -R 777 */file or folder/

- To enter a jail

jls (lists the jails and the jail #)

jexec # tcsh (enters the jail)

How to set the default text editor (pkg install nano):

$ setenv VISUAL /usr/local/bin/nano
$ setenv EDITOR /usr/local/bin/nano


How to set the default editor permanently:

$ echo "setenv VISUAL /usr/local/bin/nano" >> ~/.cshrc
$ echo "setenv EDITOR /usr/local/bin/nano" >> ~/.cshrc



zpool status

zpool iostatus


ls -l (lists the files and the groups/users/permissions)


nano /var/log/messages (view the log from freenas)


In Shell you can type "tail -f /var/log/any_log_name"


rm -r (to delete a folder or file) ~ rm = remove, -rf = recursive forced mkdir = make directory

  • Share:

You Might Also Like

38 comments

  1. Great guide. Thanks for taking the time to make it!

    ReplyDelete
  2. rm -r /usr/pbi/sickbeard-amd64/share/sickbeard/Sick-Beard /usr/pbi/sickbeard-amd64/etc/sickbeard/* && git clone https://github.com/mr-orange/Sick-Beard.git /usr/pbi/sickbeard-amd64/share/sickbeard/Sick-Beard

    username???
    password??

    ReplyDelete
    Replies
    1. never mind, my fault. If command input exactly like you indicated, nothing is asked.

      Delete
    2. Running FreeNAS-9.2.1.4.1. I actually copied and pasted the commands and I still get the username/password prompt.

      Delete
    3. Actually, it looks like the repo has been removed.

      Delete
    4. Use echel0n's sickrage instead, using these commands:

      rm -r /usr/pbi/sickbeard-amd64/share/sickbeard/Sick-Beard /usr/pbi/sickbeard-amd64/etc/sickbeard/* && git clone https://github.com/echel0n/SickRage.git /usr/pbi/sickbeard-amd64/share/sickbeard/Sick-Beard

      This has TPB support and is actually being updated, also contains some other nifty features.

      Delete
    5. I'm getting the same error, I want to install sickrage so badly

      Delete
  3. I have watched so many how to video's and read publication's until I couldn't see straight. This is by far the best info I have found for Freenas,. Thank you so much for your time!!!

    ReplyDelete
  4. I fallowed your instructions for the sickbeard install and I cant get it to update. Says "error: Your local changes to the following files would be overwritten by merge:" and then lists a bunch of files. Any ideas?

    ReplyDelete
  5. your guide is good it help me out alot keep up the good job

    ReplyDelete
  6. Hi Supa,

    You mentioned you have this setup on your Windows 8 machine. Can you tell me if you are using this with Virtual machine or any other setup?

    Thanks

    ReplyDelete
    Replies
    1. I'm using IPMI to access it through my desktop computer. I have a NAS though.

      Delete
  7. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Pretty sure it's a permissions thing. Try chown -R of all the folders.

      Delete
  8. Hello Supa,

    First of all thank you for sharing your experiences and insight in to configuring Freenas. I managed to get sickbeard, plex and transmission working (still testing couchpotato). However I noticed that I lost access to my CIF share through file explorer (while I am positive it worked before), whenever I try to open my media folder it prompts me for a login.

    Any idea whats going on?

    Thanks in advance!

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. will this version of sickbeard work the freshon.tv?? i have found a post showing how to create an rss from freshon, that said it would work with the pirate bay edition

    ReplyDelete
  11. If you have problems mounting storage for your jails, it's a bug in 9.2.1.6 and 9.2.1.7 (they said they will fix it in 9.3). Basically you have to mkdir downloads and mkdir tv etc... when you are in the jails' media directory from shell.

    ReplyDelete
  12. Thanks for these really great directions. I was hoping for a bit of help, I don't seem to have the permissions correct. I can't create folders from Windows, nor can Sickbeard create folders for shows. Any help would be greatly appreciated! @Kevin - thanks for your tip, I had been stumbling through figuring that out a few times, but now I can consistently make shares!

    ReplyDelete
    Replies
    1. I went through and re-did the users and groups, and reset the owner of the folders - and that helped SickRage create show folders. Transmission still cannot write to the /media/downloads share folder though.

      Delete
    2. I think I had that same issue at one point and I'm trying to remember what I did.... Can you make sure all the jail storage is mounted? http://i.imgur.com/bVE1jQf.png

      Delete
  13. The versions of sickbeard the comes with freeNAS now is too new for this to work. Any ideas how to install an older version of sickbeard?

    ReplyDelete
    Replies
    1. Use sickrage. He updated the guide for sickrage, it's in 9.3 plugin list.

      Delete
  14. Great guide! Thanks for your time with this one. It helped alot. With Freenas 9.3 out, it would be handy to have a new updated guide.

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Truth is .. I still don't understand it all. This is just my notes lol

      Delete
  16. Hi, just wondering. At the moment I've got couchpotato, SickRage and headphones all setup on a Windows machine downloading through utorrent. Everything is totally automated down to the renaming and file moving into specific folders. My question is.... Would this setup also be totally automated to the point I can stick the nas in a cupboard and forget about it? Watch my TV shows and movies through plex and add movies and TV shows from my phone as I do now? Also what about running a vpn? How would that work? Thanks.

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. dead link at the top, "check these are hit OK" http://img20.imageshack.us/img20/8863/489u.png

    ReplyDelete
  19. would love to see a version with sonarr. But is it possible you could update the pictures links? or maybe make a video for us real n00bs?

    ReplyDelete
  20. How did you configure SABnzdb? im getting completely confused with the storage, download, complete, incomplete and watch folders config.. please help!!

    ReplyDelete
  21. This comment has been removed by the author.

    ReplyDelete
  22. Will this work without the CIFS share? I don't care about being able to access the files outside of plex.

    ReplyDelete
  23. I am having a bit of trouble getting my plex clients connected to the plex server when the plex server is under the VPN. Is there any whitelist or port forwarding I can do to let clients on my LAN connect?

    ReplyDelete
  24. Just wanted to say thanks for keeping this updated and with new additions.

    ReplyDelete
  25. "Once logged in, Click System, Settings, Advanced and check these and hit OK." the link to the image for 'check these and hit OK.' is broken.

    ReplyDelete
  26. Good way of telling, and pleasant article to obtain information concerning my presentation subject, which i am going to convey in institution of higher education

    ReplyDelete