GhostHub

BleedingXiko更新放缓

基于树莓派 4 的自托管媒体中心,支持本地流媒体播放、投屏电视、多用户配置、实时聊天和私有存储,无需数据库,注重隐私。

A self-hosted Raspberry Pi 4 media hub for local streaming, TV casting, profiles, chat, and private storage.

v5.3.0发布于 2026-05-25 16:50 UTC283star18fork同步于 2026-11-07 07:34 UTC

怎么上手

由 README 提炼,执行前请确认
ssh [email protected]
APP_TAG="$(curl -fsSL https://api.github.com/repos/BleedingXiko/GhostHub/releases | sed -n 's/.*"tag_name": "\(v[0-9][0-9.]*\)".*/\1/p' | head -n 1)"
curl -L -o install_ghosthub.sh "https://github.com/BleedingXiko/GhostHub/releases/download/${APP_TAG}/install_ghosthub.sh"
chmod +x install_ghosthub.sh
sudo ./install_ghosthub.sh
硬件要求按 README 说明

目标平台为 Raspberry Pi 4,需搭配 USB 存储;README 未提及显存或 GPU 型号要求,也未说明可在普通 PC 或 CPU 上运行。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

把树莓派 4 变成私有媒体服务器,在局域网内浏览、播放和分享照片视频,无需云账号

基于树莓派 4 的自托管媒体中心,支持本地流媒体播放、投屏电视、多用户配置、实时聊天和私有存储,无需数据库,注重隐私。

核心能力

  • 提供流媒体与画廊两种布局浏览照片视频
  • 支持多用户配置、头像、续播进度和独立历史
  • 内置主题构建器并可导入社区主题
  • 字幕支持 srt/vtt/ass/ssa 并由 ffmpeg 自动转换
  • 支持 HDMI 电视投屏、同步观看和聊天

容易踩的坑

