在Ubuntu上实现Jellyfin远程访问,可按以下步骤操作:
安装Jellyfin:通过APT仓库或Docker安装,命令如:
sudo apt update && sudo apt install jellyfin -y
配置网络与防火墙:
ufw开启防火墙并放行端口:sudo ufw allow 8096/tcp
sudo ufw enable
设置反向代理(推荐):
sudo apt install nginx
/etc/nginx/sites-available/jellyfin.conf),添加反向代理规则:server {
listen 80;
server_name your_domain_or_ip;
location / {
proxy_pass http://localhost:8096;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
sudo systemctl restart nginx配置SSL证书(可选但推荐):
sudo certbot certonly --webroot -w /var/www/html -d your_domain
远程访问测试:
通过浏览器输入服务器公网IP或域名(如https://your_domain:8096),完成初始设置即可访问。
安全建议:启用强密码、定期更新系统及软件,必要时使用内网穿透工具(如cpolar)应对复杂网络环境。
参考来源: