--- layout : post title : "Jellyfin&qBit: 自建家庭影音" subtitle : "ADs? pay for songs? Go away!" date : 2022-05-21 11:31:40 author : "Manford Fan" catalog : false header-img : "img/post-bg-universe.jpg" tags : - Jellyfin - qBitTorrent --- 上周刚搭建好了mStream,上周日睡了一整天,晚上精神了,又失眠了一整夜。漫漫长夜,总要找点事情做,未竟的事业继续吧——Jellyfin。随着Jellyfin构建的完成,mStream昙花一现的历史也随之终结,虽然也不是很好用。Jellyfin集成了音乐,电影,电视剧,书籍,图片的汇总与播放功能,是作为家庭影院的一个比较好的方案选择。同时,该应用也是跨平台的,美中不足的是不支持离线访问,期待以后的更新。 ## 一、Jellyfin Jellyfin功能很强大,但是部署过程还是很简单的,官方给出了三种方式:docker,二进制包以及源码方式,如下是最简单的二进制安装方式: ```bash $ apt install curl gnupg $ curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/jellyfin.gpg $ echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/$( awk -F'=' '/^ID=/{ print $NF }' /etc/os-release ) $( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release ) main" | tee /etc/apt/sources.list.d/jellyfin.list $ apt update $ apt install jellyfin ``` ## 二、qBitTorrent qBitTorrent是跨平台的BT/PT下载工具,腾讯VPS的下行带宽被限制,但是上行带宽没有被限制,下载速度还是很可观的(可以达到30MBps,可以狠狠的薅一把羊毛了),所以可以直接用qBitTorrent的命令行版,也即nox/web UI版本来直接下载到VPS上,然后在通过Jellyfin观看。安装命令很简单,属于标准包,所以直接执行`apt install qbittorrent-nox`即可。运行的时候直接执行`qbittorrent-nox`,会出现如下: ```text *** Legal Notice *** qBittorrent is a file sharing program. When you run a torrent, its data will be made available to others by means of upload. Any content you share is your sole responsibility. No further notices will be issued. Press 'y' key to accept and continue... y ******** Information ******** To control qBittorrent, access the Web UI at http://localhost:8080 The Web UI administrator username is: admin The Web UI administrator password is still the default one: adminadmin This is a security risk, please consider changing your password from program preferences. ``` > **注意:**使用第一次必须先用手动执行一次`qbittorrent-nox`命令 ## 三、配置域名以及反向代理 > **对于Jellyfin** 无需指定root,直接在一个location里面写一行`proxy_pass http://localhost:8096;`即可。如下是配置好的界面: