README-zh-TW.md 21 KB

Image

English | 繁體中文 | Deutsch

ArozOS 是以 Go 語言編寫、可自行架設的網頁桌面與 NAS 作業系統。它執行在您自己的伺服器上,從樹莓派到機架式主機皆可,用任何瀏覽器就能開啟。檔案、媒體、文件、AI 與創客工具,全部包含在一個獨立的執行檔中。

官方網站 | 下載 | 開發者文件 | Telegram

功能特色

標有 [新] 的項目為近期新增。

類別 功能
桌面 具備浮動視窗、可搜尋啟動器與快速設定的網頁桌面
淺色與深色主題
適合觸控操作的行動版介面,可加到手機主畫面
[新] 設定精靈:引導新安裝的系統完成伺服器名稱、磁碟、使用者與檔案分享設定
儲存與檔案分享 本機磁碟(ext4、NTFS、exFAT、FAT32)與遠端檔案系統(WebDAV、SMB、SFTP、FTP、S3)
檔案伺服器:WebDAV、SFTP、FTP、TFTP、Syncthing,以及供舊裝置使用的簡易 HTTP 目錄伺服器
以連結分享,或分享給已登入的使用者、群組或特定的人
在 Linux 上以 mdadm 建立軟體 RAID,支援每位使用者的儲存配額、版本歷史與垃圾桶
[新] 重新設計的檔案管理員
[新] 內建 SMB 伺服器(實驗性):不需安裝 Samba 即可與 Windows 及 macOS 共用檔案,支援「舊版本」與 Time Machine
[新] 每顆磁碟獨立的讀寫存取清單,以及「與我分享」磁碟
[新] Drive:以檔案為主的雲端硬碟工作區,適合不需要桌面的使用者
[新] Sync Server:每晚備份手機相片
辦公、PDF 與郵件 [新] Docs、Sheets 與 Slides:直接儲存為 Word、Excel 與 PowerPoint 檔案,可開啟舊版 Office 與 OpenDocument 格式並匯出 PDF
[新] PDF 閱讀器與 PDF Editor
[新] Mail:IMAP / SMTP 郵件用戶端,支援 Google 與 Microsoft 帳號登入、復原傳送、排程寄送、標籤與延後提醒
[新] 支援 CalDAV 同步的 Calendar、Reminders、Chatspace 與 MeetRoom 視訊會議
Notes 與 Web Builder
媒體 Musicify、Movie、Photo 與 Camera
Arozcast 能把電視、投影機或閒置的平板變成接收端
[新] Movie 支援依編解碼器調整的播放方式、HLS、內嵌字幕與進度列預覽圖
Audio Studio 與 FFmpeg Factory
[新] Cine Studio 與 Pixel Studio(含 RAW 編輯器)
AI [新] AI Chat 支援任何相容 OpenAI 或 Anthropic 的模型(本機或雲端)
[新] AGI Forge 把白話描述變成指令碼
[新] 管理員可設定模型價格、配額並追蹤用量
創客與開發者 [新] 3D Modeler、3D Viewer 與 Gerber Viewer
[新] Code Studio 與 GitApp(伺服器不需安裝 git)
AGI:伺服器端 JavaScript(ECMA5)指令碼,提供檔案、資料庫、圖片、壓縮檔、HTTP、SQLite、Git、郵件與 AI 等函式庫
以 HTML 與 JavaScript 撰寫的 WebApp、Serverless 端點與排程工作
Terminal 與 SQLite Admin
子服務(透過反向代理執行的程式)仍可使用,但已棄用;新專案請改用 WebApp 或容器應用程式
容器與叢集 [新] 管理 Docker 容器、映像檔與 Compose 堆疊
[新] 容器應用程式:透過 ArozOS 的連接埠發布任何網頁伺服器,讓使用者釘選到桌面
[新] 叢集:把多台 ArozOS 伺服器組成叢集,提供會自動複寫的 cluster:/ 共用磁碟,工作會派送到最適合的節點執行(白皮書,英文)
網路與安全 mDNS 與 SSDP 探索、UPnP 連接埠轉送、Wi-Fi 管理(wpa_supplicant 或 nmcli)與即時網路統計
靜態網頁伺服器,每位使用者都有個人首頁
使用者與權限群組、OAuth、LDAP、自動登入權杖
IP 白名單 / 黑名單、登入逾時指數遞增、使用自己的憑證啟用 HTTPS

系統需求

最低需求 512 MB 記憶體與 1.5 GB 儲存空間(例如樹莓派 Zero W)
建議配置 4 GB 以上記憶體(例如樹莓派 4 / 5 或 x86 迷你電腦)
作業系統 基於 Debian 的 Linux(Debian、Ubuntu、Raspberry Pi OS、Armbian)、Windows 或 macOS。部分硬體功能僅限 Linux
選用 ffmpeg(媒體轉碼)、mdadm(RAID)、nmcli 或 wpa_supplicant(Wi-Fi)、Docker(容器)
用戶端 電腦、平板或手機上的任何現代瀏覽器

從原始碼建置

需要 Go 1.26 或以上版本(參閱安裝教學)。ffmpeg、wpa_supplicant 與 nmcli 為選用。

執行以下指令即可建置系統

git clone https://github.com/tobychui/arozos
cd ./arozos/src/
go mod tidy
go build
./arozos 
#sudo ./arozos 以啟用硬體與 Wi-Fi 管理功能

(沒錯,就是這麼簡單)

使用預先編譯的執行檔安裝

Linux(armv6 / v7、arm64 與 amd64)

(例如樹莓派 4B、樹莓派 Zero W、Orange Pi 或便宜的小型 VPS;僅在基於 Debian 的 Linux 上測試過)

在 SD 卡或開機磁碟上安裝最新版的 Raspberry Pi OS / Armbian / Debian 並開機。完成初始設定後,透過 SSH 連線(或使用桌面上的終端機)輸入以下指令

wget -O install.sh https://raw.githubusercontent.com/tobychui/arozos/master/installer/install.sh && bash install.sh

然後依照畫面指示完成設定。

如果您選擇安裝為 systemd 服務,可用以下指令查看服務狀態

sudo systemctl status arozos

否則請手動啟動 ArozOS

cd ~/arozos
sudo ./arozos
# 若已安裝啟動器
sudo ./launcher

安裝完成後,ArozOS 需要一些時間解壓縮必要檔案,長短視主機效能與磁碟速度而定。請等待約 3 至 5 分鐘,再開啟以下網址建立管理員帳號。之後設定精靈會帶您完成磁碟、使用者與檔案分享的設定。

http://{主機的 IP 位址}:8080/

注意:如果您的瀏覽器會隱藏 User Agent,可用以下連結手動切換行動版與桌面版介面。

如需解除安裝,請使用 installer 資料夾中的解除安裝指令碼。

Windows(amd64)

在 Windows 上部署時,請先把 ffmpeg 加入 %PATH% 環境變數,再依照以下步驟操作。

將 FFMPEG 加入 %PATH%

前往 https://www.ffmpeg.org/ 下載預先編譯的版本到 C:\ffmpeg\。解壓縮後,ffmpeg.exe 應位於 C:\ffmpeg\bin\。

開啟「系統內容」>「環境變數」>「系統變數」>「編輯」,把「C:\ffmpeg\bin\」加入清單。儲存並關閉視窗,然後重新啟動電腦。

安裝 ArozOS

  1. 建立一個資料夾,名稱不可含空格,且僅使用 ASCII 字元
  2. 從發行頁面下載 arozos_windows_amd64.exe
  3. 從發行頁面下載 web.tar.gz
  4. 把兩個檔案放進步驟 1 建立的資料夾
  5. 按兩下 exe 檔啟動 ArozOS
  6. 如果 Windows 防火牆封鎖了 ArozOS,請按「允許存取」
  7. 在瀏覽器開啟 http://localhost:8080/ 建立管理員帳號

部分功能在 Windows 版本上無法使用

Windows arm64 版本為實驗性質,尚未經過測試

macOS(Apple 晶片與 Intel)

  1. 從發行頁面下載 web.tar.gz 以及 arozos_darwin_arm64 或 arozos_darwin_amd64 到同一個資料夾
  2. 在終端機中於該資料夾執行 chmod +x arozos_darwin_*,然後啟動執行檔
  3. 若 macOS 阻擋執行,請到「系統設定 > 隱私權與安全性」中允許
  4. 開啟 http://localhost:8080/ 建立管理員帳號

OpenWRT(mipsle)/ Linux(riscv64、loong64)

OpenWRT 與 Linux riscv64 / loong64 版本屬實驗性質,可能有奇怪的錯誤。如果您有興趣測試或維護這些版本,請直接與我聯絡。

wget -O arozos {發行頁面上的執行檔路徑}
wget -O web.tar.gz {發行頁面上的 web.tar.gz 路徑}
chmod -x ./arozos
sudo ./arozos

Docker

感謝 SysAdmin74 為 ArozOS 貢獻 Dockerfile。您可以在這裡(開發中)查看。

截圖

ArozOS 網頁桌面

檔案管理員

在桌面上執行的辦公套件

Musicify 與 Movie

系統各部分的畫面請見 截圖集(英文)。

啟動 ArozOS 平台

支援的啟動參數

支援以下啟動參數(v3.0.5)。執行 ./arozos -h 可查看您版本的參數清單(英文)。

