Wednesday 24 October 2018

How to Setup Emby Media Server in an iocage Jail on FreeNAS 11.1

بسم الله الرحمن الرحيم


Abstract



Tutorial on how to setup Emby Media Server in an iocage Jail on FreeNAS 11.1.


Assumptions and Prerequisites



  • OS: FreeNAS 11.1-U6
  • FreeNAS Host: fn
  • FreeNAS Network Interface: igb0
  • FreeNAS IP: 10.0.0.2
  • FreeNAS Subnet Mask: 24
  • Jail Container: iocage
  • iocage Version: 1.0 Alpha
  • Jail Release: 11.1-RELEASE
  • Jail Name: emby
  • Jail Network Interface: vnet0
  • Jail Network Config: DHCP
  • Jail Default Route: 10.0.0.1
  • IP Version: IPv4
  • Bridge Network Interface: bridge0
  • DNS 1: 10.0.0.1 
  • Domain: example.com
  • ZPool Volume: tank
  • Dataset: /mnt/tank/movies
  • Emby Server Version: 3.5.3.0
  • Setup iocage Jail


Create a Dataset on FreeNAS and Set Permissions


Create dataset 'movies' on FreeNAS as windows type




Set dataset 'movies' user owner as 'mujahid(uid:1000)' and group owner as 'media(gid:8675309)'. And set these permissions recursively.



Mount Dataset in Emby Jail with Read/Write Permissions


root@fn:~ #  iocage fstab -a emby /mnt/tank/movies /mnt/movies nullfs rw 0 0


Installation 


Login/Console into Emby Jail



root@fn:~ # iocage console emby


Go to https://emby.media/freebsd-server.html to look up the instructions and release version on how to install the latest emby package.

Install Dependency packages for Emby Server


root@emby:~ # pkg install mono libass fontconfig freetype2 fribidi gnutls iconv opus samba48 sqlite3 libtheora libva libvorbis webp libx264 libzvbi


Install Emby Server 


root@emby:~ # pkg add -f https://github.com/MediaBrowser/Emby.Releases/releases/download/3.5.3.0/emby-server-freebsd_3.5.3.0_amd64.txz


Create group 'media' with gid:8675309 in the emby jail. Make sure the gid is the same as the gid on the FreeNAS host for the 'media' group. Then add the 'emby' user to the 'media' group on the emby jail as a member. This will make sure emby has group read/write permissions to the 'movies' dataset on the FreeNAS. Note: The group 'media' on the FreeNAS and the emby jail should have the same gid(8675309), otherwise the permissions won't work properly.

Create group 'media' with gid:8675309 
root@emby:~ # pw groupadd -n media -g 8675309

Add user 'emby' to group 'media'
root@emby:~ # pw groupmod media -m emby

Enable Emby to run at boot


root@emby:~ # sysrc emby_server_enable="YES"


Start Emby Service


root@emby:~ # service emby-server start


Run Emby Server Setup Wizard



Open your web browser and visit http://[IP ADDRESS]:8096 to run the Emby Server setup wizard.


Resource Links

1 comment:

mackenzeijams said...

The Classic Titanium Shave Tool - iTanium Art
The Classic titanium hoop earrings Titanium titanium tv alternative Shave titanium boiling point Tool is a piece of equipment that allows you to create your 4x8 sheet metal prices near me own unique razor head. babylisspro nano titanium hair dryer This is an integral part of every