Thanks to the mini PC running 24/7, it’s great for deploying automated download/upload and file management services. This article mainly covers deploying these services with Docker:
- Samba: Run on Linux to map Linux as a Windows disk. Access mini PC files just by opening Windows File Explorer.
- FileBrowser: A graphical file manager with a web interface deployed on the internet, essentially a self-hosted cloud drive.
- BaiduPCS Go: Command-line control for uploading and downloading files to Baidu Cloud.
- OpenList: Open-source version of AList, can mount various cloud drives and local directories.
Samba
Using Samba, you can map Linux as a local Windows disk, allowing Windows software to directly open Linux folders, greatly facilitating command-line file management on Linux.
I previously installed Samba directly on Linux, but later found Docker works just as well.
Direct Linux Installation
-
Install Samba:
sudo apt update sudo apt install samba -
Edit the Samba configuration file:
sudo nano /etc/samba/smb.confFirst, it’s recommended to comment out everything under
[homes]to avoid automatically sharing all users’ home directories. You can manually control shared directories by adding content at the end of the file:[Name] path = /home/user1 browsable = yes read only = no guest ok = yes[Name]is the shared folder name, which will appear as a disk name in Windows. -
Set Samba account password:
sudo smbpasswd -a user1 sudo smbpasswd -e user1 -
Restart the Samba service:
sudo systemctl restart smbd
Docker
-
Install Samba using Docker Compose:
services: samba: image: dperson/samba container_name: samba restart: unless-stopped ports: - "137:137/udp" - "138:138/udp" - "139:139/tcp" - "445:445/tcp" volumes: - [host_path]:/mount/home # Replace with your host directory path environment: - USERID=[your_uid] # Get from `id -u` - GROUPID=[your_gid] # Get from `id -g` command: > -u "[username];[password]" -s "[Name];/mount/home;yes;no;no;[username]"Replace
[username],[password],[Name]with your desired values. -
After the Docker container runs, it will create some anonymous volumes, which is normal.
Windows
- Open File Explorer
- Right-click “This PC” and select “Map network drive”
- Choose a drive letter (e.g., Z:)
- In the folder field, enter:
\\Linux IP Address\[Name]
FileBrowser
FileBrowser is a file browser for graphically managing files on your mini PC. I personally prefer Samba and Windows File Manager, but FileBrowser has a web interface, so it can be exposed to the internet—essentially a self-hosted cloud drive. If you take photos with friends and want to share large files without using WeChat’s compression, this is perfect. Just plug a USB drive or SD card into the mini PC.
Since it’s on the internet, you can mount only the SD card contents, so if hacked, the mini PC’s own files remain safe.
Deployment
-
Create a local folder and create a
database.dbfile, then modify permissions:touch ./database.db chown 1000:1000 ./database.db chmod 664 ./database.db -
Create
docker-compose.yml. I want Cloudflared to manage it, so join its network:services: filebrowser: image: filebrowser/filebrowser container_name: filebrowser restart: unless-stopped volumes: - ./data:/srv - ./database.db:/database.db expose: - "80" environment: - PUID=1000 - PGID=1000 - UMASK=022 - TZ=America/Toronto user: "1000:1000" networks: - cloudflared networks: cloudflared: external: true -
Start the container. Default username and password are
adminandadmin:docker compose up -d
Changing Password
-
Stop the container first:
docker compose down -
Reset password:
docker run --rm \ -v $(pwd)/database.db:/database.db \ filebrowser/filebrowser \ users update User --password 12345678 --database /database.db
Mounting USB Drive / SD Card
-
Stop the container with
docker compose down -
First, mount the USB to mini PC. For automatic mounting, see: Auto-mounting USB Drives with udev | Kunyang’s Blog. The USB will mount directly to the folder. Below is the manual process:
-
Suppose the USB name (Label) is
Nikon-1. Manually mount it at~/filebrowser/Nikon-1. Then accessing~/filebrowser/Nikon-1accesses your USB. -
Get the device name:
lsblkUsually it’s
/dev/sdb1 -
Create the mount point directory:
sudo mkdir -p ~/filebrowser/nikon-1 -
Mount the device:
sudo mount /dev/sdb1 ~/filebrowser/nikon-1
-
-
Suppose I have two Nikon SD cards, one DJI SD card, named
nikon-1,nikon-2, anddji-1. After local mounting, modify FileBrowser’sdocker-compose.ymlto add logical volumes:volumes: - ./data:/srv - ./database.db:/database.db # Mount SD cards - ./nikon-1/DCIM/102NZ_FC:/srv/nikon/SD1 - ./nikon-2/DCIM/102NZ_FC:/srv/nikon/SD2 - ./dji-1/DCIM/DJI_001:/srv/dji/SD1 # Mount servers (not recommended due to security risks; use VPN instead) - /home/username/:/srv/debian -
Restart the container:
docker compose up -d
BaiduPCS Go
Although Baidu PCS is often criticized for throttling, I’ve never abandoned it because I’m an early user with 2TB storage, making it perfect for backing up “digital junk” (e.g., RAW photos are 30MB each, DJI videos are several GB, with few useful editing clips). I’ve only used under 300GB of the 2TB, and video files are generally not moderated.
However, Baidu doesn’t run natively on Linux, and my server has no GUI. I need a Docker + command-line version. After searching, I found BaiduPCS Go. I created a Docker image: kyxie/baidupcs-go - Docker Image | Docker Hub
Deployment
-
Run directly:
docker run -d -it --name baidupcs-go \ -v $(pwd)/data:/data \ -v $(pwd)/upload:/upload \ -v $(pwd)/config:/root/.config/BaiduPCS-Go \ -w /upload \ kyxie/baidupcs-go:latest -
Deploy with Docker Compose (recommended):
services: baidupcs-go: image: kyxie/baidupcs-go:latest container_name: baidupcs-go stdin_open: true tty: true volumes: - ./data:/data - ./upload:/upload - ./config:/root/.config/BaiduPCS-Go # Mount other directories, e.g., USB directory - /mnt/usb:/u working_dir: /upload
Common Commands
-
View container files:
docker exec -it baidupcs-go /bin/sh -
Enter container, login, and display cloud files:
docker exec -it baidupcs-go BaiduPCS-Go -
Login:
-
Login to Baidu PCS in a browser
-
Press
F12→ Application → Cookies →https://pan.baidu.com→ findBDUSSfield, copy it
-
Run the command:
login -bduss=<BDUSS>
-
-
Upload. It’s recommended to use
screensince closing the terminal may pause the upload:screen -S pcs-upload docker exec baidupcs-go \ BaiduPCS-Go upload <local_path> <cloud_path> # Example docker exec baidupcs-go \ BaiduPCS-Go upload /nikon-1 "/Photos and Videos/From: Nikon Zfc/2025 Bottle Islands" docker exec baidupcs-go \ BaiduPCS-Go upload /dji-1/MP4 "/Photos and Videos/From: DJI/2025 Bottle Islands"