Jump to content

FreeNAS plugin


Luke

Recommended Posts

edevils

Hi!

 

Are there plans to write up an up-to-date step-by-step FreeNas-Emby plugin install guide?  I've fumbled around and have made progress, but I'm stuck when it comes to creating a jail for the plugin.  Furthermore, I've done so much troubleshooting, that I'm unsure as to where I stand anymore in the process besides the fact, that I have the plugin installed and smb sharing setup so my client can move files to the NAS using Windows 10.. 

 

Most of the information I've found when searching is outdated.  Furthermore, for those of us learning FreeDSB, using the command line/shell is hard to comprehend.  Has anyone created a walk-through that uses the new GUI from start to finish?

 

This isn't a complaint, it's me asking if I should proceed with emby/Freenas or look elsewhere.  I really would like to get this running, and would rather make this work for my HTC, than give up.

 

Thank you!

Edited by edevils
Link to comment
Share on other sites

raidflex

Check out this for info on creating a jail: https://www.ixsystems.com/documentation/freenas/11.2/jails.html 

 

Just create a standard jail and install the Emby package. Use the command "pkg install emby-server" for the latest stable version. There really isn't much when it comes to Emby install/setup, most of the setup is Freenas related. When it comes to updates to Emby going forward you can use the "pkg upgrade" command. 

 

You can also use the following for installing the latest beta: https://emby.media/freebsd-server.html

Link to comment
Share on other sites

MRobi

Hi!

 

Are there plans to write up an up-to-date step-by-step FreeNas-Emby plugin install guide?  I've fumbled around and have made progress, but I'm stuck when it comes to creating a jail for the plugin.  Furthermore, I've done so much troubleshooting, that I'm unsure as to where I stand anymore in the process besides the fact, that I have the plugin installed and smb sharing setup so my client can move files to the NAS using Windows 10.. 

 

Most of the information I've found when searching is outdated.  Furthermore, for those of us learning FreeDSB, using the command line/shell is hard to comprehend.  Has anyone created a walk-through that uses the new GUI from start to finish?

 

This isn't a complaint, it's me asking if I should proceed with emby/Freenas or look elsewhere.  I really would like to get this running, and would rather make this work for my HTC, than give up.

 

Thank you!

Sounds more like you need a guide to configure FreeNAS rather than a guide to installing Emby. Creating jails, SMB Shares, FreeNAS GUI.... none of that involves emby and you'd be best learning how to do that from the FreeNAS forums.

 

As for installing Emby, once you have the basics of FreeNAS figured out and a good understanding of navigating the GUI, the easiest way to install Emby is to simply go to the Plugins section of FreeNAS, clicking the 3 dots next to Emby, and clicking install. This will create the new jail and install Emby into it. But after Emby is installed you still need to mount your files to the jail and also setup your permissions, which is once again back to the FreeNAS forums for the best advice on doing that.

 

FreeNAS isn't an overly complicated OS, but it's vastly different from Windows and there is a learning curve to it. Once you get the hang of it, it's all straight forward.

Link to comment
Share on other sites

I tried to install the Emby on FreeNAS plugin (version 4.2.1) again and it appeared to work fine. But it does not find any of my videos. I mounted the dataset containing the videos so that the plugin could see them and the file system is world read so I have no idea what I am doing wrong.

 

My files are located in folders called Film and TV Shows with each Film in it's own sub-folder. The TV Shows are grouped into folders Documentaries, Drama etc. Defining the Film and TV Show folders in Emby I get no errors so I assume it found those folders ok.

 

I understood from an earlier post that with the Emby 4.x plugin everything would be wonderful and easy!!! The response I got on the earlier post was that 4.x would allow me to have any folder structure I want.

 

Am I doing something wrong or should I just switch to Plex?

 

I expected that when I hit the scan library button that it would tell me how many files it found or show some sort of error message if it couldn't read the folder/find any files. Instead it does nothing at all.

 

I thought the scan might take a while but I did not expect it to find nothing.

Link to comment
Share on other sites

makarai

So can you tell me which UID owns the dataset that contains your media?

Open shell -> CD to your media folder - > type ls -la and report back

