Jump to content

TrueNas Scale


dgrigo

Recommended Posts

dgrigo

@Luke I managed to solve it , so no rush, and thanks

 

Can we have a guide for this, from environment variables / user creation /Permissions etc. ?

Well I have managed to install the server but feel lost with how i will add the media, I have a dataset for them Under System Dataset pool named library, with user permissions and group for a user emby group emby, with uid 1000 and gid 1000, and have those setup as environment variables on the emby installation.

But when i go to add the directories movies etc, i have no mnt point on the requestor to select.

Please add some info to the Truenas scale as all i see is a picture and some info that is available Officially..

 Thanks in Advance

Edited by dgrigo
Solved
Link to comment
Share on other sites

Hi, thanks for following up. Yes we can certainly look at creating some guides for TrueNAS scale.

Link to comment
Share on other sites

dgrigo

Ok as I finished installing and was trying to find out what I am doing wrong, the Install on scale and reading contradicted info, I have to say this to help anyone who want to Install it and save some time.

There is no emby user and don't try to make one, all is simple as Emby install on kubernetes use the internal user bin.

So for the library , make a dataset and then for it change permissions and give them to bin user, and bin group.

all your media files must  go under that dataset.

for the emby login choose whatever login you want, internally its using bin, that way you have full permissions on the dataset.

I like to  install programs into separate directories so under the root dataset make an emby directory before you install it.

so its like this : main storage/emby directory not an emby dataset and main  storage/library dataset.

on the environment as you install it , you have to write application name emby, networking don't click host network , just the port 9096

on Storage , you have to point to the directory you made for emby program ,so click on Enable Host Path for Emby Server Config Volume and point to main storage emby.

on the Configure Emby Server Extra Host Path Volumes and point to the dataset that you made for your library. that's main Storage/library or media or whatever you had choose.

don't click read only for that.

on update strategy select kill pods before creating new ones.

on GPU Configuration  choose how many you want, you can change anytime the config in kubernetes ,

So thats it, start install and enjoy hasle free instalation, from then on copy your media, and you are set.

Enjoy

 

 

 

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

@Drigo, that somehow seems like a lot of extra steps. For me there was little to change and I didn't need to touch user access permission.  If I remember correctly your not setting a user but an ID of something which could be a user, group, etc.

I run TrueNAS scale as a virtual machine so I can pass storage to it.  It's native ZFS performance is half what it should be on random read/writes. Core is fine as well as Ubuntu and Debian which it's based on.  So I'm running it under ProxMox (Debian based) with ZFS managed by ProxMox and passed through (problem solved). It's runs fast and disk read/write is over 2K so it  feels like it's running on NVMe drives.

I store all VM/Containers and the containers data in ZFS.  I have a section setup for vm and containers as well as storage.  Think /virtual/storage/truenas-scale/each app

I have a user group created for virtual machines and apps with permissions set for /virtual/storage to allow typical app access including read/write/modify/create/delete. Any new app installed by TrueNAS gets automatically setup with the proper location and permissions.

That's the way I'd suggest setting things up so installing apps is a cake walk and everything fills in using defaults.  Unlike docker where compose files are all different, TrueNAS apps are built from a template using common values so it can auto-fill in environmental values, users, permissions, locations, etc. 

I'm pretty sure I didn't have to change a thing when installing the official Emby app this way under TrueNAS Scale.

Link to comment
Share on other sites

dgrigo

@cayarsdon't forget , that the truenas scale in baremetal sets a user and you can only login as root on the interface, whatever you do you are root, same goes when you create dataset's directories etc. So you have to work your way to permissions.

Yes every user has an id, bin/bin has an id of 2.

The emby need's a way to have write permissions to the library that you point to, so that can record , download subs, etc! So you have to know who is the user/group name that the emby install's itself under.

I am saying that all over the forums, there are talks of a user emby , but there isn't, the Emby install as i say under internaly as a bin/bin, all other apps in truenas scale use the kubentetes user apps/apps. I see that as i have 5 apps in my nas atm.

anyway, i tried to be helppful to anyone that struggles with the installation .

Nm, long story short I am happy, as i dig deeper to understand the behavior of emby with trruenas scale, was trying to find a replacement for synology as i don't like the path they go into! and i wanted to be able to use the largest disk's that exist, and don't locked to Synology branded drives and i wanted hardware acceleration all new synology's don't have hardware transcoding even removed from the web site, but the notes have to been put to a tutorial on the truenas scale page, ignore my steps if needed.

Thanks

 

Edited by dgrigo
  • Thanks 1
Link to comment
Share on other sites

I don't disagree with that. For me it's more complex since I've added additional hypervisor layers.

But in TrueNAS Scale you ideally create a pool specific for app use.  When setting up this pool you can add users or groups to that storage area and set permissions.  Once you've done that Emby shouldn't have a problem accessing the data or needing any special permissions set.  That's kind of the key of using Scale correctly.

Keep in mind it's designed to run as a cluster so you could have 3 or 4 TrueNAS machines.  You would not want to have to manually adjust apps on each member of the cluster as that defeats the purpose.  Instead you setup the shared stored and set users and permissions on it so any app or node in the cluster has proper access.

