測試版 · 設定指南

相機上傳(測試版):把 iPhone 照片備份到你自己的 Plex 伺服器

更新於 2026 年 11 月 24 日 · 設定約需 10 分鐘

當你的 iPhone 或 iPad 連上家中的 Wi-Fi 時,相機上傳會把裝置上的照片和影片備份到你家裡的伺服器。它們會和其他內容一起顯示在 Plex 和 Phlix 中。不用雲端,也不用訂閱儲存空間。你的照片只會傳到你自己的伺服器,不會傳給其他任何人。

相機上傳是測試版功能。它包含在 Phlix 1.0.21 或以上版本中。如果 App Store 中還沒有這個版本,它正在準備上架。

相機上傳由兩個部分組成。iPhone 或 iPad 上的 Phlix App 負責讀取你的相機膠卷。你伺服器上一個小巧的免費程式,也就是相機上傳輔助程式,負責接收照片,並將它們寫入你 Plex 照片圖庫中的一個資料夾。輔助程式是一個 Docker 容器。

  • 只在家中。Phlix 只透過家中的 Wi-Fi 上傳,在其他任何地方都不會上傳。絕不透過行動網路上傳。
  • 只傳給你。照片經過加密,從你的手機直接傳到你的伺服器,一張都不會傳給 Phlix。
  • 只做複製。絕不會刪除或變更你手機上的任何內容。
Phlix 中的「相機上傳」畫面,標有「BETA」:綠點旁顯示「已連線到」和輔助程式的名稱,「相機上傳」開關已開啟,填滿的進度列上方顯示「已全部備份」
Phlix 中的相機上傳(測試版)。截圖顯示的是英文介面的 App。

背景:Plex 自己的相機上傳功能已終止

Plex 從 2014 年起就有自己的相機上傳功能。2021 年 3 月,Plex 在其論壇上宣布將終止對此功能的支援,並預計於 2021 年 6 月將其移除(Plex 的公告,存檔副本)。

Phlix 的相機上傳為 iPhone 和 iPad 重新帶來了這個構想。Phlix 是一款可搭配 Plex Media Server 使用的獨立 App,並非由 Plex 開發。詳見完整來龍去脈(英文)。

所需條件

輔助程式是免費的。在 App 中,前 100 次上傳免費,其餘的由 Phlix Pro 上傳。在相機上傳仍是測試版期間,無可取代的內容,請自己另外保留一份備份。詳見測試版能做什麼、不能做什麼(英文)。

步驟 1:安裝輔助程式

正在用手機閱讀嗎?步驟 1 要在伺服器上完成。請在電腦上開啟此頁面,以便複製指令。

這項操作只需在執行 Plex Media Server 的機器上做一次。首先決定你的上傳資料夾,也就是手機照片要存入的資料夾。它必須位於你某個 Plex 照片圖庫所包含的資料夾之內,否則 Plex 永遠不會顯示這些照片。如果你的圖庫資料夾是 /mnt/media/Photos,那麼 /mnt/media/Photos/Camera Uploads 就是不錯的選擇。

若要查看圖庫的資料夾,請在瀏覽器中開啟 Plex,前往「設定 › 管理 › 媒體庫」,在你的照片圖庫上選擇「編輯媒體庫」,然後選擇「新增資料夾」。

你的 Plex 本身也在 Docker 中執行嗎?這在 Unraid 和 TrueNAS SCALE 上很常見。這時 Plex 顯示的是資料夾在它自己容器內的路徑,例如 /data/Photos。而輔助程式需要的是資料夾在伺服器上的路徑,例如 /mnt/media/Photos。詳見如何找到這兩個路徑(英文)。

安裝輔助程式有三種方式。方式 B 適用於所有系統。在 Unraid、Synology 和 TrueNAS SCALE 上,請改用下方針對你系統的說明,而不是方式 A 和 C。

這些指令要在伺服器的終端機中輸入:在 Mac 上使用名為「終端機」的 App;在 Windows 上使用 PowerShell;在 Linux 上使用終端機程式,或從另一台電腦透過 SSH 連線。方框中的指令都附有複製按鈕。如果 Docker 回應「permission denied」,請在每個 docker 指令前面加上 sudo。

A. 一行指令 快速

適用於 Linux 電腦或伺服器,以及裝有 Docker Desktop 的 Mac。不適用於 Windows、Unraid 或 TrueNAS SCALE。