Link to comment
Share on other sites

makarai

Further, I see that you mounted a share for your transcoding directory, does the standard emby user  (UID 989) have access to that directory and can write there?

Link to comment
Share on other sites

I'm not sure I understand the significance of either of your questions. The dataset containing the videos is world write so why does it matter who owns it? Am I missing something here?

 

Further, I see that you mounted a share for your transcoding directory, does the standard emby user  (UID 989) have access to that directory and can write there?

I don't have a clue what that means. What do you mean by you see that? You see that where? I had the Emby plugin installed previously but deleted it. I only re-installed it yesterday. Are you referring to something I had written previously?

 

I have to confess that I have no idea of the purpose of the emby account given that Emby was installed as a plugin. I don't recall being asked who owned the plugin when it was installed. The only point at which I remember being asked for an account was to login to Emby and I couldn't work out whether that was meant to be a FreeNAS account or an Emby account. I do have an emby account with a UID of 1001 but I don't have a clue what it is for.

 

I don't actually want Emby to own the videos. I just want it to be able to read them and serve them.

 

Reading past posts I see people saying that there needs to be a document detailing how to install the plugin. Most of the responses to that seem to be that the issues are all FreeNAS issues. I agree that the issue of giving the jail access to the data is a FreeNAS issue but I actually struggle with the Emby issues rather than the FreeNAS issues. For example, when Emby scans the library what file types is it looking for and why does it not show progress? I am used to LMS and when doing a library scan with that you get a comprehensive display of what it is doing and what it has found. When I did an Internet search for the file types Emby supports I could not find an answer. I found others asking and a response that Emby supports all file types. I didn't find that very useful as I assume Emby is looking for particular types of files. Is that not correct?

Link to comment
Share on other sites

makarai

I'm not sure I understand the significance of either of your questions. The dataset containing the videos is world write so why does it matter who owns it? Am I missing something here?

 

I don't have a clue what that means. What do you mean by you see that? You see that where? I had the Emby plugin installed previously but deleted it. I only re-installed it yesterday. Are you referring to something I had written previously?

 

I have to confess that I have no idea of the purpose of the emby account given that Emby was installed as a plugin. I don't recall being asked who owned the plugin when it was installed. The only point at which I remember being asked for an account was to login to Emby and I couldn't work out whether that was meant to be a FreeNAS account or an Emby account. I do have an emby account with a UID of 1001 but I don't have a clue what it is for.

 

I don't actually want Emby to own the videos. I just want it to be able to read them and serve them.

 

Reading past posts I see people saying that there needs to be a document detailing how to install the plugin. Most of the responses to that seem to be that the issues are all FreeNAS issues. I agree that the issue of giving the jail access to the data is a FreeNAS issue but I actually struggle with the Emby issues rather than the FreeNAS issues. For example, when Emby scans the library what file types is it looking for and why does it not show progress? I am used to LMS and when doing a library scan with that you get a comprehensive display of what it is doing and what it has found. When I did an Internet search for the file types Emby supports I could not find an answer. I found others asking and a response that Emby supports all file types. I didn't find that very useful as I assume Emby is looking for particular types of files. Is that not correct?

I replied to soloam, i think haha :D

 

However have you tried mounting a single movie first and checked if that can be found?

Edited by makarai
Link to comment
Share on other sites

Yes, that is true, but I did that and it does not work... I posted a log in one of the previous posts

 

I second this post. 

 

My issue is not with FreeNas, but the Emby plugin.  A post above stated that installing the emby plugin is the way to go.  This is the process I followed, and emby automatically created the jail.  Even with the jail created and the shares available via FreeNas, emby was not able to find the videos.  It's rather frustrating that a thorough guide was never created for noobs.  Further, it's bad customer service to simply reply that, "you need a better understanding of Linux".  Although this is true in a broader sense, my knowledge of FreeNas is sufficient enough that I was able to install the plugin and have the jail created via the plugin. 

 

Ultimately, there are quite a few people looking for the same assistance that I am, but it feels like nobody actually wants to take the time and create a thorough guide on how to install and configure emby for FreeNas. 

 

