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.
- Your Freenas IP will be listed at the bottom. If you want to change that just go into Network Interfaces. You'll select no to reset, no for DHCP, and then enter in the ip and subnet.
- Open up your web browser on your client machine and enter in the FreeNAS IP and give it a Password.
- Once logged in, Click System, Settings, Advanced and check these and hit OK.
- Click Email. Enter in the Outgoing mail server, check SMTP AUTH, put in username/password.
- Click network, enter in the gateway / name servers.
- Open up account--> users --> double click on root, enter email/password.
- Add user media
- Add a group named 'media' with Group ID: 816. (this is what the plugins are set up as)
- Click storage, ZFS Volume Manager. Give it a volume name.(i used 'v1') Click the + sign. Give it your desired volume layout. (RAID Z1, RAID Z2, etc). Click add volume.
- Click the volume you just created and click add dataset.
- Click Jails, Configuration. v1 is my volume name.
- Click Plugins, Available.. and Install transmission, Plex, CouchPotato, Sickrage. You can edit their IP Addresses through the jail interface afterwards.
- Once finished, click the install tab and make sure they're on.
- Next click the Services tab, turn on CIFS, and SSH (if needed).
- Click the wrench next to CIFS to enter guest account=media, Allow Empty Password = checked
- Click Sharing, Add Windows (CIFS) Share.
- Now go to your windows explorer, type in \\freenas and you see your CIFS share. Make sure you can create and delete things within it. Sometimes your DNS ip will change and you'll have to update the HOST IP. You can just put '192.168.1' but then everything on the network can access the share.
- Under \\freenas feel free to map the network drive so it's more accessible.
- In your media share create 4 folders: Movies, TV, Downloads, Torrents. With a TV/Movies folder in the Downloads folder. This is where transmission will be downloading the respective movie/tv files.
- Next, go to the jails. You'll want to add storage for each plugin jail. Here's the source/destinations. Just make sure it is mounted. [checked]
- Next open up shell on the left menu. We're gonna be giving permissions to each folder in the CIFS share. chown -R media:media /mnt/v1/media/* [This gives the media user permission to the CIFS folders]
- Once those are added you can start setting up the individual plugin jails by going to the JAIL IP:PORT. Or you can click the plugins on the left and then have it launch it for you. (except transmission).
[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:
- Click transmission on the left. Make sure Watch/Download folder are correct as well as the 777 permissions.
- Next go to your jails tab again and enter into the Transmission Command-Line Shell:
- Type: edit /usr/pbi/transmission-amd64/etc/transmission/home/settings.json and verify that "unmask = 0". Once finished, hit esc, leave, and save the changes. This might not be necessary anymore.
- Restart the Transmission plugin.
- If you'd like a remote gui this has a nice interface over the default one.
- Helpful Note: To view the transmission log.. open up the jail command line and put in "grep transmission /var/log/messages | less"
Plex Setup:
- Enter into the plugin, launch it, sign in through your username/password and give your media server a name.
- Add your Movies and TV storage location. ( /media/tv and /media/movies )
- Once in, click settings-->Server-->Remote access. Verify that your server is fully accessible to outside your network.
- Next go to library and have it updated automatically.
- Plex Logs: /var/db/plexdata/Plex Media Server/Logs
- 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.d/plexpy
- 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:
- Open the couchpotato command line and type:chown -R media:media /usr/pbi/couchpotato-amd64/share/couchpotato
- Open up CP and go to settings. In general make sure your settings are like so.
- My Quality Settings. I just look for 1080p mainly. (only check the box beside the qualities you want to keep.) Preferred: 1080p, DTS-HD, DTS, BluRay, AC3, English, x264, 720p Ignored: HQCAM, CAM, german, dutch, french, truefrench, danish, swedish, spanish, italian, korean, dubbed, swesub, korsub, dksubs, vain, HC
- Go to searcher and add all the torrent/nzb providers you wish.
- Click Downloaders and setup transmission. Make sure to hit "test" to test it.
- Go to renamer and setup your to and from folder for your media. Leaving it as 'copy' is safe to start out at because if it tries to move the file and there's a permission error it will just delete the movie. Once I have copy working I change it to move so that I don't have a bunch of files sitting in Downloads/Movies.
- If still having permission issues
Sickrage Setup (Torrent Version):
- Open the Sickrage command line and type: chown -R media:media /usr/pbi/sickrage-amd64/share/sickrage
- Go to search settings, torrent search and set it up like so.
- Check your search providers
- Click post-processing and set it up like so as well as episode naming.
- Now just add shows.
- My quality settings.(I only want to keep 1080p)
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:
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
38 comments
Great guide. Thanks for taking the time to make it!
ReplyDeleterm -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
ReplyDeleteusername???
password??
never mind, my fault. If command input exactly like you indicated, nothing is asked.
DeleteRunning FreeNAS-9.2.1.4.1. I actually copied and pasted the commands and I still get the username/password prompt.
DeleteActually, it looks like the repo has been removed.
DeleteUse echel0n's sickrage instead, using these commands:
Deleterm -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.
rm:no match ?
DeleteI'm getting the same error, I want to install sickrage so badly
DeleteI 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!!!
ReplyDeleteI 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?
ReplyDeleteyour guide is good it help me out alot keep up the good job
ReplyDeleteHi Supa,
ReplyDeleteYou 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
I'm using IPMI to access it through my desktop computer. I have a NAS though.
DeleteThis comment has been removed by the author.
ReplyDeletePretty sure it's a permissions thing. Try chown -R of all the folders.
DeleteHello Supa,
ReplyDeleteFirst 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!
This comment has been removed by the author.
ReplyDeletewill 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
ReplyDeleteIf 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.
ReplyDeleteThanks 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!
ReplyDeleteI 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.
DeleteI 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
DeleteThe 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?
ReplyDeleteUse sickrage. He updated the guide for sickrage, it's in 9.3 plugin list.
DeleteGreat 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.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteTruth is .. I still don't understand it all. This is just my notes lol
DeleteHi, 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.
ReplyDeleteThis comment has been removed by the author.
ReplyDeletedead link at the top, "check these are hit OK" http://img20.imageshack.us/img20/8863/489u.png
ReplyDeletewould 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?
ReplyDeleteHow did you configure SABnzdb? im getting completely confused with the storage, download, complete, incomplete and watch folders config.. please help!!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWill this work without the CIFS share? I don't care about being able to access the files outside of plex.
ReplyDeleteI 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?
ReplyDeleteJust wanted to say thanks for keeping this updated and with new additions.
ReplyDelete"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.
ReplyDeleteGood 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