{"id":15,"date":"2026-09-16T10:58:12","date_gmt":"2026-09-16T02:58:12","guid":{"rendered":"http:\/\/www.nassch.com\/index.php\/2026\/09\/16\/nas-jellyfin-docker\/"},"modified":"2026-09-16T11:08:25","modified_gmt":"2026-09-16T03:08:25","slug":"nas-jellyfin-docker","status":"publish","type":"post","link":"https:\/\/www.nassch.com\/index.php\/2026\/09\/16\/nas-jellyfin-docker\/","title":{"rendered":"\u628a NAS \u53d8\u6210\u5bb6\u5ead\u5f71\u97f3\u4e2d\u5fc3\uff1aJellyfin + Docker \u5b9e\u6218\u90e8\u7f72"},"content":{"rendered":"<h2>\u4e00\u3001\u4e3a\u4ec0\u4e48\u7528 Docker \u90e8\u7f72<\/h2>\n<p>\u5728 NAS \u4e0a\u88c5\u5e94\u7528\uff0c\u6700\u7701\u5fc3\u7684\u529e\u6cd5\u51e0\u4e4e\u662f\u6e05\u4e00\u8272\u7684 Docker\u3002\u539f\u56e0\u5f88\u7b80\u5355\uff1a<\/p>\n<ul>\n<li><strong>\u4e0d\u6c61\u67d3\u7cfb\u7edf<\/strong>\uff1a\u5e94\u7528\u548c\u4f9d\u8d56\u90fd\u6253\u5305\u5728\u5bb9\u5668\u91cc\uff0c\u88c5\u5341\u4e2a\u670d\u52a1\u4e5f\u4e0d\u4f1a\u628a\u7cfb\u7edf\u641e\u4e71\u3002<\/li>\n<li><strong>\u5347\u7ea7\u56de\u6eda\u65b9\u4fbf<\/strong>\uff1a\u6362\u955c\u50cf\u7248\u672c\u53f7\u5c31\u662f\u5347\u7ea7\uff0c\u51fa\u95ee\u9898\u6539\u56de\u53bb\u5373\u53ef\u3002<\/li>\n<li><strong>\u8fc1\u79fb\u7b80\u5355<\/strong>\uff1a\u914d\u7f6e\u6587\u4ef6\u548c docker-compose.yml \u62f7\u5230\u65b0\u673a\u5668\uff0c\u4e00\u6761\u547d\u4ee4\u5c31\u80fd\u8dd1\u8d77\u6765\u3002<\/li>\n<li><strong>\u8d44\u6e90\u9694\u79bb<\/strong>\uff1a\u53ef\u4ee5\u9650\u5236\u6bcf\u4e2a\u5bb9\u5668\u7684 CPU \u548c\u5185\u5b58\u5360\u7528\uff0c\u4e0d\u81f3\u4e8e\u4e00\u4e2a\u670d\u52a1\u62d6\u57ae\u6574\u53f0 NAS\u3002<\/li>\n<\/ul>\n<p>\u4e0b\u9762\u4ee5 Jellyfin \u4e3a\u4f8b\uff0c\u5b8c\u6574\u8d70\u4e00\u904d\u90e8\u7f72\u6d41\u7a0b\u3002Jellyfin \u662f\u4e00\u6b3e\u5b8c\u5168\u5f00\u6e90\u514d\u8d39\u7684\u5f71\u97f3\u670d\u52a1\u5668\uff0c\u80fd\u628a\u4f60\u786c\u76d8\u91cc\u7684\u7535\u5f71\u3001\u5267\u96c6\u6574\u7406\u6210\u5e26\u6d77\u62a5\u5899\u7684\u79c1\u4eba\u5f71\u9662\uff0c\u624b\u673a\u3001\u7535\u89c6\u3001\u5e73\u677f\u90fd\u80fd\u63a5\u7740\u770b\u3002<\/p>\n<h2>\u4e8c\u3001\u51c6\u5907\u5de5\u4f5c<\/h2>\n<h3>1. \u89c4\u5212\u76ee\u5f55\u7ed3\u6784<\/h3>\n<p>\u5efa\u8bae\u628a\u5bb9\u5668\u914d\u7f6e\u548c\u6570\u636e\u5206\u5f00\u5b58\u653e\uff0c\u65b9\u4fbf\u5907\u4efd\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code>\/docker\/jellyfin\/config   # \u914d\u7f6e\u6587\u4ef6\n\/docker\/jellyfin\/cache    # \u7f13\u5b58\n\/media\/movies             # \u7535\u5f71\n\/media\/tvshows            # \u5267\u96c6\n<\/code><\/pre>\n<h3>2. \u786e\u8ba4\u7528\u6237\u6743\u9650<\/h3>\n<p>\u5f88\u591a\u5bb9\u5668\u542f\u52a8\u5931\u8d25\uff0c\u90fd\u662f\u5361\u5728\u6743\u9650\u4e0a\u3002\u5148\u67e5\u6e05\u695a\u5f53\u524d\u7528\u6237\u7684 UID \u548c GID\uff1a<\/p>\n<pre><code>id your_username\n<\/code><\/pre>\n<p>\u8bb0\u4e0b\u8f93\u51fa\u7684 uid \u548c gid\uff0c\u540e\u9762\u8981\u5199\u8fdb compose \u6587\u4ef6\u3002\u540c\u65f6\u786e\u4fdd\u5a92\u4f53\u76ee\u5f55\u5bf9\u5e94\u7528\u6237\u6709\u8bfb\u5199\u6743\u9650\uff1a<\/p>\n<pre><code>sudo chown -R 1000:1000 \/docker\/jellyfin\nsudo chmod -R 755 \/media\n<\/code><\/pre>\n<h2>\u4e09\u3001\u7f16\u5199 docker-compose.yml<\/h2>\n<p>\u5728 <code>\/docker\/jellyfin\/<\/code> \u76ee\u5f55\u4e0b\u65b0\u5efa <code>docker-compose.yml<\/code>\uff1a<\/p>\n<pre><code>services:\n  jellyfin:\n    image: jellyfin\/jellyfin:latest\n    container_name: jellyfin\n    user: 1000:1000\n    network_mode: host\n    environment:\n      - TZ=Asia\/Shanghai\n    volumes:\n      - .\/config:\/config\n      - .\/cache:\/cache\n      - \/media\/movies:\/media\/movies:ro\n      - \/media\/tvshows:\/media\/tvshows:ro\n    devices:\n      - \/dev\/dri:\/dev\/dri\n    restart: unless-stopped\n<\/code><\/pre>\n<p>\u51e0\u4e2a\u5173\u952e\u70b9\u8bf4\u660e\uff1a<\/p>\n<ul>\n<li><code>user: 1000:1000<\/code> \u6362\u6210\u524d\u9762\u67e5\u5230\u7684\u5b9e\u9645 UID \u548c GID\uff0c\u8fd9\u662f\u907f\u514d\u6743\u9650\u62a5\u9519\u7684\u5173\u952e\u3002<\/li>\n<li><code>network_mode: host<\/code> \u8ba9\u5bb9\u5668\u76f4\u63a5\u4f7f\u7528\u4e3b\u673a\u7f51\u7edc\uff0c\u65b9\u4fbf\u5c40\u57df\u7f51\u8bbe\u5907\u901a\u8fc7 DLNA \u53d1\u73b0\u670d\u52a1\uff0c\u4e5f\u7701\u53bb\u7aef\u53e3\u6620\u5c04\u7684\u9ebb\u70e6\u3002<\/li>\n<li><code>devices<\/code> \u8fd9\u4e00\u884c\u628a\u6838\u663e\u8bbe\u5907\u900f\u4f20\u7ed9\u5bb9\u5668\uff0c\u662f\u5f00\u542f\u786c\u4ef6\u8f6c\u7801\u7684\u524d\u63d0\u3002<\/li>\n<li>\u5a92\u4f53\u76ee\u5f55\u52a0\u4e86 <code>:ro<\/code> \u53ea\u8bfb\u6302\u8f7d\uff0c\u9632\u6b62\u5e94\u7528\u8bef\u5220\u4f60\u7684\u7247\u5e93\u3002<\/li>\n<\/ul>\n<p>\u7136\u540e\u542f\u52a8\uff1a<\/p>\n<pre><code>cd \/docker\/jellyfin\ndocker compose up -d\n<\/code><\/pre>\n<p>\u6d4f\u89c8\u5668\u8bbf\u95ee <code>http:\/\/NAS\u7684IP:8096<\/code>\uff0c\u5c31\u80fd\u770b\u5230\u521d\u59cb\u5316\u5411\u5bfc\u4e86\u3002<\/p>\n<h2>\u56db\u3001\u5f00\u542f\u786c\u4ef6\u8f6c\u7801<\/h2>\n<p>\u786c\u89e3\u80fd\u8ba9 NAS \u5728\u4f4e CPU \u5360\u7528\u7684\u60c5\u51b5\u4e0b\u6d41\u7545\u8f6c\u7801 4K \u89c6\u9891\uff0c\u8fd9\u4e00\u6b65\u522b\u8df3\u8fc7\u3002<\/p>\n<p>\u8fdb\u5165 Jellyfin \u540e\u53f0\uff1a<strong>\u63a7\u5236\u53f0 \u2192 \u64ad\u653e \u2192 \u8f6c\u7801<\/strong>\uff0c\u786c\u4ef6\u52a0\u901f\u9009\u62e9 <strong>Video Acceleration API\uff08VAAPI\uff09<\/strong> \u6216 <strong>Quick Sync<\/strong>\uff08\u53d6\u51b3\u4e8e\u4f60\u7684 CPU\uff09\uff0cVA-API \u8bbe\u5907\u586b <code>\/dev\/dri\/renderD128<\/code>\uff0c\u52fe\u9009\u300c\u542f\u7528\u786c\u4ef6\u89e3\u7801\u300d\u4e2d\u9700\u8981\u652f\u6301\u7684\u7f16\u7801\u683c\u5f0f\uff08H.264\u3001HEVC \u7b49\uff09\u3002<\/p>\n<p>\u9a8c\u8bc1\u662f\u5426\u751f\u6548\uff1a\u64ad\u653e\u4e00\u4e2a\u9ad8\u7801\u7387\u89c6\u9891\uff0c\u7136\u540e\u67e5\u770b\u64ad\u653e\u9875\u9762\u7684\u300c\u6b63\u5728\u8f6c\u7801\u300d\u4fe1\u606f\uff0c\u6216\u8005\u5728\u5bb9\u5668\u91cc\u6267\u884c\uff1a<\/p>\n<pre><code>docker exec -it jellyfin \/usr\/lib\/jellyfin-ffmpeg\/ffmpeg -v debug -init_hw_device vaapi\n<\/code><\/pre>\n<p>\u4e5f\u53ef\u4ee5\u76f4\u63a5\u770b\u5bbf\u4e3b\u673a\u7684 <code>intel_gpu_top<\/code>\uff0c\u6709\u5360\u7528\u5c31\u8bf4\u660e\u6838\u663e\u5728\u5de5\u4f5c\u3002<\/p>\n<h2>\u4e94\u3001\u5a92\u4f53\u5e93\u6574\u7406\u4e0e\u522e\u524a<\/h2>\n<p>\u80fd\u4e0d\u80fd\u522e\u524a\u51fa\u6f02\u4eae\u7684\u6d77\u62a5\u5899\uff0c\u4e5d\u6210\u53d6\u51b3\u4e8e\u6587\u4ef6\u547d\u540d\u662f\u5426\u89c4\u8303\u3002\u63a8\u8350\u683c\u5f0f\uff1a<\/p>\n<pre><code>\u7535\u5f71\uff1a\n  \/media\/movies\/\u8718\u86db\u4fa0\uff1a\u82f1\u96c4\u65e0\u5f52 (2021)\/\u8718\u86db\u4fa0\uff1a\u82f1\u96c4\u65e0\u5f52 (2021).mkv\n\n\u5267\u96c6\uff1a\n  \/media\/tvshows\/\u6743\u529b\u7684\u6e38\u620f\/Season 01\/\u6743\u529b\u7684\u6e38\u620f S01E01.mkv\n<\/code><\/pre>\n<p>\u6dfb\u52a0\u5a92\u4f53\u5e93\u65f6\uff0c\u5185\u5bb9\u7c7b\u578b\u9009\u300c\u7535\u5f71\u300d\u6216\u300c\u5267\u96c6\u300d\uff0c\u5143\u6570\u636e\u8bed\u8a00\u9009 Chinese Simplified\uff0c\u52fe\u9009\u9700\u8981\u7684\u5143\u6570\u636e\u4e0b\u8f7d\u5668\u5373\u53ef\u3002\u5982\u679c\u6d77\u62a5\u522e\u4e0d\u51fa\u6765\uff0c\u591a\u534a\u662f\u547d\u540d\u4e0d\u542b\u5e74\u4efd\uff0c\u6216\u8005\u76ee\u5f55\u5c42\u7ea7\u4e0d\u5bf9\u3002<\/p>\n<h2>\u516d\u3001\u51e0\u4e2a\u5e38\u89c1\u5751<\/h2>\n<ul>\n<li><strong>\u6743\u9650\u62a5\u9519<\/strong>\uff1a\u5bb9\u5668\u65e5\u5fd7\u51fa\u73b0 <code>Permission denied<\/code>\uff0c\u4e5d\u6210\u662f UID\/GID \u6ca1\u5199\u5bf9\uff0c\u6216\u8005\u76ee\u5f55\u5c5e\u4e3b\u4e0d\u5bf9\u3002<\/li>\n<li><strong>\u6838\u663e\u4e0d\u901a<\/strong>\uff1a\u5148\u786e\u8ba4\u5bbf\u4e3b\u673a <code>ls \/dev\/dri<\/code> \u6709\u8f93\u51fa\uff0c\u5bb9\u5668\u91cc\u4e5f\u8981\u80fd\u770b\u5230\uff1b\u6ca1\u6709\u7684\u8bdd\u68c0\u67e5 BIOS \u662f\u5426\u5f00\u542f\u4e86\u6838\u663e\u3002<\/li>\n<li><strong>\u5916\u7f51\u8bbf\u95ee\u5361<\/strong>\uff1a\u52a1\u5fc5\u5f00\u542f\u786c\u4ef6\u8f6c\u7801\uff0c\u7eaf CPU \u8f6f\u89e3 4K \u57fa\u672c\u8dd1\u4e0d\u52a8\u3002<\/li>\n<li><strong>\u5b57\u5e55\u4e71\u7801<\/strong>\uff1a\u5728\u64ad\u653e\u8bbe\u7f6e\u91cc\u628a\u5b57\u5e55\u7f16\u7801\u8bbe\u4e3a UTF-8\uff0c\u6216\u8005\u7528\u5de5\u5177\u6279\u91cf\u8f6c\u7801\u5b57\u5e55\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<h2>\u4e03\u3001\u987a\u5e26\u4e00\u63d0\uff1a\u5176\u4ed6\u503c\u5f97\u90e8\u7f72\u7684\u670d\u52a1<\/h2>\n<p>\u638c\u63e1\u4e86 Docker \u4e4b\u540e\uff0c\u540c\u4e00\u5957\u601d\u8def\u53ef\u4ee5\u90e8\u7f72\u5f88\u591a\u4e1c\u897f\uff1a<\/p>\n<ul>\n<li><strong>Nextcloud<\/strong>\uff1a\u81ea\u5efa\u79c1\u6709\u4e91\u76d8\uff0c\u6587\u4ef6\u540c\u6b65\u3001\u5728\u7ebf\u534f\u4f5c\u3001\u65e5\u5386\u8054\u7cfb\u4eba\u4e00\u5e94\u4ff1\u5168\u3002<\/li>\n<li><strong>PhotoPrism \/ Immich<\/strong>\uff1aAI \u8bc6\u56fe\u7684\u7167\u7247\u7ba1\u7406\uff0c\u80fd\u6309\u4eba\u8138\u3001\u5730\u70b9\u3001\u7269\u4f53\u81ea\u52a8\u5206\u7c7b\uff0c\u662f\u624b\u673a\u76f8\u518c\u7684\u7edd\u4f73\u66ff\u4ee3\u3002<\/li>\n<li><strong>qBittorrent<\/strong>\uff1a\u6302\u673a\u4e0b\u8f7d\uff0c\u914d\u5408\u81ea\u52a8\u5316\u5de5\u5177\u5b9e\u73b0\u8ffd\u5267\u81ea\u52a8\u5165\u5e93\u3002<\/li>\n<li><strong>Vaultwarden<\/strong>\uff1a\u81ea\u5efa\u5bc6\u7801\u7ba1\u7406\u5668\uff0cBitwarden \u7684\u8f7b\u91cf\u7ea7\u670d\u52a1\u7aef\u5b9e\u73b0\u3002<\/li>\n<\/ul>\n<h2>\u5c0f\u7ed3<\/h2>\n<p>Docker \u662f\u628a NAS \u4ece\u300c\u5b58\u50a8\u5668\u300d\u53d8\u6210\u300c\u5bb6\u5ead\u670d\u52a1\u5668\u300d\u7684\u94a5\u5319\u3002\u5165\u95e8\u53ea\u9700\u8981\u7406\u89e3\u4e09\u4ef6\u4e8b\uff1a\u914d\u7f6e\u548c\u6570\u636e\u8981\u5206\u5f00\u6302\u8f7d\u3001\u6743\u9650\u9760 UID\/GID \u5bf9\u9f50\u3001\u5347\u7ea7\u6539\u955c\u50cf\u7248\u672c\u53f7\u3002\u5269\u4e0b\u7684\u5c31\u662f\u7167\u7740 compose \u6587\u4ef6\u6284\uff0c\u6284\u51e0\u6b21\u5c31\u719f\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 NAS \u4e0a\u88c5\u5e94\u7528\uff0c\u6700\u7701\u5fc3\u7684\u529e\u6cd5\u51e0\u4e4e\u662f\u6e05\u4e00\u8272\u7684 Docker\u3002\u539f\u56e0\u5f88\u7b80\u5355\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-3"],"_links":{"self":[{"href":"https:\/\/www.nassch.com\/index.php\/wp-json\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nassch.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nassch.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nassch.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nassch.com\/index.php\/wp-json\/wp\/v2\/comments?post=15"}],"version-history":[{"count":1,"href":"https:\/\/www.nassch.com\/index.php\/wp-json\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":20,"href":"https:\/\/www.nassch.com\/index.php\/wp-json\/wp\/v2\/posts\/15\/revisions\/20"}],"wp:attachment":[{"href":"https:\/\/www.nassch.com\/index.php\/wp-json\/wp\/v2\/media?parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nassch.com\/index.php\/wp-json\/wp\/v2\/categories?post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nassch.com\/index.php\/wp-json\/wp\/v2\/tags?post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}