That's okay, but you have to understand that if you want a greater adoption rate, you have to listen to the potential customers asking for a guide.  And yes, most of us don't know too much about FreeNas, but that is exactly why we are posting, for help.

 

Personally, I could have tried Plex on Windows and probably would have saved the headache, but I wanted to give emby on FreeNas a go in order to hopefully learn the FreeBSD operating system a little bit better, and evaluate emby.  I've since replaced FreeNas with Windows 10 since I'm more familiar with the OS.

Edited by edevils
Link to comment
Share on other sites

makarai

I am not sure whom you are replying too. However, I am quite sure i never said you need more understanding of linux in order to get emby running. I might have said that FreeNAS is a storage solution first and a VM solution second, so you need to figure some things out.

 

Back to your problem. When i read problems with "cant see folder" i always think its a permission problem, because thats what my experience tells me.

 

Typically it boils down to that emby is installed with the user UID 989 and GID 989 and the first user of freenas has the UID 1000 with the GID 1000, naturally your first user (if you are not inclined to deal with permissions) creates datasets and creates the movie folders and what not. When you mount these datasets they can not be seen from the emby side.

 

There are two solutions that i can fathom.

1. Change the UID and GID the emby user is running as (easy requires 4 lines copy and paste in the emby shell) 

or.

2. Create a seperate user emby in freenas with UID:GID 989:989 that owns your media datasets.

 

 

 

For 1. open the emby plugin shell and replace 1101 with the userid you want

service emby-server stop
pw groupmod emby -n emby -g 1101
pw usermod emby -n emby -u 1101 -g 1101
chown -R emby:emby /var/db/emby-server
sysrc 'emby_server_user=emby'
service emby-server start

The 2nd. one is more involved with clicking through the GUI, I posted a simple terribly written pdf a day or so ago here https://emby.media/community/index.php?/topic/42569-freenas-emby-setup-guide/page-2&do=findComment&comment=794468

 

Most of these permission problems happen with all the plugins that need access to data, thats just the nature of the jail/freenas system and the option for the user to give each individual tool access to specific data. My personal data security is just terrible, as i am also just a click through the gui user so I have one user with the uid 1101 that does pretty much everything.

Edited by makarai
Link to comment
Share on other sites

makarai

I prepared two documents during my lunch break:

 

The documents are quick and dirty but i hope they are easy to follow

Usecase 1:

You have an elaborate file structure and have users created and want that emby can read and write to your data

Installing Emby Plugin.pdf

 

Usecase 2:

You want to have a seperate emby user and create a new dataset that emby can access.

Install Emby Plugin from Scratch Freenas.pdf

 

If someone want the word document and make them pretty, send me pm. I usually work with laTex to write documents so word is not my thing.

Edited by makarai
  • Like 2
Link to comment
Share on other sites

I replied to soloam, i think haha :D

 

However have you tried mounting a single movie first and checked if that can be found?

Who were you replying to in your last posts?

 

I'm not sure what you mean by "However have you tried mounting a single movie first"?

 

Do you mean copying a movie to the Plugin location?

 

I tried removing the Emby Plugin and installing the Plex Plugin. It also cannot see any files. But it also did not bother to tell me what it was doing during the scan i.e. what file types it was looking for.

 

Most of my files are .TS files that were recorded using a TV Card but I also copied some other files into the folder to try and determine whether Emby and Plex don't like .TS files.

Link to comment
Share on other sites

@@makarai That would have been me who said a better understanding of FreeNAS is required, which is true as I'm seeing a lot of posts lately specifically regarding permissions on FreeNAS. This is not anything Emby can control, it is simply how the FreeNAS operating system works.

 

@@edevils You say your issue is not with FreeNAS and it is with Emby, however the issue you describe is 100% in the way FreeNAS is designed to work. You have to remember, FreeNAS is a file system first and foremost with the option to run plugins. It's nothing like Windows or MacOS and was never intended to be a point and click type of system so there's definitely a learning curve with it, and it can be overwhelming while you're still learning it.

 