將以下指令貼到伺服器的終端機中:

curl -fsSL https://phlixapp.com/camera-upload/install.sh | sh

安裝程式會檢查 Docker,並詢問你的上傳資料夾。它會在你的主目錄中新增一個名為 phlix-camera-upload 的資料夾,把 Compose 檔案 docker-compose.yml 寫入其中,接著啟動輔助程式並執行檢查。一切正常時,它會顯示 Phlix Camera Upload is running.,下面還有一行以 Status page: 開頭,列出輔助程式狀態頁面的位址。

它絕不使用 sudo,絕不變更 Plex,也絕不刪除任何照片。執行前你可以先閱讀指令碼,也可以先加上 --dry-run 試著執行,這樣不會做任何變更:

curl -fsSL https://phlixapp.com/camera-upload/install.sh | sh -s -- --dry-run

之後隨時再次執行安裝程式,即可更新輔助程式。GitHub 儲存庫中也有同一個指令碼。

B. 交給 AI 助理

檔案 SETUP-WITH-AI.md 包含為 AI 助理撰寫的完整說明:如何找到 Plex 圖庫的資料夾、安裝輔助程式、檢查安裝,以及解決出現的問題。AI 助理在變更輔助程式自己資料夾以外的任何內容之前,都會先詢問你。這個檔案是英文的,但 AI 助理可以用中文和你交談。

如果你使用的 AI 助理能在伺服器上執行指令(Claude Code、Codex、Gemini CLI、Cursor 等類似工具),請在伺服器上新增一個空資料夾,並在其中執行:

curl -fsSLO https://phlixapp.com/camera-upload/SETUP-WITH-AI.md

然後在該資料夾中啟動 AI 助理,並對它說:請依照 SETUP-WITH-AI.md 操作

Claude Code 還可以把設定流程新增為一項技能,只需在終端機中執行一次:

claude plugin marketplace add jrl8085/phlix-camera-upload
claude plugin install phlix-camera-upload@phlix

然後在伺服器上啟動 Claude Code,並說:在這台伺服器上設定 Phlix Camera Upload

如果使用 ChatGPT 或 Claude App 等聊天助理:把檔案 SETUP-WITH-AI.md 交給它,並說請一步一步帶我完成這些操作。它會逐一告訴你每個指令,你在伺服器上執行後,再把顯示的內容貼回給它。

C. 使用 Docker Compose 手動安裝

適合想看清每個步驟的人,可用於 Linux、Mac 或 Windows PC。共六個步驟,只需編輯一行。

  1. 以擁有你照片的使用者身分建立上傳資料夾。輔助程式會以此資料夾擁有者的身分寫入檔案。
    mkdir "/mnt/media/Photos/Camera Uploads"
  2. 為輔助程式建立一個資料夾,並進入該資料夾。
    mkdir phlix-camera-upload
    cd phlix-camera-upload
  3. 下載 Compose 檔案 docker-compose.yml:這是一個小型文字檔,用來告訴 Docker 如何執行輔助程式。
    curl -fsSLO https://phlixapp.com/camera-upload/docker-compose.yml
  4. 用文字編輯器開啟 docker-compose.yml。找到註解 CHANGE THE NEXT LINE,在它的下一行,把 /CHANGE/THIS/Photos/Camera Uploads 換成你的上傳資料夾。儲存檔案。
  5. 啟動輔助程式。第一次啟動時,Docker 會下載映像檔,也就是包裝成 Docker 格式的輔助程式。
    docker compose up -d
  6. 請輔助程式檢查一切是否正確。
    docker exec phlix-camera-upload python -m phlix_upload doctor
Compose 檔案(與下載的內容完全相同)

檔案中的註解是英文的。只需修改 CHANGE THE NEXT LINE 下面那一行。

# Phlix Camera Upload
#
# This file starts the helper that receives the photos and videos the Phlix
# app uploads from your iPhone or iPad, and writes them into a folder of your
# Plex photo library.
#
# How to use this file:
#   1. Change the one line marked CHANGE THE NEXT LINE below.
#   2. In the folder that holds this file, run:  docker compose up -d
#   3. Open https://YOUR-SERVER:7459 in a browser to check that it runs.
#      The browser warns about the certificate. That is expected.
#
# If something does not work, ask the helper what is wrong:
#   docker exec phlix-camera-upload python -m phlix_upload doctor
#
# Setup guide: https://phlixapp.com/camera-upload/
# If the app cannot find the helper:
#   https://github.com/jrl8085/phlix-camera-upload/blob/main/NETWORKING.md

