惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

Docker 归档 | Jack's Space

笔记|Docker 快速搭建 FreshRSS 结合宝塔和 Docker 安装 Bitwarden 及数据迁移
Filebrowser + Jellyfin 搭建自己的媒体库
阿杰 Jack · 2022-06-02 · via Docker 归档 | Jack's Space

利用 Jellyfin 可以搭建自己的个人媒体库,能将自己的资源如同视频网站一样呈现,用户可以通过网站浏览的形式访问自己存在服务器中的资源,仿佛一个独享的奈飞。同类的产品还有Plex、Emby,但因为 Jellyfin免费开源,更符合我的偏好。

Jellyfin Github地址

https://github.com/jellyfin/jellyfin

有了影音资源的媒体库,还需要一个文件管理工具。这里选用了Filebrowser,它能够在网页上直接管理服务器里的文件,完全可以作为一个轻量的云盘使用。并且同样是免费开源,且安装简单,功能够用。

Filebrowser Github地址

https://github.com/filebrowser/filebrowser

目录

  1. 教程
    • 安装Jellyfin
    • 安装Filebrowser

教程

先解析两个二级域名a.yourweb.com 和 b.youweb.com到你的服务器。

安装Jellyfin

  • 这里采用docker来进行安装,其他的安装方法参考官方文档
docker run -d \
 --name jellyfin \
 --net=host \
 --volume /root/data/jellyfin/config:/config \
 --volume /root/data/jellyfin/cache:/cache \
 --mount type=bind,source=/root/data/jellyfin/media,target=/media \
 --restart=unless-stopped \
 jellyfin/jellyfin
  • 其中
    /root/data/jellyfin/config
    /root/data/jellyfin/cache
    /root/data/jellyfin/media
    三个文件夹需要提前创建好,也可以按照自己的需求修改到其他位置。其中/root/data/jellyfin/media 下我会存放媒体资源,该路径后面安装Filebrowser会用到。
  • 容器创建好后,需要在宝塔防火墙处放行默认的8096端口。
  • 然后创建一个以域名 a.yourweb.com的网站,并在宝塔网站设置的Config下设置反向代理
    将52–64行注释掉并在后面添加:
  location / {
  proxy_pass http://127.0.0.1:8096/;
  rewrite ^/(.*)$ /$1 break;
  proxy_redirect off;
  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header Upgrade-Insecure-Requests 1;
  proxy_set_header X-Forwarded-Proto https;
  }
  • 现在即可通过 a.yourweb.com访问你的Jellyfin媒体库

安装Filebrowser

  • 先创建一个文件夹用来存放Filebrowser的db文件
mkdir -p data/filebrowser
curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
  • 此时输入 filebrowser -r /path/to/your/files 就可以运行程序,并管理 /path/to/your/files 路径下的文件,但是为了能够让其在后台持续运行,我们先在宝塔安装守护进程。
  • 先在aapanel中安装supervisor插件
    进入该插件的设置,
    点击 Add Daemon
    Run Dir 填入 /root/data/filebrowser
    Start Command 填入filebrowser -r /root/data/jellyfin/media
    Name 按需填写,其余不变,然后确认
  • 其中Run Dir中的路径下会自动生成一个db文件,而-r /root/data/jellyfin/media中的路径为Filebrowser能够管理的文件夹,你也可以按需修改。
  • 同上面一样,以域名 b.yourweb.com的网站创建网站,并反向代理默认的8080端口
  location / {
  proxy_pass http://127.0.0.1:8080/;
  rewrite ^/(.*)$ /$1 break;
  proxy_redirect off;
  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header Upgrade-Insecure-Requests 1;
  proxy_set_header X-Forwarded-Proto https;
  }
  • 此时,已经可以通过 b.yourweb.com 访问FIlebrowser进行文件管理,
    默认用户名为 admin
    密码为admin