When you install Emby on FreeNAS, regardless of whether it is installed via the plugin or the shell, it gets installed into a jail. This is true of every plugin installed on FreeNAS. A jail is in essence a mini system running completely on it's own inside of a larger system. It runs in it's own little world inside the jail with no access to anything outside of it, hence the name jail. This is why you have to mount your files into the jail just so it can see they exist. The problem comes when you have a program (Emby) running inside that jail that is trying to read these files. This same problem will occur with Sonarr, Radarr, Lidarr, SabNZBD, Transmission, Plex....

 

When you first created your dataset in FreeNAS, you would have created a user and a group that the file system is assigned to, lets for fun say you named them both edevils. Because all of these plugins run inside their own little mini system (jail), the plugins are completely oblivious to what you chose as your user/group for your files. When the jail is created and the plugin installed, the plugin is given a user and group of it's own. In this case, it's emby and emby. If your user or group that you initially chose don't match exactly with what the plugin runs, the plugin cannot read/write/execute your files. This is why you need to go through that step of setting permissions for your files. Again, this is completely on the FreeNAS side of things and is completely different for every single user because each user chooses their own user/group for their file system. You also have to do this exact same step with Sonarr, Radarr, Lidarr, etc.. etc.. etc. 

 

Over on the FreeNAS forums, they do have a thread dedicated to giving plugins permission to your files. To complicate matters more, there are multiple ways to do this and that all comes down to user preference. For example, Makarai uses user permission, I use group permission. So a guide written by him would look completely different from a guide written by me. You could even set your dataset to 0777 which gives everybody permission to do everything (not recommended of course since many of these jails will be exposed to the internet). Here's that thread on permissions 

https://www.ixsystems.com/community/threads/how-to-giving-plugins-write-permissions-to-your-data.27273/

 

Once you grasp the concept of FreeNAS permissions in jails, you'll be much better prepared to tackle setting up other jails with other plugins. But unfortunately jail permissions are not a "one size fits all" solution. 

 

Now with all of that said, I see you went back to Windows 10 as an OS. There's an Emby server for Windows as well that's still a million times better than Plex will ever be ;) Don't give up on FreeNAS completely though, once you figure out the basics it really does make a great system. You can even create a virtual machine to run Windows in FreeNAS :)

Link to comment
Share on other sites

Who were you replying to in your last posts?

 

I'm not sure what you mean by "However have you tried mounting a single movie first"?

 

Do you mean copying a movie to the Plugin location?

 

I tried removing the Emby Plugin and installing the Plex Plugin. It also cannot see any files. But it also did not bother to tell me what it was doing during the scan i.e. what file types it was looking for.

 

Most of my files are .TS files that were recorded using a TV Card but I also copied some other files into the folder to try and determine whether Emby and Plex don't like .TS files.

Emby definitely supports .TS files, there is no issue there. Some players may require transcoding to play them, but that all depends on your end device hooked to your TV.

 

The reason neither Emby or Plex can see your files is because of the permissions in FreeNAS. Emby runs as 1 user and your files are owned as a different user. You need to give the Emby user permission to see these files. Makarai just posted up a nice pdf that touches on this. You can also take a look at this post about permissions on the FreeNAS boards https://www.ixsystems.com/community/threads/how-to-giving-plugins-write-permissions-to-your-data.27273/

 

If you can get us the user id and group id of your dataset for your files, we can help you with the exact code you need to get permissions setup and working.

Link to comment
Share on other sites

Emby definitely supports .TS files, there is no issue there. Some players may require transcoding to play them, but that all depends on your end device hooked to your TV.

 

The reason neither Emby or Plex can see your files is because of the permissions in FreeNAS. Emby runs as 1 user and your files are owned as a different user. You need to give the Emby user permission to see these files. Makarai just posted up a nice pdf that touches on this. You can also take a look at this post about permissions on the FreeNAS boards https://www.ixsystems.com/community/threads/how-to-giving-plugins-write-permissions-to-your-data.27273/

 

If you can get us the user id and group id of your dataset for your files, we can help you with the exact code you need to get permissions setup and working.

 

