docker-apps/emby/emby_jm.txt
2025-04-03 22:57:52 +02:00

84 lines
2.9 KiB
Plaintext

Create user and group
---------------------
Credentials -> Local Users -> Add
Full Name: emby
Username: emby
Disable Password: <select>
Email: <leave blank>
UID: (note)
Create New Primary Group: <select>
Create Home Directory: <uncheck>
Samba Authentication: <uncheck>
Save
emby UID: 3017
emby GID: 3016
Create datasets
---------------
# In Truenas shell:
# list datasets
zfs list | grep -i "docker.*emby"
# create following dataset if not present
zfs create SSD1/docker/data/emby/config
chown -R emby:emby /mnt/SSD1/docker/data/emby
Create stacks folder
---------------------
mkdir -p /mnt/SSD1/docker/stacks/emby
If not done already, add mapping for media in jail config
---------------------------------------------------------
In this example: the folder where media is stored is /mnt/stpool1/NData1/Media
On Truenas shell:
jlmkr edit docker
Add the following args to "systemd_nspawn_user_args":
--bind='/mnt/stpool1/NData1/Media:/mnt/media'
If not done already, set ACL permissions for media to be accessible by media group
----------------------------------------------------------------------------------
On Truenas shell:
# read and note acl entries
getfacl /mnt/stpool1/NData1
getfacl /mnt/stpool1/NData1/Media
# set read and execute permissions for media group on parent folder
setfacl -m g:media:5 /mnt/stpool1/NData1
# set full permissions for media group on Media folder recursively
setfacl -R -m g:media:7 /mnt/stpool1/NData1/Media
# modify defaults recursively
setfacl -R -d -m g:media:7 /mnt/stpool1/NData1/Media
# NB! if you want to remove all acl entries from a folder recursively, use setfacl -b -R <foldername>
Copy folder to docker stacks
----------------------------
# In Windows cmd shell in emby folder, enter:
./cp2nas 192.168.2.2
# or
pscp -P 22 -r stacks/*.* root@192.168.2.2:/mnt/SSD1/docker/stacks/emby/
# This should copy stacks folder to /mnt/SSD1/docker/stacks/emby
Migrating data from old emby media server (source) to newly installed one (target)
----------------------------------------------------------------------------------
# Stop old/source emby media server
heavyscript app --stop emby
# Stop new/target emby media server
# On Dockge, select emby and click stop
# Copy the source Library to target folder (this might take a while):
cp -pr /mnt/stpool1/apps/emby/* /mnt/SSD1/docker/data/emby/config/
chown -R emby:emby /mnt/SSD1/docker/data/emby/config
Managing library files
----------------------
Try and keep the mount folders for the media the same as that of the old media server
However, if you choose to have a different mount:
For example,
If the old media server mapped to /Media and the new one now maps to /data, then you will have to modify the media folders in emby settings to reflect the new mount.
Open emby, click on the spanner/wrench and select Manage->Libraries
Go through all the libraries items, adding new media folders and removing those that were replaced
This may take some time (depends on library size)