If you're not doing that you're using it more like docker and will need to make adjustments for every app which isn't ideal.

  • Like 1
Link to comment
Share on other sites

Q-Droid
3 hours ago, cayars said:

But in TrueNAS Scale you ideally create a pool specific for app use.  When setting up this pool you can add users or groups to that storage area and set permissions.  Once you've done that Emby shouldn't have a problem accessing the data or needing any special permissions set.  That's kind of the key of using Scale correctly.

As the case should be for any application and service running on a system. Non-OS components and services as well as 3rd party applications ideally should run under dedicated service accounts following a principle of least privilege. Privilege to users, groups, roles and access to resources like storage should be limited and explicitly granted. Not accessible by default and definitely not wide open. This is a best practice that is not all that hard to learn and configure. Once this model is started adding other applications, their corresponding users and access sort of falls into place. If any one of those services is compromised the damage is limited to the access they have and not the whole system or beyond.

Using built-in UIDs to run Emby or any other added service/application is a first step in the wrong direction.

 

Link to comment
Share on other sites

dgrigo

@Q-Droid

Yeah i know, but the kubernetes Emby installation, takes out all permissions i had previously on the directory I install emby into, and gives all to a user internal bin/bin with uid 2

Whatever i tried to take permissions for that user, it won't let me, as a result , the library who don't have bin/bin , but my user permissions like tom/tom don't populate to be selected in library location as the library don't have bin/bin, but has others and that normally should work.

NM long story short that's why i setup it like this. And btw, install first and talk later, as  built-in UIDs to run Emby is a requirement of the kubernets.

I say everything in friendly tone, don't mind me it's just my frustration that goes out, and nothing against anyone who makes suggestions.

And that's why i asked for a quide, i am not a linux user, i am old and my last linux experience was a silicon Graphics Irix like 32 years back in time,

Anyway thanks, I know its a bad practice, could not think anything else, and btw, i uninstalled it and keep trying on other dataset.

All this would have solved if the installation of emby would had a uid and gid for setting up the internal user, home-assistant have that on installation.

Edited by dgrigo
Link to comment
Share on other sites

dgrigo

@Q-Droid @cayars @Luke

 

Ok, persistence worked out, on the kuberrnetes installation create env variables with your user ID, like uid=1000 and gid=1000 , or whatever user you want to take rights.

Doing that the installation didn't used bin/bin.

So I will check the results and report back my finds, but i am sure that nailed it.

 

After a while... Yes everything works with my own user, i am confident that i can make a guide for TrueNas-scale if you want me to with all setting and environment variables for kubernetes.

Edited by dgrigo
Report back
Link to comment
Share on other sites

Q-Droid

It's not obvious at first and not intuitive either. And yes, projects like TrueNAS expect a certain level of knowledge going in. That's not a slight on the users, just the way it is. But as you've discovered the tools are there to configure it in many different ways. The basic ideas apply to all Linux/UNIX/POSIX based systems with the difference being how you get there. The doc section is evolving and I'm sure the team would appreciate the input.

 

Link to comment
Share on other sites

dgrigo

Hey, Those screenshots show exactly what you have to fill in truenas-scale  installation, for the user you choose, in my case the user uid:1000 and gid:1000

which is the user i have to access my server also in samba shares.

before you start the installation create the 2 datasets or directories if you prefer and change permissions to the user you choose in truenas ui, as you have to select them in installation.

truenas_1.jpg.e845dbc7cf7ec1ce10cde15a97ecc7db.jpgtruenas_2.jpg.6c8de6e037e47a75481999caaa2a2426.jpgtruenas_3.jpg.946283b853c58ea7c64ec3001c9abe7e.jpg

  • Like 2
Link to comment
Share on other sites

sfatula

Just an FYI, if you want a shell into Emby on TruneNas Scale and don't like using the GUI, here's a command that works for me if ssh'd into truenas:

k3s kubectl exec -n ix-emby-server --stdin --tty "$(/usr/local/bin/k3s kubectl -n ix-emby-server get pods -o name | cut -f2 -d'/')" -- /bin/sh

Of course, only what you make persistent is persistent so this is likely useful for poking around, trying to solve a problem, etc.

  • Thanks 1
Link to comment
Share on other sites

I re-installed TrueNas Scale on a new computer server and did nothing but create a small app pool to hold a couple apps.  No other configuration other than that.

NOTE ADDED: :I'll say this before reading further.  The new setup is a bit messed up and would be really confusing to new users.

Next I installed Emby but hit a slight snag on the name of all things and also didn't like 3 things being done on this install.

image.png

I think the meant to have a set of caps in there because it won't take the name with a capital E.  During the initial setup the default username is "bin" which is a bad choice. Better to default to "admin" as at least that makes sense for the first user which is the admin.

The port being used is 9086 vs 8096, but this is what the dashboard shows:
image.png

Neither link works. For me this needs to be: http://10.69.0.175:9096 to work using the defaults AS IS during install. 10.69.0.175 is the same IP as the TrueNAS server.

As you can see above the version is 4.7.5.0 but this is what you see on the TrueNAS Console:
image.png

I added the yellow box to this picture.  If you click in that area it will bring up this screen:
image.png

You can use the dropdowns one at a time. The first dropdown shows the Emby build number.
image.png

or

image.png

 

If you try to edit the config to switch it back to 8096 you'll hit this:
image.png

The setup won't allow enter 8096 port or anything under 9000. 

If you click the SETTINGS button top right:
image.png
And then picking the Advanced Settings

 image.png

You'll get this screen to adjust IPs used

image.png

Once I configured this part:
image.png

and tried installing Emby fresh I get which still is wrong:
image.png

I was not able to change the node IP address in the cluster setup or GUI setup in 22.02.
Any change I attempted via Network menu for IP, address space or port would hang it and crash.

I tried a couple other things to see how it would work including DLNA and casting which didn't work for me as nothing would show up for "play on".

Emby couldn't find any HDHomeRun tuners but could use them fine if I input the IP of the device likely due to the IP subnet differences.

I can see this is going to need documenting to make it easier to setup properly and use. 

 

@dgrigo, curious on your system what do you see for URLs (ip & ports) on the console?

It seems like a lot of things changed besides the 9000+ port issue.

image.png

  • Like 1
Link to comment
Share on other sites

dgrigo

@cayars Good ,now do a tutorial! :) yeah many things changed, but is very stable, as I am using it all this time.

I will send you my log file in private !

  • Agree 1
Link to comment
Share on other sites

Funny that you mention it. :)

Yes please do. I''d like to trade a couple screen shots of Emby console and setup as well.
Meanwhile I've got a couple questions to follow up with at iX too.

Link to comment
Share on other sites

dgrigo

Oh btw I have some answers to you about the port 8096.

You see they left emby running with default settings and that means they use virtual IP for cubernetes if you check the IP and port in emby you will see their internal network.

So because of this they have to run it on another port for the local and wan.

Seriously I am starting to understand, have setup already domain certificate from let's encrypt, ddns to update my cloudflare DNS and qbittorrent with wireguard.

There are some quirks not worthy mention, but I am fallen in love with scale and emby on it.

Lol bye bye Synology.

Ask if I have an answer ... I will do a research now at dnla.

  • Like 1
Link to comment
Share on other sites

Oh I understand what they're doing with the masqueraded IPs and the fact they are reserving ports under 9000. Nothing shocking here but my issue is what's used and what's being showed in the Emby Console are different.

Many people have enough trouble as it is now setting up port forwarding with just Emby Server.  Then others will forward to a reverse proxy where all inbound traffic is sent and then the proxy is setup to forward to the local machine.  That always takes a bit more setup to get going as the admin is adding a machine in the middle. At least that's a "known" set of IP/port.

But here we have a mismatch of information that can be quite confusing.  From the "version" of Emby as Shown in TrueNAS Scale to the IP/Port combo that is different than what Emby thinks it is or what the console says it is.

I don't think there is much chance TrueNAS would change this as it's sort of what's needed to work with Kubernettes the way they use it but we should be able to determine the port/IP that was setup and being used so that we can update the Console to reflect the setup.  We likely need to also de-activate most of the network menu as well.

So I'm trying to not just do a tutorial but also find the best method to actually show the proper info.

Link to comment
Share on other sites

sfatula

For me, I just used a separate LAN IP where you config the network for Emby in TrueNas Scale so it still uses the default port (though it also still shows up wrong on Emby dashboard). So, there's another potential variable if you try and get the correct access IP for Emby. Avoids the need for reverse proxy if you want to use default port.

EDIT: I did not clarify here that I was speaking of using docker NOT the built in Truenas Scale Emby app. I have tried all the methods and am not being clear.

Edited by sfatula
Link to comment
Share on other sites

sfatula

I don't use DLNA, so not sure. I'm headed to Virgin Islands, would be happy to turn it on and try when I get back in a few weeks,

Link to comment
Share on other sites

17 hours ago, dgrigo said:

@cayars Hello ! can you check EMBY connect, try to add the server ? for the love of god , I can't

What exactly are you trying to do? I'm not sure what you mean by "add the server" as you don't add a server to Emby Connect.

An Emby Connect username is attached to a local user on your server. But before doing that verify your server is setup properly and available for remote use.
If you're not sure how to do that send me a Private Message (hover over my avatar) with your server IP and port and I'll check for you.

 

Link to comment
Share on other sites

dgrigo

@cayars

Oops , sorry was busy, disregard previous question, all I am trying to figure out is accessing emby from outside with https, I already have setup certificate, but cant figure out the port that's exposed to Https as the installation don't seem to expose it nor have a setting for it.

I  can access my server only with HTTP from outside.

PS. I am using the official chart app.

Edited by dgrigo
Link to comment
Share on other sites

Q-Droid

It looks like you'll need to use the Docker option "Launch Docker Image" to get that level of granularity. I don't see those options in the TrueCharts app template either. Or use a reverse proxy to handle the https for TrueCharts Emby.

There might be other ways but I've just started playing with TrueNAS Scale and haven't dug very deep yet.

 

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...