Complete Guide to Setting Up Emby on FNOS System
- Published on
- ...
- Authors

- Name
- Huashan
- @herohuashan
System Environment
- Hardware: PVE Virtual Machine
- System: FNOS (based on Debian)
- Network: PVE Virtual Machine, gateway is Mac Mini (192.168.71.100)
- FNOS IP: 192.168.71.9
- FNOS Management Port: 5666
Objectives
- Install Emby Server via Docker
- Mount cloud storage (115 Cloud Drive, Baidu Netdisk, etc.) via CloudDrive2
- Enable Emby to read content from cloud storage
- Enable external network access via FRP
- MetaTube Plugin: Provide complete metadata scraping for adult content
Part 1: Environment Preparation
1.1 SSH Login and Obtain Root Access
ssh [email protected]
sudo -i
1.2 Create Directory Structure
/vol1/1000/
├── Docker/
│ ├── emby/
│ │ ├── config/
│ │ └── metadata/
│ └── clouddrive2/
│ └── config/
├── CloudNAS/ # For mounting cloud storage
└── Media/
└── Videos/ # Local videos (optional)
Part 2: Configure Docker Mount Sharing
2.1 Set Docker Mount to Shared Mode
# Create Docker service configuration directory
sudo mkdir -p /etc/systemd/system/docker.service.d/
# Create mount sharing configuration
sudo cat <<EOF > /etc/systemd/system/docker.service.d/clear_mount_propagation_flags.conf
[Service]
MountFlags=shared
EOF
# Restart Docker service
sudo systemctl restart docker.service
Part 3: Install CloudDrive2
3.1 Install CloudDrive2 via Command Line
# Remove any existing CloudDrive2 container (if present)
docker stop clouddrive2 2>/dev/null || true
docker rm clouddrive2 2>/dev/null || true
# Create CloudDrive2 container
docker run -d \
--name clouddrive2 \
--restart=unless-stopped \
--env CLOUDDRIVE_HOME=/Config \
-v /vol1/1000/CloudNAS:/CloudNAS:shared \
-v /vol1/1000/Docker/clouddrive2/config:/Config \
--network host \
--pid host \
--privileged \
--device /dev/fuse:/dev/fuse \
cloudnas/clouddrive2
3.2 Configure Cloud Storage Mounting
- Access CloudDrive2 management interface:
http://192.168.71.9:19798 - Login to your CloudDrive2 account (requires lifetime membership)
- Add mount point:
- Name: 115 (or other cloud storage name)
- Mount Point: Select
CloudNASdirectory - Auto-mount on startup: Check
- User ID: 0
- Group ID: 0
- Permissions: 0755
3.3 Verify Mounting
# Check mount status
ls -la /vol1/1000/CloudNAS/
# You should see cloud storage folders, such as: 115, baidu, etc.
Part 4: Install Emby Server
4.1 Install Emby via Command Line
# Remove any existing Emby container (if present)
docker stop emby 2>/dev/null || true
docker rm emby 2>/dev/null || true
# Create Emby container
docker run -d \
--name emby \
-p 8096:8096 \
-p 8920:8920 \
-e TZ=Asia/Shanghai \
-e UID=0 \
-e GID=0 \
--privileged=true \
--device /dev/dri:/dev/dri \
-v /vol1/1000/Docker/emby/config:/config \
-v /vol1/1000/CloudNAS:/media:shared \
-v /vol1/1000/Docker/emby/metadata:/metadata \
--restart=unless-stopped \
--network host \
emby/embyserver:latest
4.2 Verify Emby Can Access Cloud Storage
# Enter Emby container to check mounting
docker exec -it emby sh
ls -la /media/
ls -la /media/115/ # You should see 115 cloud storage content
exit
4.3 Configure Emby
- Access Emby management interface:
http://192.168.71.9:8096 - Complete initial setup
- Add media library:
- Type: Movies/TV Shows
- Path:
/media/115/movie/(according to actual cloud storage directory structure) - Add other cloud storage paths as needed
Part 5: Configure FRP External Network Access
5.1 Download and Install FRP
# Download latest FRP version
cd /opt
wget https://github.com/fatedier/frp/releases/download/v0.64.0/frp_0.64.0_linux_amd64.tar.gz
tar -xzf frp_0.64.0_linux_amd64.tar.gz
cd frp_0.64.0_linux_amd64
5.2 Create FRP Client Configuration
# Create configuration file
cat > frpc.toml << 'EOF'
[common]
server_addr = "101.132.148.140"
server_port = 7000
[fnos_auth]
method = "token"
token = "Qws@33615336"
[fnos_transport]
protocol = "tcp"
tls_enable = true
[fnos_web_5666]
type = "tcp"
local_ip = "127.0.0.1"
local_port = 5666
remote_port = 5666
[fnos_emby_8096]
type = "tcp"
local_ip = "127.0.0.1"
local_port = 8096
remote_port = 8096
[fnos_ssh_2233]
type = "tcp"
local_ip = "127.0.0.1"
local_port = 22
remote_port = 2233
EOF
Note:
- Replace
your Alibaba Cloud server IPwith actual IP - Replace
your FRP_TOKENwith token consistent with server side
5.3 Test FRP Connection
# Test configuration
./frpc -c frpc.toml
# Seeing the following information indicates success:
# [I] login to server success
# [I] [fnos_emby_8096] start proxy success
# [I] [fnos_ssh_2233] start proxy success
# [I] [fnos_web_5666] start proxy success
# Press Ctrl+C to stop test
5.4 Create System Service
# Create systemd service file
cat > /etc/systemd/system/frpc.service << 'EOF'
[Unit]
Description=Frp Client Service
After=network.target
[Service]
Type=simple
User=root
Restart=on-failure
RestartSec=5s
ExecStart=/opt/frp_0.64.0_linux_amd64/frpc -c /opt/frp_0.64.0_linux_amd64/frpc.toml
ExecReload=/bin/kill -s HUP $MAINPID
KillMode=control-group
[Install]
WantedBy=multi-user.target
EOF
# Enable and start service
systemctl daemon-reload
systemctl enable frpc
systemctl start frpc
systemctl status frpc
Part 6: Access Address Summary
Internal Network Access
- FNOS Management Interface:
http://192.168.71.9:5666 - Emby:
http://192.168.71.9:8096 - CloudDrive2:
http://192.168.71.9:19798
External Network Access (via FRP)
- FNOS Management Interface:
http://your_Alibaba_Cloud_IP:5666 - Emby:
http://your_Alibaba_Cloud_IP:8096 - SSH:
ssh root@your_Alibaba_Cloud_IP -p 2233
Part 7: MetaTube Plugin Deployment and Configuration
MetaTube Plugin: Provides complete metadata scraping for adult films in Emby, including covers, actor information, descriptions, etc.
1️⃣ Run MetaTube Server
Create metatube-compose.yml:
cd /vol1/1000/Docker
nano metatube-compose.yml
Write:
services:
metatube-server:
image: ghcr.io/metatube-community/metatube-server:latest
container_name: metatube
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- /vol1/1000/Docker/metatube-server/config:/config
- /vol1/1000/Docker/metatube-server/cache:/cache
environment:
- TZ=Asia/Shanghai
- MT_LOG_LEVEL=debug
- HTTP_PROXY=http://127.0.0.1:7890 # Can be removed if no proxy
- HTTPS_PROXY=http://127.0.0.1:7890
- NO_PROXY=127.0.0.1,localhost,192.168.0.0/16
networks:
- app_network
networks:
app_network:
external: true
Run:
docker-compose -f metatube-compose.yml up -d
Verify:
curl http://your_IP:8080/
Returns:
{"data":{"app":"metatube","version":"v1.7.x"}}
Indicates startup success ✅
2️⃣ Confirm Configuration File
Create /vol1/1000/Docker/metatube-server/config/config.json:
cat > /vol1/1000/Docker/metatube-server/config/config.json <<'JSON'
{
"providers": ["javdb", "bgn", "fc2hub", "javlibrary", "avmoo"],
"server": {
"port": 8080,
"enable_logging": true
}
}
JSON
docker restart metatube
Verify loading:
docker logs -f metatube | grep -Ei "bgn|fc2hub|Loaded"
3️⃣ Emby Plugin Installation
- Download plugin package: MetaTube GitHub Releases
- Open Emby admin console → Plugins → "Install Plugin" → Upload ZIP file.
- Restart Emby after installation:
docker restart emby
4️⃣ Emby Plugin Configuration
Enter Emby Plugins → MetaTube Settings:
- Server URL:
http://127.0.0.1:8080orhttp://192.168.71.9:8080 - Token: Leave empty or customize (keep consistent with server)
- Movie provider filter:
javdb,fc2hub,bgn,javlibrary,avmoo
Save, then rescan media library.
5️⃣ Test API
Test on host machine to see if data is returned correctly:
curl "http://127.0.0.1:8080/v1/movies/search?q=FC2-PPV-1317995&provider=fc2hub&fallback=true"
If it returns 200 and contains cover or title, it's working properly.
6️⃣ Create Adult Content Media Library
Add Media Library:
- Console → Media Library → Add Media Library
- Content Type: Movies
- Display Name: Adult Films
- Folder:
/media/115/adult/(according to actual cloud storage directory structure)
Key Configuration:
- Metadata Downloaders: Only check MetaTube (uncheck all others)
- Image Fetchers: Only check MetaTube
- Advanced Options: Check "Save media images into media folders"
7️⃣ File Naming Conventions
For optimal scraping results, follow these naming conventions:
# Recommended format
MIDE-123.mp4
SSNI-456.mkv
PRED-789.mp4
CAWD-801.mkv
FC2-PPV-1317995.mp4
# Avoid formats
[website_name]MIDE-123[other_info].mp4
MIDE-123_uncensored.mp4
8️⃣ Proxy Support (Optional)
MetaTube needs network access to javdb.com / bgn.dev / fc2hub.com.
If proxy access is needed, ensure metatube-compose.yml contains:
environment:
- HTTP_PROXY=http://your_proxy_IP:port
- HTTPS_PROXY=http://your_proxy_IP:port
- NO_PROXY=127.0.0.1,localhost,192.168.0.0/16
After modification:
docker-compose -f metatube-compose.yml up -d
9️⃣ DNS Optimization
If DNS resolution fails in container, add to compose:
services:
metatube-server:
# ... other configurations ...
dns:
- 223.5.5.5
- 119.29.29.29
🔟 System Maintenance and Updates
Update MetaTube:
cd /vol1/1000/Docker
docker-compose -f metatube-compose.yml pull
docker-compose -f metatube-compose.yml up -d
View logs:
# Server logs
docker logs metatube --tail 50
# Real-time view
docker logs -f metatube
Backup configuration:
# Backup MetaTube database
cp /vol1/1000/Docker/metatube-server/config/metatube.db \
/vol1/1000/Docker/metatube-server/config/metatube.db.backup
# Check database size
ls -lh /vol1/1000/Docker/metatube-server/config/
Common Issues Troubleshooting
| Issue | Solution |
|---|---|
| dial tcp: lookup ... server misbehaving | Docker DNS unavailable, change to 223.5.5.5 / 119.29.29.29 |
| Can't find FC2/BGN | Check if provider is in config.json; add proxy env vars if needed |
| /api/version returns 404 | MetaTube new version uses / or /v1/... paths, /api/version is deprecated |
| Emby doesn't show MetaTube | Plugin not enabled or server address incorrect, confirm port 8080 accessible |
| Slow scraping speed | Add proxy or check DNS configuration |
Special Note: If MetaTube doesn't appear in Emby plugin list, try:
docker restart emby
# Wait 1-2 minutes then check Emby plugins page
Access Address Summary
Internal Network Access
- FNOS Management Interface:
http://192.168.71.9:5666 - Emby:
http://192.168.71.9:8096 - CloudDrive2:
http://192.168.71.9:19798 - MetaTube Server:
http://192.168.71.9:8080
External Network Access (via FRP)
- FNOS Management Interface:
http://your_Alibaba_Cloud_IP:5666 - Emby:
http://your_Alibaba_Cloud_IP:8096 - SSH:
ssh root@your_Alibaba_Cloud_IP -p 2233
To enable external access to MetaTube server, add to FRP configuration:
[fnos_metatube_8080]
type = "tcp"
local_ip = "127.0.0.1"
local_port = 8080
remote_port = 8080
Maintenance Commands
Service Management
# View container status
docker ps -a
# View container logs
docker logs emby
docker logs clouddrive2
docker logs metatube
# Restart services
systemctl restart frpc
docker restart emby
docker restart clouddrive2
docker restart metatube
# Update containers
docker pull emby/embyserver:latest
docker pull cloudnas/clouddrive2:latest
docker pull ghcr.io/metatube-community/metatube-server:latest
# Then recreate containers
Backup Important Configurations
# Backup FRP configuration
cp /opt/frp_0.64.0_linux_amd64/frpc.toml ~/frpc_backup.toml
# Backup Emby configuration
tar -czf ~/emby_config_backup.tar.gz /vol1/1000/Docker/emby/config/
# Backup CloudDrive2 configuration
tar -czf ~/clouddrive2_config_backup.tar.gz /vol1/1000/Docker/clouddrive2/config/
# Backup MetaTube configuration
tar -czf ~/metatube_config_backup.tar.gz /vol1/1000/Docker/metatube-server/
Important Notes
- Permission Settings: Ensure all directories have correct permissions, containers run as root user
- Network Configuration: Docker containers use host network mode for optimal performance
- Storage Mapping: Ensure
:sharedparameter is correctly configured to support FUSE mounting - Firewall: Ensure Alibaba Cloud server security group opens corresponding ports
- Backup: Regularly backup important configuration files and databases
- MetaTube Special Note: This plugin is mainly used for adult film metadata scraping, please use responsibly
Through the above configuration, you will have a fully functional NAS system that supports cloud storage mounting, media management, external network access, and complete adult film metadata scraping capabilities.
Complete Process Time Estimate
- Preparation: 10-15 minutes
- Docker Environment Configuration: 5 minutes
- CloudDrive2 Installation and Configuration: 15-20 minutes
- Emby Installation and Configuration: 10-15 minutes
- FRP Configuration: 10-15 minutes
- MetaTube Deployment and Configuration: 15-20 minutes
- Testing and Verification: 10 minutes
Total: Approximately 75-100 minutes
Related Posts
Quick Guide to Setting Up Emby Media System on Generic VPS
Git Fundamentals and Workflow: A Complete Guide from Principles to Team Collaboration
Enterprise Internal Development Flow vs GitHub Open Source Project Flow Comparison
Comparing enterprise three-environment release process (DEV QUAL PROD) with GitHub open source project CI/CD automation workflow, sharing pros and cons of two different development models and applicable scenarios.