顯示所有啟動參數
  -allow_autologin
      Allow RESTFUL login redirection that allow machines like billboards to login to the system on boot (default true)
  -allow_iot
      Deprecated and ignored: IoT support has been removed
  -allow_mdns
      Enable MDNS service. Allow device to be scanned by nearby ArOZ Hosts (default true)
  -allow_pkg_install
      Allow the system to install package using Advanced Package Tool (aka apt or apt-get) (default true)
  -allow_ssdp
      Enable SSDP service, disable this if you do not want your device to be scanned by Windows's Network Neighborhood Page (default true)
  -allow_upnp
      Enable uPNP service, recommended for host under NAT router
  -arozcast_turn
      Enable the built-in Arozcast TURN relay so WebRTC screen share works over the Internet / behind NAT (default true)
  -arozcast_turn_port int
      Listening port (UDP and TCP) for the built-in Arozcast TURN relay (default 3478)
  -arozcast_turn_publicip string
      Public IP or hostname advertised by the Arozcast TURN relay. Leave empty to auto-detect the outbound interface address (set this when the host is behind NAT)
  -arozcast_turn_tls
      Also serve TURN-over-TLS (TURNS) so screen share traverses restrictive firewalls that only allow outbound TLS. Uses the system TLS certificate (-cert/-key); a no-op when no certificate can be loaded (default true)
  -arozcast_turn_tls_port int
      Listening TCP port for the Arozcast TURN-over-TLS (TURNS) relay. Set to 443 to share the standard HTTPS port for maximum firewall traversal (default 5349)
  -beta_scan
      Allow compatibility to ArOZ Online Beta Clusters
  -bufffile_size int
      Maxmium buffer file size (in MB) for buffer required file system abstractions (default 25)
  -buffpool_size int
      Maxmium buffer pool size (in MB) for buffer required file system abstractions (default 1024)
  -cert string
      TLS certificate file (.crt) (default "localhost.crt")
  -console
      Enable the debugging console.
  -dir_list
      Enable directory listing (default true)
  -disable_cluster
      Disable the cluster features (joining, the cluster:/ drive, cluster jobs and their settings pages)
  -disable_http
      Disable HTTP server, require tls=true
  -disable_ip_resolver
      Disable IP resolving if the system is running under reverse proxy environment
  -disable_subservice
      Disable subservices completely
  -enable_buffpool
      Enable buffer pool for buffer required file system abstractions (default true)
  -enable_docker
      Enable Docker container/compose management if Docker is detected on host (default true)
  -enable_hwman
      Enable hardware management functions in system (default true)
  -enable_pwman
      Enable power management of the host system (default true)
  -force_mac string
      Force MAC address to be used for discovery services. If not set, it will use the first NIC
  -gzip
      Enable gzip compress on file server (default true)
  -homepage
      Enable user homepage. Accessible via /www/{username}/ (default true)
  -host string
      Listening host for HTTP server
  -hostname string
      Default name for this host (default "My ArOZ")
  -iobuf int
      Amount of buffer memory for IO operations (default 1024)
  -key string
      TLS key file (.key) (default "localhost.key")
  -log_format string
      Console log output format: text or json (default "text")
  -logging
      Enable logging to file for debug purpose (default true)
  -max_upload_size int
      Maxmium upload size in MB. Must not exceed the available ram on your system (default 8192)
  -ntt int
      Nightly tasks execution time. Default 3 = 3 am in the morning (default 3)
  -port int
      Listening port for HTTP server (default 8080)
  -public_reg
      Enable public register interface for account creation
  -root string
      User root directories (default "./files/")
  -session_key string
      Session key, must be 16, 24 or 32 bytes long (AES-128, AES-192 or AES-256). Leave empty for auto generated.
  -skip_mdadm_reload
      Skip mdadm reload config during startup, might result in werid RAID device ID in some Linux distro
  -smb_capture string
      Write a debug capture and trace log of the SMB server to this folder. Holds file names, for an admin only
  -storage_config string
      File location of the storage config file (default "./system/storage.json")
  -tls
      Enable TLS on HTTP serving (HTTPS Mode)
  -tls_port int
      Listening port for HTTPS server (default 8443)
  -tmp string
      Temporary storage, can be access via tmp:/. A tmp/ folder will be created in this path. Recommend fast storage devices like SSD (default "./")
  -tmp_time int
      Time before tmp file will be deleted in seconds. Default 86400 seconds = 24 hours (default 86400)
  -upload_async
      Enable file upload buffering to run in async mode (Faster upload, require RAM >= 8GB)
  -upload_buf int
      Upload buffer memory in MB. Any file larger than this size will be buffered to disk (slower). (default 25)
  -uuid string
      System UUID for clustering and distributed computing. Only need to config once for first time startup. Leave empty for auto generation.
  -version
      Show system build version
  -wlan_interface_name string
      The default wireless interface for connecting to an AP (default "wlan0")
  -wpa_supplicant_config string
      Path for the wpa_supplicant config (default "/etc/wpa_supplicant/wpa_supplicant.conf")