仅支持 2022-01-28 Raspberry Pi OS Lite Bullseye 镜像,不是通用安装器;mkv、HEVC、AV1、DTS 等格式需另装实验性 GhostStream 转码器,默认关闭且未充分测试;服务默认监听 5000 端口,访问地址为 http://ghosthub.local 或 http://192.168.4.1

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v5.3.0
  1. v5.3.0GhostHub v5.3.0最新正式版2026-05-25 · 2026-05-25 16:50 UTC

    What's New

    Media Browsing Overhaul

    GhostHub’s media browsing system has been rebuilt around stable media records instead of fragile media list indexes. Streaming, Gallery, Search, Sync Mode, Chat sharing, TV casting, progress tracking, and GhostStream playback now resolve media through the same canonical media identity.

    This improves reliability across large libraries, sorted views, filtered views, subfolders, gallery timelines, search results, shuffled playback, uploads, deletes, renames, hidden-content changes, and partially loaded views.

    Theme Builder Overhaul

    The theme builder has been heavily redesigned and refactored. The editor now feels more like a focused design workspace, with cleaner layout containment, improved control grouping, better preview behavior, and styling that follows the active GhostHub theme instead of fighting it.

    Custom themes now use a simpler five-color contract: primary, accent, background, surface, and text. GhostHub derives the rest of the UI tokens from those colors, including buttons, cards, modals, inputs, borders, muted text, and theme builder controls.

    Security

    • /api/config no longer exposes python_config to non-admin users.
    • Sensitive Python-side settings, including tunnel secrets such as Pinggy access tokens, are now only included for admin sessions.
    • If your GhostHub was accessible to untrusted users before this update, rotate any exposed tunnel tokens.

    Fixes

    • Sync Mode and shared-view navigation no longer depend on stale media indexes.
    • Chat commands now follow the new media viewer model.
    • TV casting progress restore and cast-state tracking now stay aligned with the media overhaul.
    • Cloudflare Tunnel URL capture now detects the generated trycloudflare.com URL more reliably.
    • Existing media delete, hide, and unhide actions now batch backend updates to reduce refresh churn and stale cards.
    • Upload refreshes coordinate better with Streaming and Gallery while uploads are still active.
    • Upload rate limiting now waits for capacity instead of prematurely rejecting chunks.
    • Hidden-content reveal no longer marks content visible before the admin request succeeds.
    • Theme and layout dropdowns no longer go blank on first boot or after stale custom theme references.
    • Theme-builder editing now keeps the app shell, gestures, swipe navigation, and scrolling contained while editing.

    Docs

    • Updated architecture docs for the new media ordering, record hydration, manifest, selector, and invalidation model.
    • Updated the manual QA checklist for large-library media browsing.
    • Updated stress-test docs and tooling for session/admin auth, upload cleanup, and current media endpoints.
    • Updated README wording to mark GhostStream integration as experimental.
    • Updated README framework notes to describe RAGOT as the bundled frontend runtime.

    Version

    This is a minor release because it adds major user-facing media and theme improvements, plus new media ordering/record APIs, without intentionally breaking existing GhostHub installs or user data.

    What's Changed

    Full Changelog: https://github.com/BleedingXiko/GhostHub/compare/v5.2.0...v5.3.0

  2. v5.2.0GhostHub v5.2.02026-05-16 · 2026-05-16 19:10 UTC
    查看更新说明

    What's New

    USB User Data Backup

    Admin Settings now includes a USB backup tool for exporting and importing GhostHub user data. Backups are saved to a GhostHubBackups folder on a selected USB drive and can be restored on the same or another GhostHub device.

    You can now:

    • Export profiles, watch progress, hidden content, categories, drive labels, app config, and Wi-Fi settings
    • Import a GhostHub backup zip from USB
    • Review backup version and schema details before importing
    • Track export/import progress in the settings modal
    • Delete the backup zip after a successful import

    Fixes

    • GhostHub backup folders are now ignored by media discovery and folder browsing.
    • Uploads now coordinate better with Streaming refreshes to reduce reload churn while files are still uploading.
    • Fixed the theme selector so the current theme is selected correctly when opening preferences.
    • Fresh installs now explicitly require a reboot so system services finish applying cleanly.

    Docs

    • Updated ready-to-flash image notes for arm64 and armhf image variants.
    • Clarified that prebuilt images ship with SSH disabled.

    Version

    This is a minor release because it adds a new user-facing USB backup and restore workflow.

    Full Changelog: https://github.com/BleedingXiko/GhostHub/compare/v5.1.0...v5.2.0

  3. v5.1.0GhostHub v5.1.02026-05-11 · 2026-05-11 21:36 UTC
    查看更新说明

    What's New

    Staged Multi-Target Uploads

    File Manager uploads now support staging files into multiple destination folders before starting the upload. This makes it possible to queue files for different folders in one flow instead of uploading one folder at a time.

    You can now:

    • Select multiple files
    • Choose a destination folder with the existing searchable folder picker
    • Stage batches into different folders
    • Review grouped upload targets
    • Start all staged uploads together

    Fixes

    • Fixed the minimized upload status indicator so it opens a focused upload status view instead of a broken File Manager modal state.
    • Fixed the staged upload footer button so the icon and label stay inside the button.
    • Fixed Streaming layout rows getting stuck in the loading shimmer after revealing and hiding hidden content.

    Docs

    • Removed stale hardcoded app release versions from public install docs.
    • README now uses a dynamic v* app release badge.

    Version

    This is a minor release because it adds a new user-facing upload workflow.

    Full Changelog: https://github.com/BleedingXiko/GhostHub/compare/v5.0.2...v5.1.0

  4. v5.0.2GhostHub 5.0.22026-05-03 · 2026-05-03 18:42 UTC
    查看更新说明

    Fixes: Category filter pill respects renamed USB labels — stepping back through auto:: categories via the pill no longer falls back to the raw filesystem leaf (e.g. Sda2); it now resolves the user-defined drive label (My Movies) from a persistent id→name cache that survives filter changes.

    Streaming layout no longer double-flickers on filter step-back — clicking a category then clicking the "all" pill caused rows and cards to rebuild twice. The post-fetch sync now shallow-diffs against the rows component and only patches what actually changed; individual category rows refresh in place as their media lands instead of being torn down globally.

    Full Changelog: https://github.com/BleedingXiko/GhostHub/compare/v5.0.1...v5.0.2

  5. v5.0.1GhostHub 5.0.1: The Pi 4 Release2026-04-26 · 2026-04-26 00:58 UTC
    查看更新说明

    This is the biggest GhostHub release yet.

    GhostHub has moved from a private Pi appliance project into a public AGPL-3.0 open-source source tree. This release is not just a feature update. It is the first real public foundation for building, installing, updating, modifying, and contributing to GhostHub from source.


    GhostHub Is Now Open Source

    GhostHub is now released under the AGPL-3.0 License.

    That means the current source tree is public, auditable, hackable, and ready for community contributions. Older public GhostHub releases may remain available under MIT, but the active project going forward is AGPL-3.0.


    New Public Install Flow

    GhostHub now has a proper GitHub Releases based install and update path.

    • Fresh installs download release assets directly from GitHub.
    • Admin updates check the latest GitHub Release tag.
    • Update installs preserve local app state, settings, virtualenv, Headscale, and Cloudflared data.
    • Local development deploys can still build from source and push directly to a Pi.

    The public release assets are:

    • Ghosthub_pi_github.zip
    • install_ghosthub.sh

    Raspberry Pi 4 Setup Is Now Documented

    The setup docs have been rebuilt around the real supported target:

    • Raspberry Pi 4
    • Raspberry Pi OS Lite Bullseye, 2022-01-28-raspios-bullseye-armhf-lite
    • Python 3.9
    • Pi Imager advanced settings
    • SSH setup
    • Fresh install
    • Local source deploy
    • Image prep workflow

    The goal is simple: flash the right Pi OS image, clone the repo, run one deploy script, and get GhostHub running.


    New Public Docs

    The repo now has a proper public-facing documentation set:

    • New README
    • Quick Start guide
    • DIY install guide
    • Flashable image guide
    • Release guide
    • Contributing guide
    • Security policy
    • Architecture docs
    • Raspberry Pi operations docs

    The README has also been rebuilt as the front door for the project instead of just a developer note.


    Cleaner Open-Source Source Tree

    This release removes private commercial/provisioning pieces and cleans up the project for public development.

    Removed or replaced:

    • Private OTA/update server flow
    • Device provisioning requirements
    • Hardware serial locking
    • Proprietary licensing docs
    • Cloudflare R2 release helpers
    • Old submodule references
    • Private copy artifacts and agent-local files

    RAGOT is now documented as a vendored frontend runtime at:

    static/js/libs/ragot.esm.min.js


    Developer Workflow Improvements

    The development flow is now easier to understand and reproduce:

    • Python 3.9 virtualenv setup is documented.
    • Release workflow uses Python 3.9.
    • Local deploy scripts bootstrap the dev environment before building.
    • Tests and release packaging are documented for contributors.
    • The Pi deploy flow has Standard, Update, and Image Prep modes.

    UI Polish

    A few user-facing issues were cleaned up along the way:

    • Profile selection now fully owns the screen and hides chat while active.
    • New profile creation no longer auto-opens unless the user clicks Add Profile.
    • Public docs now include screenshots for a stronger first impression.

    For Existing Users

    If you are already running GhostHub, this release changes where updates come from. Updates now use GitHub Releases instead of the old private update path.

    For a clean validation path, install this release first, then update to the next tagged release through the admin UI.


    GhostHub is now public, self-hosted, Pi-first, and ready for people to actually build on.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    GhostHub

    A self-hosted media server for Raspberry Pi 4. Browse your photos and videos from any device on your network — no cloud, no account, no subscription.

    (Note: The custom theme shown in the screenshots above is called "Oasis" in the Community Theme Gallery.)

    Compatibility: GhostHub targets Raspberry Pi 4 using the supported 2022-01-28 Raspberry Pi OS Lite Bullseye image. Use arm64 for the recommended Pi 4 setup, or armhf if you need the 32-bit build. It is not a generic installer for every Raspberry Pi OS image.


    What It Does

    GhostHub turns a Raspberry Pi 4 and USB storage into a private media server for your home network. Open it from a phone, tablet, laptop, desktop browser, or HDMI display to browse, play, upload, download, organize, and share your photo and video library.

    GhostHub supports two network modes:

    • Home network — the Pi connects to your router by Ethernet and is reachable from devices on that LAN, including phones and laptops on the router's Wi-Fi.
    • Access point — the Pi broadcasts its own GhostHub Wi-Fi network for portable or offline use.

    Features

    • Streaming and Gallery layouts for photos and videos
    • Profiles with avatars, resume progress, and per-user history
    • Custom themes via the built-in Theme Builder and the Community Theme Gallery (GitHub Repo)
    • Upload, download, rename, and delete actions
    • Categories, hidden folders, playlists, sorting, and search
    • Subtitles for video (.srt .vtt .ass .ssa), auto-converted via ffmpeg
    • TV casting to an HDMI display attached to the Pi
    • Sync watching and chat between connected viewers
    • Admin panel: updates, storage, Wi-Fi, cache, restart, logs, system status
    • Offline access-point mode
    • Optional remote access via Cloudflare Tunnel or a Tailscale/Headscale mesh

    Supported Media

    Plays in any modern browser without extra setup:

    Video    .mp4 (H.264/AAC), .webm
    Images   .jpg .jpeg .png .gif .webp  (.heic on Safari)
    Subs     .srt .vtt .ass .ssa  (text tracks auto-extracted via ffmpeg)
    

    Plays through GhostStream, an experimental companion transcoder that runs on a separate machine:

    .mkv .avi .mov .wmv .flv .ts .m2ts .mpg .vob
    HEVC / H.265 / AV1 / VP9 video
    AC3 / DTS / TrueHD / E-AC3 audio
    Anything above ~25 Mbps over remote links
    

    GhostStream is not bundled, is off by default, and its transcoding path has not been heavily tested inside GhostHub yet. Without it, files in the second list show a "No transcoding server connected" message instead of playing. Most phone recordings, screen captures, and downloaded .mp4 files are in the first list and play directly.

    Quick Start

    Option 1 — Flash the prebuilt image (fastest)

    1. Download the GhostHub SD card image from the ready-to-flash image release built on v5.2.0. Use arm64 for the recommended Raspberry Pi 4 image, or armhf if you need the 32-bit build.
    2. Flash it to a microSD card with Raspberry Pi Imager or balenaEtcher.
    3. Boot the Pi, connect your phone or laptop to the GhostHub Wi-Fi network, and open http://ghosthub.local (or http://192.168.4.1).

    Option 2 — DIY install on stock Raspberry Pi OS

    Flash the supported 2022-01-28 Raspberry Pi OS Lite Bullseye base image with Raspberry Pi Imager v1.8.5:

    Recommended: 2022-01-28-raspios-bullseye-arm64-lite
    https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2022-01-28/2022-01-28-raspios-bullseye-arm64-lite.zip
    
    32-bit fallback: 2022-01-28-raspios-bullseye-armhf-lite
    https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2022-01-28/2022-01-28-raspios-bullseye-armhf-lite.zip
    

    In Imager's advanced options, set:

    Hostname: ghosthub
    Username: ghost
    Enable SSH: yes
    Password: (your choice)
    

    SSH into the Pi, then run the installer:

    ssh [email protected]
    
    APP_TAG="$(curl -fsSL https://api.github.com/repos/BleedingXiko/GhostHub/releases \
      | sed -n 's/.*"tag_name": "\(v[0-9][0-9.]*\)".*/\1/p' \
      | head -n 1)"
    curl -L -o install_ghosthub.sh \
      "https://github.com/BleedingXiko/GhostHub/releases/download/${APP_TAG}/install_ghosthub.sh"
    chmod +x install_ghosthub.sh
    sudo ./install_ghosthub.sh
    

    The APP_TAG variable should point at the newest app release tag (vX.Y.Z). Image tags such as B5 are published separately.

    The installer downloads Ghosthub_pi_github.zip from GitHub Releases, installs system dependencies, configures the systemd service, prepares USB, access-point, and HDMI support, then starts GhostHub.

    Option 3 — Deploy local source from your computer

    If you cloned this repo and want to deploy your working tree to a Pi instead of installing a public release:

    ./scripts/deploy_to_pi.sh        # macOS / Linux
    .\scripts\deploy_to_pi.ps1       # Windows PowerShell
    

    The deploy CLI builds a local ghostpack ZIP, uploads it to the Pi, and does not use GitHub Releases.

    See Quick Start, Flash Image, or DIY Install for detailed setup instructions.

    How It Runs

    Raspberry Pi 4 + USB storage
            |
            v
    GhostHub service on port 5000
            |
            +-- phone / tablet / desktop browser
            +-- HDMI kiosk / TV display
            +-- optional mesh or tunnel access
    

    GhostHub uses Python 3.9, Flask, and SPECTER on the backend; modular ES modules and RAGOT on the frontend; and SQLite for local state. It is packaged for Raspberry Pi, but the source tree remains a normal Flask project for local development.

    Updates

    Updates ship through GitHub Releases. The admin UI checks the latest vX.Y.Z release tag, downloads the installer, validates it, and schedules the update with systemd-run.

    Updates preserve instance/, venv/, headscale, and cloudflared.

    Public release assets:

    • Ghosthub_pi_github.zip
    • install_ghosthub.sh

    The ready-to-flash SD card image is published separately by the maintainer. The GitHub release workflow does not build it.

    See Release Process.

    Manual install flags

    sudo ./install_ghosthub.sh --version vX.Y.Z                          # pin a specific app release tag
    sudo ./install_ghosthub.sh --local-zip /path/to/Ghosthub_pi_github.zip   # install from a local zip
    sudo ./install_ghosthub.sh --local-only                              # use /tmp/ghosthub_deploy.zip
    

    Development

    GhostHub targets Python 3.9. Use a Python 3.9 virtual environment so local tests match Pi deployments.

    python3.9 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
    cd static/js && npm install && cd ../..
    python ghosthub.py
    

    On Windows PowerShell, use py -3.9 -m venv venv and .\venv\Scripts\Activate.ps1; the rest is the same with backslash paths.

    Run the full test suite:

    ./venv/bin/python scripts/run_all_tests.py
    

    Run a focused subset:

    ./venv/bin/python -m pytest tests/test_admin_routes.py -v
    cd static/js && npm test && cd ../..
    

    Architecture

    • Backend routes and services use the specter-runtime package (Service / Controller / Handler primitives).
    • Frontend modules use the RAGOT runtime at static/js/libs/ragot.esm.min.js.
    • SQLite stores app state under instance/.
    • Raspberry Pi service setup is handled by install_ghosthub.sh.
    • Release ZIPs are built with scripts/ghostpack.py --zip.

    Start with Architecture before changing internals.

    Related Projects

    GhostHub uses three open-source companion projects:

    • SPECTER — backend runtime for services, controllers, handlers, and the event bus. Installed from PyPI as specter-runtime.
    • RAGOT — frontend runtime for component lifecycle, module lifecycle, DOM updates, events, and sockets. Shipped as a prebuilt bundle at static/js/libs/ragot.esm.min.js.
    • GhostStream — experimental companion transcoder for .mkv, HEVC, AV1, DTS, and other browser-incompatible formats. Runs on a separate machine, is off by default, and has not been heavily tested inside GhostHub yet.

    Documentation

    Contributing

    Issues, fixes, docs, tests, Pi validation, and release-readiness work are welcome. Read CONTRIBUTING.md before opening larger changes. For backend work, follow the SPECTER controller and service patterns. For frontend work, use the existing ES module structure and the RAGOT runtime.

    Security

    Do not post credentials, private media, device logs with secrets, or private network details in public issues. See SECURITY.md for private vulnerability reporting.

    License

    GhostHub is licensed under the GNU Affero General Public License v3.0. See LICENSE.

    Donations

    If GhostHub is useful to you, donations and sponsorships help cover Raspberry Pi test hardware, maintenance time, and release infrastructure.