services:
  phlix-camera-upload:
    image: ghcr.io/jrl8085/phlix-camera-upload:1
    container_name: phlix-camera-upload

    # Start again by itself when the server or Docker restarts.
    restart: unless-stopped

    # The Phlix app looks for the helper on port 7459 of your server.
    ports:
      - "7459:7459"

    volumes:
      # Your upload folder: the folder on this server where the photos go.
      #
      # It must be inside a folder that one of your Plex photo libraries
      # includes. If it is not, Plex never shows the photos.
      #
      # Make the folder before you start the helper. Docker refuses to start
      # the helper if the folder is missing. The helper writes files as the
      # user who owns the folder.
      #
      # Write the path as it is on the server itself. If Plex runs in Docker,
      # do not use the path from inside the Plex container.
      #
      # Examples:
      #   Linux      /mnt/media/Photos/Camera Uploads
      #   Synology   /volume1/photo/Camera Uploads
      #   TrueNAS    /mnt/tank/media/Photos/Camera Uploads
      #   Mac        /Users/you/Pictures/Camera Uploads
      #   Windows    C:\Users\you\Pictures\Camera Uploads
      #
      # Spaces in the path are fine. If the path has a "#" after a space, or
      # a ":" before a space, put the whole path in 'single quotes'.
      - type: bind
        # CHANGE THE NEXT LINE. Keep "source: " and write your folder after it.
        source: /CHANGE/THIS/Photos/Camera Uploads
        target: /photos
        bind:
          create_host_path: false

      # The helper's own data: the list of paired phones, the list of files
      # it has received, and its certificate. No photos are kept here.
      # Docker makes a folder named "config" next to this file. Keep it: if
      # it is lost, every phone has to pair again.
      # If your tool has no "next to this file" (TrueNAS, Portainer), write a
      # full path in place of ./config, for example:
      #   /mnt/tank/apps/phlix-camera-upload:/config
      - ./config:/config

    # Lets the helper find Plex Media Server on this machine.
    extra_hosts:
      - "host.docker.internal:host-gateway"

    # The helper can never gain more rights than it was started with.
    security_opt:
      - "no-new-privileges:true"

    # Optional settings. The helper works without any of them.
    #
    # To use one, remove the "# " in front of "environment:" and in front of
    # the setting you want. Leave the other spaces as they are. Then run
    # "docker compose up -d" again.
    #
    # environment:
    #   # Where Plex Media Server is. Set this if the helper's status page
    #   # says "Plex Media Server: Not found", or to make sure that the helper
    #   # asks your own server and no other.
    #   PLEX_URL: "http://192.168.1.10:32400"
    #
    #   # Write files as this user and group. Without these, the helper uses
    #   # the owner of the upload folder.
    #   PUID: "1000"
    #   PGID: "1000"
    #
    #   # Permissions for new files and folders. With 022, other users may
    #   # read them. With 002, the group may also change them.
    #   UMASK: "022"
    #
    #   # The name that the app and the status page show for this helper.
    #   NAME: "Phlix Camera Upload"
    #
    #   # Who may pair. auto: the owner of the Plex server pairs without a
    #   # code and everyone else types the pairing code. code: everyone types
    #   # the code. plex: only the owner of the Plex server may pair.
    #   PAIRING: "auto"
    #
    #   # Your own pairing code, in place of the one the helper makes. Write
    #   # at least 6 letters or digits between the quotes.
    #   PAIRING_CODE: ""
    #
    #   # The folders the helper makes inside the upload folder. You can use
    #   # {device}, {year}, {month} and {day}.
    #   PATH_TEMPLATE: "{device}/{year}/{year}-{month}"
    #
    #   # Refuse uploads that would leave less than this many GB free. Uploads
    #   # that are still arriving count too.
    #   MIN_FREE_GB: "2"
    #
    #   # The largest single file the helper accepts, in GB.
    #   MAX_UPLOAD_GB: "50"
    #
    #   # More file types to accept, besides the usual photo and video types.
    #   # Separate them with commas.
    #   EXTRA_EXTENSIONS: "insp,lrv"
    #
    #   # How much the log says: debug, info, warning or error.
    #   LOG_LEVEL: "info"
    #
    #   # Write "off" only if your own reverse proxy adds HTTPS in front of
    #   # the helper. Phlix talks HTTPS only: with "off" and no such proxy,
    #   # the app cannot use the helper.
    #   TLS: "on"
    #
    #   # Your own certificate and its key, as paths inside the container.
    #   # Set both. A file you put in the config folder is at /config/...
    #   TLS_CERT: "/config/my-cert.pem"
    #   TLS_KEY: "/config/my-key.pem"
    #
    # PORT, BIND, UPLOAD_DIR and CONFIG_DIR exist too. With Docker you do not
    # need them. To use another port on your server, change only the first
    # number in the "ports" line above, for example "8443:7459". The app
    # looks for port 7459 by itself, so with another port you type the
    # helper's address into the app.