範例

//以標準網頁連接埠啟動 ArozOS
./arozos -port 80

//使用 HTTPS 取代 HTTP
./arozos -tls=true -tls_port 443 -key mykey.key -cert mycert.crt -disable_http=true

//在兩個不同的連接埠同時啟動 HTTPS 與 HTTP 伺服器
./arozos -port 80 -tls=true -key mykey.key -cert mycert.crt -tls_port 443

//把最大上傳大小改為 25MB
./arozos -max_upload_size 25

ArozOS 啟動器

進行 OTA 更新需要啟動器,這樣就不必每次更新 ArozOS 都用 SSH 連線到主機。您可以透過安裝指令碼或手動安裝。詳情請見以下儲存庫。

https://github.com/aroz-online/launcher

儲存設定

前往「系統設定 > 磁碟與儲存裝置 > 系統儲存池」,按新增磁碟並依照畫面步驟操作。

  • 名稱:磁碟在 ArozOS 中顯示的名稱(例如 Movie Storage)
  • 磁碟 ID:不可重複,僅限 ASCII 字元且不含空格。磁碟上的檔案位於 id:/(例如 movie:/)
  • 通訊協定 / 檔案系統:本機磁碟的格式,或遠端磁碟使用的 SMB、WebDAV、FTP、SFTP 或 S3
  • 路徑或伺服器位址:本機磁碟在主機作業系統中的掛載路徑,或遠端伺服器的位址。範例
    • 本機磁碟(ntfs / ext4 等):/media/storage1
    • WebDAV:https://example.com/webdav/storage
    • FTP / SFTP:192.168.1.220:2022
    • SMB:192.168.0.110/MyShare (「MyShare」是在檔案總管開啟 \\192.168.0.110\ 時看到的其中一個共用資料夾)
  • 使用者名稱與密碼:您在遠端伺服器上的帳號(僅限網路磁碟)
  • 資料夾配置
    • 一個共用資料夾:所有可使用此磁碟的人看到相同的檔案
    • 每位使用者一個私人資料夾:每位使用者只看得到自己的資料夾
  • 唯讀磁碟:任何人都無法變更此磁碟上的檔案

本機磁碟也可以交由 ArozOS 掛載(掛載裝置、掛載點與啟動時掛載)。如果磁碟已透過 /etc/fstab 掛載,這些欄位可以留空。ArozOS 的 -root 參數所需的磁碟無法自動掛載。

誰能使用某顆磁碟由它的存取清單決定:為每個權限群組設定一個層級,另外為其他人設定預設權限。

檔案伺服器

要從 ArozOS 分享檔案,有以下幾種方式。

  • 分享:在檔案管理員中對檔案按右鍵並選擇「分享」。別人分享給您的檔案會出現在「與我分享」
  • 使用者帳號:為需要存取檔案的人建立帳號,再以權限群組與磁碟存取清單限制其存取範圍
  • 網路檔案伺服器:在存取受限的權限群組中建立一個共用使用者,然後到「系統設定 > 網絡與連接 > 檔案伺服器」啟用 SMB / WebDAV / SFTP / FTP,並依照畫面指引設定存取模式
  • 舊版瀏覽器伺服器:透過簡易的 HTTP 與 Basic Auth 分享檔案給舊裝置。可在「系統設定 > 網絡與連接 > 檔案伺服器 > Directory Server」啟用,以您目前的 ArozOS 帳號登入

WebApp 開發

詳情請參閱開發者文件與 AGI API 參考(皆為英文)。

其他資源

如果您在找其他 WebApp(透過系統設定安裝)或子服務(已棄用),請看看我們的收藏: https://github.com/aroz-online/WebApp-and-Subservice-Index

社群與問答

直接聯絡

您可以透過 Telegram 聯絡作者!歡迎各種意見回饋與提問。

裝置相容性展示

在樹莓派以外的裝置上使用 ArozOS 嗎?歡迎分享您的伺服器配置與硬體規格!

https://github.com/tobychui/arozos/issues/50

相關文章

如果您在找教學,或需要排解一些小問題,可以參考使用者撰寫的這些文章。(非常感謝你們分享這個專案 :D)

英文

中文

日文

葡萄牙文

如果您寫了關於 ArozOS 的文章,歡迎建立 PR!

授權條款

授權條款以英文原文為準。

Source Code

ArozOS - General purpose cloud desktop platform Copyright (C) 2023 tobychui

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Documentations

Copyright (C) 2023 tobychui Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

Artwork and Mascot Design

Copyright (C) 2023 tobychui, All Right Reserved