Thanks for the reply. My first thought was permissions which is why I made sure that the folder was world read. I had a quick look at the PDF and I get the idea of what to do. What I don't get is why world read is not enough? Does world read not mean anyone can read the files?

 

My priority in setting up FreeNAS was a location to store the files and I've never really spent any time reading about who should own them. When I installed FreeNAS I did so with a username the same as the one I use on Windows as I understood that made permissions etc easier. I've always planned to sort that out. At the moment the TV recording is happening on a Windows machine. I then edit the .TS files and move them to FreeNAS. At some point I will set-up a Linux based TV recorder and use the FreeNAS box just for file backup.

 

I haven't got my brain around how such things should be set-up from login/ownership/permissions point of view so any advice would be much appreciated.

Link to comment
Share on other sites

Thanks for the reply. My first thought was permissions which is why I made sure that the folder was world read. I had a quick look at the PDF and I get the idea of what to do. What I don't get is why world read is not enough? Does world read not mean anyone can read the files?

 

My priority in setting up FreeNAS was a location to store the files and I've never really spent any time reading about who should own them. When I installed FreeNAS I did so with a username the same as the one I use on Windows as I understood that made permissions etc easier. I've always planned to sort that out. At the moment the TV recording is happening on a Windows machine. I then edit the .TS files and move them to FreeNAS. At some point I will set-up a Linux based TV recorder and use the FreeNAS box just for file backup.

 

I haven't got my brain around how such things should be set-up from login/ownership/permissions point of view so any advice would be much appreciated.

It should yes...

 

Can you log into the FreeNAS GUI, go to Storage, Pools, click the 3 dots at the end and select "Edit Permissions" and post a screenshot of your user, group and permissions that are set.

 

Setting up Windows shares from FreeNAS is a whole other monster. And why not just configure Emby to do your recording for you once you've got everything all setup. It'll save you all the hassle of having to manually move files around.

Link to comment
Share on other sites

  • 2 weeks later...
bizarro252

@@makarai

Thanks for putting those guides together, I too had some permission struggles at the beginning :)

Question though, in the 'from scratch' guide you mention when talking about mounting folders to the jail:

"

Add mount points 3dots ->add mountpoints -> actions add mount point

Use the mouse do not type: click the folder and navigate!
"

 

I think I typed into the Destination to create structures within the jail, is this bad practice?  Should you create the 'folders' within the jails dataset and navigate to them instead of typing them in?

 

 

Thanks!

Link to comment
Share on other sites

makarai

@@makarai

Thanks for putting those guides together, I too had some permission struggles at the beginning :)

Question though, in the 'from scratch' guide you mention when talking about mounting folders to the jail:

"

Add mount points 3dots ->add mountpoints -> actions add mount point

Use the mouse do not type: click the folder and navigate!

"

 

I think I typed into the Destination to create structures within the jail, is this bad practice?  Should you create the 'folders' within the jails dataset and navigate to them instead of typing them in?

 

 

Thanks!

 

In the end as long as you find your folders from within the jail everything is dandy, its your choice. I wrote it in away because its less prone to errors :D

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
hjason7812

quick question.

What does the _1 on the new freenas plugon mean?

I have the non _1 version already installed then the _1 version showed up.

What is the difference with them?

 

Thanks

Link to comment
Share on other sites

makarai

i am not sure what exactly you are talking about, if you are talking about the jailname that is just when you install emby multiple times it gets an 1 at the end.

Link to comment
Share on other sites

  • 1 month later...

Any time frame when 4.3.1.0 will be uploaded to FreeNAS plugin repo? Currently 4.2.1.0_1 is the latest.

 

As soon as it lands in FreeBSD ports it should be available. Sometimes it can take a week or two after new releases.

Link to comment
Share on other sites

  • 1 month later...
Vidman

maybe the emby plugin could be moved from the ixsystems plugin repository to the new community repository available in the recent freenas 11.3 update? could this allow for more timely automated updates for this platform?

Link to comment
Share on other sites

maybe the emby plugin could be moved from the ixsystems plugin repository to the new community repository available in the recent freenas 11.3 update? could this allow for more timely automated updates for this platform?

 

We can look into that. Thanks !

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...