Unraid、Synology、TrueNAS SCALE、Windows

確認是否正常執行

在家用網路上的另一台裝置上,用瀏覽器開啟輔助程式的狀態頁面。把 SERVER 換成你伺服器的位址,例如 https://192.168.1.10:7459:

https://SERVER:7459

瀏覽器會警告此連線不是私人連線。這是正常現象。家用伺服器沒有可讓憑證授權單位擔保的公開名稱,因此輔助程式會自行產生憑證。請繼續前往該頁面。Phlix 不依賴瀏覽器的檢查:它會在配對時記住輔助程式的確切憑證。

頁面上應該會顯示 Upload folder: Ready 和 Plex Media Server: Found。如果顯示的是其他內容,doctor 指令會告訴你該怎麼做:

docker exec phlix-camera-upload python -m phlix_upload doctor
Phlix Camera Upload 1.0.1
OK       The helper is running on port 7459
OK       The upload folder /photos can be written to.
OK       223.6 GB free on the upload disk.
OK       Plex Media Server found: its owner can pair from Phlix without a code.
OK       1 paired, 37 files stored (33.0 MB).
NOTE     Pairing code: run `python -m phlix_upload code` the same way to see it.
Nothing needs fixing.

以 PROBLEM 開頭的行後面,會接著一行以 Fix: 開頭的內容。

Plex 中的一項設定。Plex 要等掃描之後才會顯示新檔案。如果伺服器屬於你的 Plex 帳號,照片送達後,Phlix 會請 Plex 進行掃描。為了家中的其他人,也為了保險起見,請在 Plex 中開啟「設定 › 媒體庫 › Scan my library automatically」(Plex 以英文顯示這個選項,意思是「自動掃描我的媒體庫」)。此設定預設為關閉。

步驟 2:連接你的 iPhone

  1. 將 iPhone 或 iPad 連上家中的 Wi-Fi。
  2. 開啟 Phlix,前往「設定」›「相機上傳」。如果「設定」中沒有「相機上傳」這個項目,表示你的 Phlix 版本比 1.0.21 舊。「設定」中的「版本」項目會顯示版本號碼。
  3. 點一下「尋找輔助程式」,然後點一下「檢查我的網路」。Phlix 會在你 Plex 伺服器的位址上尋找輔助程式。找到輔助程式之前,不會開啟任何功能,也不會上傳任何內容。如果 iOS 詢問是否允許 Phlix 尋找區域網路上的裝置,請允許。
  4. 當 Phlix 顯示「已找到輔助程式」時,為這台裝置選擇一個資料夾名稱,例如「小美的 iPhone」,然後點一下「連線」。請謹慎選擇名稱:裝置會一直使用它第一次配對時取得的資料夾。
  5. 如果 Phlix 接著顯示「輸入配對碼」,請輸入輔助程式的配對碼,然後點一下「配對」。擁有自己 Plex 帳號的家庭成員會看到這個步驟。下方的「誰需要配對碼」會說明配對碼在哪裡。
  6. Phlix 會顯示「已連線」。選擇要備份的內容:「此裝置上的所有內容」或「僅新照片」,然後點一下「開啟相機上傳」。
  7. iOS 會詢問是否允許 Phlix 讀取你的照片。請選擇「完整取用」,這樣它才能備份所有照片。

看到綠點和「已連線到 …」(「…」即輔助程式的名稱),表示連線正常。灰色表示你不在家,這時 Phlix 會等待。橘色表示有狀況需要你處理,畫面上會說明是什麼狀況。

誰需要配對碼

