diff --git a/README.md b/README.md index cd3042c..e6f727d 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,5 @@ This is the docker based home server setup for a ubuntu server machine running o The traefik proxy does not run on this machine but it's own LXC container on proxmox, there is a small script to sync it from there to here so I can have it all on one git repo. +Stop home assistant first if jellyfin isn't starting. + diff --git a/ai/docker-compose.yml b/ai/docker-compose.yml index c67b692..969f255 100644 --- a/ai/docker-compose.yml +++ b/ai/docker-compose.yml @@ -1,6 +1,6 @@ services: openwebui: - image: ghcr.io/open-webui/open-webui:0.5.11 + image: ghcr.io/open-webui/open-webui:0.5.18 container_name: open-webui restart: always environment: diff --git a/authentik/docker-compose.yml b/authentik/docker-compose.yml index 742213e..e1c705b 100644 --- a/authentik/docker-compose.yml +++ b/authentik/docker-compose.yml @@ -82,3 +82,18 @@ services: condition: service_healthy redis: condition: service_healthy + + +# authentik_ldap: +# image: ghcr.io/goauthentik/ldap + # Optionally specify which networks the container should be + # might be needed to reach the core authentik server + # networks: + # - foo +# ports: +# - 389:3389 +# - 636:6636 +# environment: +# AUTHENTIK_HOST: https://auth.home.thoster.net +# AUTHENTIK_INSECURE: "false" +# AUTHENTIK_TOKEN: 4mv8U8docRMUtcrMWBPvcl9lclcOvQ58OavwU6Kek5AMoDwdHgHS3ida2Reu diff --git a/hass/docker-compose.yml b/hass/docker-compose.yml index d26e4d3..8e30790 100644 --- a/hass/docker-compose.yml +++ b/hass/docker-compose.yml @@ -59,6 +59,6 @@ services: - /run/udev:/run/udev:ro environment: - TZ=Europe/Amsterdam - image: koenkk/zigbee2mqtt:2.0.0 + image: koenkk/zigbee2mqtt:2.1.1 links: - "mqtt:mqtt" diff --git a/hass/homeassistant/automations.yaml b/hass/homeassistant/automations.yaml index 9ac9eca..1041d7d 100644 --- a/hass/homeassistant/automations.yaml +++ b/hass/homeassistant/automations.yaml @@ -72,14 +72,14 @@ - id: '1723274410344' alias: Fernbedienung description: '' - trigger: - - platform: device - domain: mqtt + triggers: + - domain: mqtt device_id: 7ee7af674fef326af8b7d7f20d1d00d6 type: action subtype: 'on' - condition: [] - action: + trigger: device + conditions: [] + actions: - action: light.turn_on target: entity_id: @@ -99,14 +99,14 @@ - id: '1723274776341' alias: Fernbedienung aus description: '' - trigger: - - platform: device - domain: mqtt + triggers: + - domain: mqtt device_id: 7ee7af674fef326af8b7d7f20d1d00d6 type: action subtype: 'off' - condition: [] - action: + trigger: device + conditions: [] + actions: - action: light.turn_off metadata: {} data: {} @@ -152,16 +152,16 @@ - da8053e3c99c43fa802f32627d9ec42e mode: single - id: '1732045729333' - alias: Wasser Spüle + alias: Wasser Spüle! description: '' - trigger: + triggers: - type: moist - platform: device device_id: ed19b3502ef3dad70cca3de834a993bc entity_id: af627c5df02c10ebfdc7e677b2934f12 domain: binary_sensor - condition: [] - action: + trigger: device + conditions: [] + actions: - action: notify.mobile_app_sm_a536b metadata: {} data: @@ -241,12 +241,12 @@ entity_id: 2a315e13dac7a4d0e3a5331216e79a5b domain: switch - type: toggle - device_id: aa992894922dfd99d4de351691fddbeb - entity_id: c9e060ed610aaa859483ed162741f6b8 + device_id: 0477c12763b17a6f8e00e457e2241c65 + entity_id: 47503c95c474e4f8bfba5f00c725a1d4 domain: light mode: single - id: '1733523672915' - alias: Nur Küchentisch Doppelklick + alias: Nur Küchentisch Doppelklick! description: '' triggers: - device_id: f9bd33dde8040b0c80b8ef35f0eff174 @@ -357,7 +357,7 @@ domain: switch mode: single - id: '1733861633781' - alias: Fernbedienung wieder hell + alias: Fernbedienung wieder hell! description: '' triggers: - domain: mqtt @@ -378,7 +378,7 @@ - scene.maximales_licht mode: single - id: '1733861763897' - alias: Fernbedienung abdunkeln + alias: Fernbedienung abdunkeln! description: '' triggers: - domain: mqtt @@ -400,7 +400,7 @@ entity_id: scene.hanna_schlafmodus mode: single - id: '1733862634974' - alias: Küche Wohnzimmer an + alias: Küche Wohnzimmer an! description: '' triggers: - domain: mqtt @@ -428,7 +428,7 @@ domain: switch mode: single - id: '1733862691860' - alias: Küche Wohnzimmer aus + alias: Küche Wohnzimmer aus! description: '' triggers: - domain: mqtt @@ -465,7 +465,7 @@ domain: switch trigger: device for: - hours: 0 + hours: 1 minutes: 30 seconds: 0 conditions: @@ -474,10 +474,6 @@ device_id: ef6d5a43ae7c971e4b7b740dbc0f378e entity_id: d212bffda3c532f2e43ea9d08b1fd008 domain: switch - for: - hours: 0 - minutes: 59 - seconds: 0 actions: - type: turn_off device_id: ef6d5a43ae7c971e4b7b740dbc0f378e diff --git a/hass/homeassistant/configuration.yaml b/hass/homeassistant/configuration.yaml index 7b57e0a..8e0d1bd 100644 --- a/hass/homeassistant/configuration.yaml +++ b/hass/homeassistant/configuration.yaml @@ -19,11 +19,13 @@ switch: turn_off: service: shell_command.turn_off_remote_pc - platform: template - name: "comfyui" - turn_on: - service: shell_command.start_comfy_ui - turn_off: - service: shell_command.turn_off_remote_pc + switches: + comfyui: + friendly_name: "comfyui" + turn_on: + service: shell_command.start_comfy_ui + turn_off: + service: shell_command.stop_comfy_ui #MQTT Broker for milight hub: mqtt: diff --git a/hass/homeassistant/shell_commands.yaml b/hass/homeassistant/shell_commands.yaml index b5caca4..066e1cc 100644 --- a/hass/homeassistant/shell_commands.yaml +++ b/hass/homeassistant/shell_commands.yaml @@ -1,2 +1,3 @@ turn_off_remote_pc: "ssh -i /config/ssh_keys/id_rsa_homeassistant -o 'StrictHostKeyChecking=no' homeassistant@192.168.178.87 sudo shutdown -h now" start_comfy_ui: "ssh -i /config/ssh_keys/id_rsa_homeassistant -o 'StrictHostKeyChecking=no' homeassistant@192.168.178.87 bash -c 'cd /home/oster/git/ComfyUI;./start.sh; read x'" +stop_comfy_ui: "echo 0" diff --git a/immich-app/docker-compose.yml b/immich-app/docker-compose.yml index 68bcc11..2f60154 100644 --- a/immich-app/docker-compose.yml +++ b/immich-app/docker-compose.yml @@ -19,7 +19,8 @@ services: # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - - /mnt/usb_ssd/Pictures:/Pictures + - ./data/pictures:/Pictures + - ./data/mobile-pictures:/mobile-pictures - /mnt/test:/test env_file: - .env diff --git a/jellyfin/config/config/encoding.xml b/jellyfin/config/config/encoding.xml new file mode 100644 index 0000000..1e1bbb6 --- /dev/null +++ b/jellyfin/config/config/encoding.xml @@ -0,0 +1,52 @@ + + + -1 + false + false + 2 + None + 2048 + false + 180 + false + 720 + none + /usr/lib/jellyfin-ffmpeg/ffmpeg + /dev/dri/renderD128 + + false + false + false + bt2390 + auto + auto + 0 + 100 + 0 + 16 + 1 + 23 + 28 + + false + yadif + true + true + false + false + true + true + false + false + true + false + false + true + + h264 + vc1 + + + mkv + + \ No newline at end of file diff --git a/jellyfin/config/config/logging.default.json b/jellyfin/config/config/logging.default.json new file mode 100644 index 0000000..f64a852 --- /dev/null +++ b/jellyfin/config/config/logging.default.json @@ -0,0 +1,38 @@ +{ + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "Microsoft": "Warning", + "System": "Warning" + } + }, + "WriteTo": [ + { + "Name": "Console", + "Args": { + "outputTemplate": "[{Timestamp:HH:mm:ss}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "Async", + "Args": { + "configure": [ + { + "Name": "File", + "Args": { + "path": "%JELLYFIN_LOG_DIR%//log_.log", + "rollingInterval": "Day", + "retainedFileCountLimit": 3, + "rollOnFileSizeLimit": true, + "fileSizeLimitBytes": 100000000, + "outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message}{NewLine}{Exception}" + } + } + ] + } + } + ], + "Enrich": [ "FromLogContext", "WithThreadId" ] + } +} diff --git a/jellyfin/config/config/migrations.xml b/jellyfin/config/config/migrations.xml new file mode 100644 index 0000000..1ad6c1c --- /dev/null +++ b/jellyfin/config/config/migrations.xml @@ -0,0 +1,153 @@ + + + + + 9b354818-94d5-4b68-ac49-e35cb85f9d84 + CreateNetworkConfiguration + + + a6dcacf4-c057-4ef9-80d3-61cef9ddb4f0 + MigrateMusicBrainzTimeout + + + 4fb5c950-1991-11ee-9b4b-0800200c9a66 + MigrateNetworkConfiguration + + + a8e61960-7726-4450-8f3d-82c12daabbcb + MigrateEncodingOptions + + + 4124c2cd-e939-4ffb-9be9-9b311c413638 + DisableTranscodingThrottling + + + ef103419-8451-40d8-9f34-d1a8e93a1679 + CreateLoggingConfigHeirarchy + + + 3793eb59-bc8c-456c-8b9f-bd5a62a42978 + MigrateActivityLogDatabase + + + acbe17b7-8435-4a83-8b64-6fcf162cb9bd + RemoveDuplicateExtras + + + 5c4b82a2-f053-4009-bd05-b6fcad82f14c + MigrateUserDatabase + + + 06387815-c3cc-421f-a888-fb5f9992bea8 + MigrateDisplayPreferencesDatabase + + + a81f75e0-8f43-416f-a5e8-516ccab4d8cc + RemoveDownloadImagesInAdvance + + + 5bd72f41-e6f3-4f60-90aa-09869abe0e22 + MigrateAuthenticationDatabase + + + 615dfa9e-2497-4dbb-a472-61938b752c5b + FixPlaylistOwner + + + d34bfc33-5d2e-4790-8085-069ef6eecb4e + MigrateRatingLevels + + + cf6fabc2-9fbe-4933-84a5-ffe52ef22a58 + FixAudioData + + + 96c156a2-7a13-4b3b-a8b8-fb80c94d20c0 + RemoveDuplicatePlaylistChildren + + + eb58ebee-9514-4b9b-8225-12e1a40020df + AddDefaultPluginRepository + + + 5f86e7f6-d966-4c77-849d-7a7b40b68c4e + ReaddDefaultPluginRepository + + + 34a1a1c4-5572-418e-a2f8-32cdfe2668e8 + AddDefaultCastReceivers + + + 852816e0-2712-49a9-9240-c6fc5fcad1a8 + UpdateDefaultPluginRepository10.9 + + + 4ef123d5-8eff-4b0b-869d-3aed07a60e1b + MoveTrickplayFiles + + + 9b354818-94d5-4b68-ac49-e35cb85f9d84 + CreateNetworkConfiguration + + + a6dcacf4-c057-4ef9-80d3-61cef9ddb4f0 + MigrateMusicBrainzTimeout + + + 4fb5c950-1991-11ee-9b4b-0800200c9a66 + MigrateNetworkConfiguration + + + a8e61960-7726-4450-8f3d-82c12daabbcb + MigrateEncodingOptions + + + 4124c2cd-e939-4ffb-9be9-9b311c413638 + DisableTranscodingThrottling + + + ef103419-8451-40d8-9f34-d1a8e93a1679 + CreateLoggingConfigHeirarchy + + + 3793eb59-bc8c-456c-8b9f-bd5a62a42978 + MigrateActivityLogDatabase + + + acbe17b7-8435-4a83-8b64-6fcf162cb9bd + RemoveDuplicateExtras + + + 5c4b82a2-f053-4009-bd05-b6fcad82f14c + MigrateUserDatabase + + + 06387815-c3cc-421f-a888-fb5f9992bea8 + MigrateDisplayPreferencesDatabase + + + a81f75e0-8f43-416f-a5e8-516ccab4d8cc + RemoveDownloadImagesInAdvance + + + 5bd72f41-e6f3-4f60-90aa-09869abe0e22 + MigrateAuthenticationDatabase + + + 615dfa9e-2497-4dbb-a472-61938b752c5b + FixPlaylistOwner + + + d34bfc33-5d2e-4790-8085-069ef6eecb4e + MigrateRatingLevels + + + cf6fabc2-9fbe-4933-84a5-ffe52ef22a58 + FixAudioData + + + 96c156a2-7a13-4b3b-a8b8-fb80c94d20c0 + RemoveDuplicatePlaylistChildren + + + \ No newline at end of file diff --git a/jellyfin/config/config/network.xml b/jellyfin/config/config/network.xml new file mode 100644 index 0000000..5eef56b --- /dev/null +++ b/jellyfin/config/config/network.xml @@ -0,0 +1,28 @@ + + + + false + false + + + 8096 + 8920 + 8096 + 8920 + true + false + true + false + true + + + + true + + veth + + false + + + false + \ No newline at end of file diff --git a/jellyfin/config/config/system.xml b/jellyfin/config/config/system.xml new file mode 100644 index 0000000..f313e9c --- /dev/null +++ b/jellyfin/config/config/system.xml @@ -0,0 +1,191 @@ + + + 3 + true + false + true + true + true + true + true + + en + US + + . + + + % + + + , + & + - + { + } + ' + + + the + a + an + + 5 + 90 + 300 + 5 + 5 + 0 + 60 + 30 + Legacy + + + Book + + + + + + + + + Movie + + + + + + + + + MusicVideo + + + + The Open Movie Database + + + + The Open Movie Database + + + + + Series + + + + + + + + + MusicAlbum + + + + TheAudioDB + + + + + + + MusicArtist + + + + TheAudioDB + + + + + + + BoxSet + + + + + + + + + Season + + + + + + + + + Episode + + + + + + + + + true + + de + false + + 0 + false + false + true + + + + Jellyfin Stable + https://repo.jellyfin.org/files/plugin/manifest.json + true + + + true + 0 + + true + 500 + + * + + 30 + 0 + 0 + true + true + 0 + MatchSource + 0 + + + F007D354 + Stable + + + 6F511C87 + Unstable + + + + false + false + false + NonBlocking + BelowNormal + 10000 + + 320 + + 10 + 10 + 4 + 90 + 1 + + \ No newline at end of file diff --git a/jellyfin/docker-compose.yml b/jellyfin/docker-compose.yml new file mode 100644 index 0000000..6e348f8 --- /dev/null +++ b/jellyfin/docker-compose.yml @@ -0,0 +1,33 @@ +services: + jellyfin: + image: jellyfin/jellyfin + container_name: jellyfin + user: 1000:1000 +# network_mode: 'host' + ports: + - 8096:8096 + - 8920:8920 #optional + - 7359:7359/udp #optional + - 1900:1900/udp #optional + volumes: + - ./config:/config + - ./cache:/cache + - type: bind + source: /media/extension/music + target: /music + - type: bind + source: /media/extension/video + target: /video +# read_only: true + # Optional - extra fonts to be used during transcoding with subtitle burn-in +# - type: bind +# source: /path/to/fonts +# target: /usr/local/share/fonts/custom +# read_only: true + restart: 'unless-stopped' + # Optional - alternative address used for autodiscovery + environment: + - JELLYFIN_PublishedServerUrl=http://example.com + # Optional - may be necessary for docker healthcheck to pass if running in host network mode + extra_hosts: + - 'host.docker.internal:host-gateway' diff --git a/samba/README.md b/samba/README.md new file mode 100644 index 0000000..c471b51 --- /dev/null +++ b/samba/README.md @@ -0,0 +1,3 @@ +# Samba in a docker container + +TODO: Ldap. Note: smb.conf from config is not used, only during docker image build! ldap can not be configured in the compose file. \ No newline at end of file diff --git a/samba/config/samba/smb.conf b/samba/config/samba/smb.conf index 5a7453d..75b5b58 100644 --- a/samba/config/samba/smb.conf +++ b/samba/config/samba/smb.conf @@ -4,7 +4,16 @@ dns proxy = no # password stuff - passdb backend = smbpasswd + # passdb backend = smbpasswd + + # LDAP Configuration + passdb backend = ldapsam:ldap://ubuntu:389 + ldap admin dn = cn=samba,ou=users,dc=home,dc=thoster,dc=net + ldap suffix = dc=home,dc=thoster,dc=net + ldap user suffix = ou=users + ldap group suffix = ou=groups + # rest via docker compose + obey pam restrictions = yes security = user diff --git a/samba/docker-compose.yml b/samba/docker-compose.yml index d3d9588..0cf83c6 100644 --- a/samba/docker-compose.yml +++ b/samba/docker-compose.yml @@ -20,7 +20,6 @@ services: SAMBA_CONF_LOG_LEVEL: 3 - # uncomment to disable optional services #WSDD2_DISABLE: 1 #AVAHI_DISABLE: 1 @@ -34,19 +33,22 @@ services: #ACCOUNT_oster: "oster:1000:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:86C156FC198B358CCCF6278D8BD49B6A:[U ]:LCT-61B0859A:" ACCOUNT_oster: "oster:1000:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:079B8E33CB77467761A3B505A15D8163:[U ]:LCT-67A885B6:" + ACCOUNT_karin: "karin:1001:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:580F67E12940BCE800781B09EA453D4D:[U ]:LCT-67BF7AE3:" # example for password hashes in the list format: # - "ACCOUNT_foo=foo:1000:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:8846F7EAEE8FB117AD06BDD830B7586C:[U ]:LCT-5FE1F7DF:" UID_oster: 1000 + UID_karin: 1001 GROUPS_oster: family + GROUPS_karin: family - #SAMBA_VOLUME_CONFIG_shared_home: "[Home]; path=/home/%U; valid users = oster; guest ok = no; read only = no; browseable = yes" - SAMBA_VOLUME_CONFIG_home: "[oster]; path=/shares/oster; valid users = oster; guest ok = no; read only = no; browseable = yes" - SAMBA_VOLUME_CONFIG_paperless: "[paperless]; path=/shares/paperless-consume; valid users = oster; guest ok = no; read only = no; browseable = yes" - - SAMBA_VOLUME_CONFIG_public: "[Public]; path=/shares/public; valid users = oster; guest ok = no; read only = no; browseable = yes; force group = 1000" - SAMBA_VOLUME_CONFIG_public_ro: "[Public ReadOnly]; path=/shares/public; guest ok = yes; read only = yes; browseable = yes; force group = 1000" - - + SAMBA_VOLUME_CONFIG_oster: "[oster]; path=/shares/oster; valid users = oster; guest ok = no; read only = no; browseable = yes" + SAMBA_VOLUME_CONFIG_karin: "[karin]; path=/shares/karin; valid users = karin; guest ok = no; read only = no; browseable = yes" + SAMBA_VOLUME_CONFIG_paperless: "[paperless]; path=/shares/paperless-consume; valid users = oster, karin; guest ok = no; read only = no; browseable = yes" + SAMBA_VOLUME_CONFIG_public: "[Public]; path=/shares/public; valid users = oster, karin; guest ok = no; read only = no; browseable = yes" + SAMBA_VOLUME_CONFIG_public_ro: "[Public ReadOnly]; path=/shares/public; guest ok = yes; read only = yes; browseable = yes" + SAMBA_VOLUME_CONFIG_video_ro: "[Video]; path=/shares/video; guest ok = no; read only = no; browseable = yes" + SAMBA_VOLUME_CONFIG_music_ro: "[Music]; path=/shares/music; guest ok = no; read only = no; browseable = yes" + SAMBA_VOLUME_CONFIG_karinstefan: "[karin stefan]; path=/shares/karin-stefan; valid users = oster, karin; guest ok = no; read only = no; browseable = yes" #SAMBA_VOLUME_CONFIG_guestmultilineexample: | # [Guest Share] # path = /shares/guest @@ -57,6 +59,10 @@ services: - /etc/avahi/services/:/external/avahi # avoid loops when mounting folders to /shares (I'd recommend explicit mapping for each share) - - ./shares/public:/shares/public - - ./shares/oster:/shares/oster + - /media/ssd/public:/shares/public + - /media/ssd/oster:/shares/oster + - /media/ssd/karin:/shares/karin + - /media/ssd/karin-stefan:/shares/karin-stefan + - /media/extension/music:/shares/music + - /media/extension/video:/shares/video - ./paperless-consume:/shares/paperless-consume diff --git a/traefik/conf.d/rules.yml b/traefik/conf.d/rules.yml index 60cabff..34f6dbf 100644 --- a/traefik/conf.d/rules.yml +++ b/traefik/conf.d/rules.yml @@ -36,6 +36,13 @@ http: service: paperless-service tls: certResolver: letsencrypt + jellyfin-router: + entryPoints: + - "websecure" + rule: "Host(`media.home.thoster.net`) && PathPrefix(`/`)" + service: jellyfin-service + tls: + certResolver: letsencrypt hass-router-auth: entryPoints: - "websecure" @@ -157,6 +164,10 @@ http: loadBalancer: servers: - url: "http://ubuntu:8000" + jellyfin-service: + loadBalancer: + servers: + - url: "http://ubuntu:8096" dummy-service: loadBalancer: servers: diff --git a/wikimd/wiki/homepage.md b/wikimd/wiki/homepage.md index 3e841e0..46161b0 100644 --- a/wikimd/wiki/homepage.md +++ b/wikimd/wiki/homepage.md @@ -8,15 +8,21 @@ [Paperless Dokumentenmanagement](https://pl.home.thoster.net) +[Jellyfin Medien](https://media.home.thoster.net) + [KI Server](https://ai.home.thoster.net) -> wenn der Rechner im Keller aus ist, gehen nur die öffentlichen Modelle! +Der Rechner lässt sich über Homeassistant hochfahren! #### Alte Dinge + [Photo App auf der NAS](https://home.thoster.net:446/photo/) ### Interne Dienste [Proxmox](https://192.168.178.99:8006) +[Jellyfin Medienserver](http://ubuntu:8096/) + [Zigbee2mqtt](http://ubuntu:8080/#/) [Portainer](http://ubuntu:9100) @@ -29,7 +35,15 @@ [Paperless ai](http://ubuntu:3000/) +#### Netzlaufwerke + +Unter Windows mit ```\\ubuntu``` +Hier gibt es die bekannten Netzlaufwerke für Backups, z.B. karin-stefan + https://www.reddit.com/r/homeassistant/comments/oje65v/home_assitant_with_grafana_and_influxdb_2x_basic/ ### Probleme / TODOs + +#### Homeassistant + * Nach dem Neustart des Servers funktioniert der zigbee stick nicht! In Proxmox entfernen und wieder hinzufügen.