如果 Phlix 顯示「找不到輔助程式」,相機上傳會保持關閉,也不會傳送任何內容到任何地方。詳見App 找不到輔助程式(英文)。

接下來會怎樣

Phlix 會上傳你自己照片圖庫中的照片和影片,每一項只上傳一次,上傳的是它當時在「照片」中的樣子。影片可自行選擇(「包含影片」);除非你開啟「包含截圖」,否則不會上傳截圖。原況照片會以靜態照片上傳。已隱藏的照片、共享相簿和從電腦同步的照片不會上傳。

照片存放在哪裡

每支手機或平板電腦在上傳資料夾中都有自己的資料夾,裡面再依年份和月份分成資料夾:

Camera Uploads/
  Anna's iPhone/
    2026/
      2026-11/
        IMG_1234.HEIC
        IMG_1235.MOV
  Ben's iPad/
    2026/
      2026-10/

隱私與安全

說明與疑難排解

先執行輔助程式內建的檢查。它會測試安裝情況,並告訴你如何修正問題:

docker exec phlix-camera-upload python -m phlix_upload doctor

在 Phlix 中,「相機上傳」畫面會指出它發現的問題,點一下「檢查連線」即可再試一次。每種問題在完整指南(英文)中都有專屬的章節:

GitHub 上的繁體中文版輔助程式說明:README。輔助程式的問題可以在 GitHub Issues 上回報,其他問題請前往支援頁面。

常見問題

相機上傳是測試版嗎?

是的。相機上傳是 Phlix 1.0.21 或以上版本中的測試版功能。無可取代的內容,請自己另外保留一份備份;遇到問題時,請告訴我們:在 Phlix 中開啟「設定」,然後點一下「傳送意見回饋」。

Plex 自己的相機上傳怎麼了?

Plex 於 2021 年 3 月宣布將終止對其相機上傳功能的支援,並預計於 2021 年 6 月將其移除。Phlix 的相機上傳是一款獨立 App 中的一項單獨的功能:它透過你自己伺服器上的輔助程式,把照片複製到你 Plex 照片圖庫中的一個資料夾。

它會刪除我 iPhone 上的照片嗎?

不會。Phlix 會把你的照片和影片複製到你的伺服器。它絕不會刪除或變更你照片圖庫中的任何內容。

不在家時或使用行動網路時能用嗎?

不能,這是刻意的設計。Phlix 只在手機連上家中的 Wi-Fi 時上傳。不在家時,它不會傳送任何內容,也不會尋找你的伺服器。旅行時拍的照片會在你回家後上傳。

需要 Plex Pass 嗎?

不需要。輔助程式只是把一般檔案寫入你 Plex 照片圖庫中的一個資料夾,任何 Plex Media Server 都支援這種方式。

需要多少費用?

伺服器上的輔助程式是免費的。在 App 中,前 100 次上傳免費,其餘的由 Phlix Pro 上傳。

全家人都能用嗎?

可以。每台 iPhone 和 iPad 都會各自配對,並取得自己的資料夾。Plex 伺服器的擁有者不需要配對碼就能配對;其他人則需輸入輔助程式的配對碼。如果兩支手機上有同一張照片,伺服器只會儲存一次。

這是同步嗎?如果我刪除照片會怎樣?

這是從手機到伺服器的單向複製。在手機上刪除照片後,伺服器上的副本仍會保留。每張照片只會上傳一次。

可以搭配 iCloud 照片使用嗎?

可以。無論 iOS 把照片存放在哪裡,Phlix 都會讀取你照片圖庫中的照片。如果開啟了「最佳化 iPhone 儲存空間」,iOS 會在 Phlix 要求時從 iCloud 下載完整大小的原始檔。共享相簿不包含在內。

Phlix 是 Plex 開發的嗎?

不是。Phlix 是一款可搭配 Plex Media Server 使用的獨立 App,與 Plex, Inc. 沒有關聯,也未獲得 Plex, Inc. 的認可或贊助。

Phlix:讓你的 Plex 照片得到應有的呈現

依日期排列的時間軸,還能在電視大螢幕上播放幻燈片秀。從 1.0.21 版起,還提供相機上傳(測試版):把相機膠卷備份到你自己的伺服器。

免費下載 Phlix

iPhone 和 iPad · iOS 17 或以上版本。相機上傳需要 Phlix 1.0.21 或以上版本。如果 App Store 中還沒有這個版本,它正在準備上架。