A private YouTube client with a self-hosted web server and native apps for Android, Windows, macOS, Linux and iPhone/iPad.
Alternativa de código abierto a YouTube
A private YouTube client with a self-hosted web server and native apps for Android, Windows, macOS, Linux and iPhone/iPad. No Google account and no tracking; subscriptions, history and playlists stay on your device or on a server you run. The self-hosted stack is one Docker Compose file, and the apps can share that library across a household.
READMEbiolend83/tubehaus en GitHub
On the TV, the phone, the PC and the iPad. Run it on your own server, or just install the app.
⬇ Get the app · 🖥️ Run the server · 📖 How it works · ❓ FAQ · 💬 Discord · English · 한국어
Independent open-source software, not affiliated with YouTube or Google. Please read the disclaimer.
Same home grid, same player, same keyboard shortcuts. Nobody in the house has to learn anything new, and the TV gets a remote-friendly version of it.
No Google account, no ads, no tracking scripts. Subscriptions, history and playlists are yours, on your device or your server, and they export to any format.
Pause on the TV, carry on on the phone. Every device and every browser in the house shares one library, or each person gets their own.
When a side door closes, TubeHaus falls back to SABR, the protocol youtube.com itself streams with, with its own BotGuard token and no account. On the server a flagged address is swapped for a new one by itself. How it works
There are two ways to run it. Same name, same look; they differ in where the work happens.
| 📱 The app | 🖥️ The server (this branch) | |
|---|---|---|
| Best for | One phone, TV or PC, today, with nothing to set up | A whole household, iPhone/iPad without sideloading, or keeping YouTube away from your devices |
| Runs on | Android, Android TV / Google TV, Windows, macOS, Linux, iPad/iPhone | Any Docker host: a VPS, a home PC, a Raspberry Pi. You watch in any browser |
| Talks to YouTube | The device itself, with the app's own engine | Your server, with its own engine, through Cloudflare WARP. Devices only talk to your server |
| YouTube sees | Your device's address, like any YouTube app | A Cloudflare WARP address, not your home |
| Library | On the device, or shared through your TubeHaus server | On the server, for every device and person |
| Only here | Offline downloads, background play and picture-in-picture, the mpv player on desktop, on-device recommendations | Live captions (whisper.cpp), send to TV, full-quality downloads, TV mode in any TV browser |
| Get it | Download | docker compose up |
Both? The app can connect to your server (Settings → TubeHaus server): one library everywhere, while each app still plays the video itself.
| Platform | Download | Notes |
|---|---|---|
| 🤖 Android & TV | APK | Android 8+. On Android TV, Downloader code 3155410. Updates with Obtainium |
| 🪟 Windows | MSI | Or scoop bucket add tubehaus https://github.com/biolend83/tubehaus then scoop install tubehaus |
| 🍏 macOS | Apple Silicon · Intel | Or brew tap biolend83/tubehaus https://github.com/biolend83/tubehaus && brew trust biolend83/tubehaus && brew install --cask tubehaus (mpv is inside the app) |
| 🐧 Linux | .deb · .rpm | ARM64 and tar.gz in all files; Arch: packaging/aur |
| 📱 iPad / iPhone | .ipa (beta) | iOS 16+, installed with Sideloadly and your Apple ID (re-signed every 7 days with a free one). Apple's player up to 4K, background play, picture-in-picture, offline downloads. Rather not sideload? Use the server in Safari |
All files, Windows portable and ARM builds: latest release. Install notes and source per platform: android-app · windows-app · mac-app · linux-app · ios-app. The rest of this README is about the server.
Since 1.6 the server no longer sits on Invidious. It talks to YouTube itself, so the stack is three containers lighter (no Invidious, no companion, no PostgreSQL). It's also quick: a video starts on the streams alone and the title, description and related videos fill in a moment later, answers are kept and refreshed in the background, the stream connections to YouTube stay open, and a video's comments are fetched as it opens.
| TubeHaus 1.6.3 | Invidious | |
|---|---|---|
| A video starts playing | 0.16 s ▇▇ | 1.29 s ▇▇▇▇▇▇▇▇▇▇▇▇▇ |
| The whole video page (title, description, related) | 0.59 s ▇▇▇▇▇▇ | 1.29 s ▇▇▇▇▇▇▇▇▇▇▇▇▇ |
| A channel | 0.38 s ▇▇▇▇ | 0.66 s ▇▇▇▇▇▇▇ |
| A channel's videos | 0.28 s ▇▇▇ | 0.61 s ▇▇▇▇▇▇ |
| A search | 0.56 s ▇▇▇▇▇▇ | 0.56 s ▇▇▇▇▇▇ |
| Comments, once the video is open | 0.002 s ▏ | 0.16 s ▇▇ |
| Anything opened again | 0.002 s ▏ | – |
| Each piece of the stream | 0.07 s ▇ | – |
Medians of 10–12 first visits each, on one server through the same WARP address (TubeHaus measured 2026-11-17; Invidious in the 1.6.0 comparison, before it left the server). A search or channel is mostly YouTube's own time, so it can't go much lower; what TubeHaus adds is that the video plays before the page is complete, the next clicks are fetched while you look, and nothing is fetched twice. Stream pieces reuse open connections (a new one takes 0.17 s).
Hovering a video or showing search results already fetches the first few, so a click usually lands on a page that is ready. It still answers in Invidious' API format, so the web app, the apps' server mode and other tools that speak that API keep working. Up to 1.5 TubeHaus was built on Invidious and invidious-companion, and much of what it knows about YouTube was learned from them: thank you, Invidious team. Updating from 1.5? See below.
⚡ Instant, and always the best picture A video starts in about a sixth of a second, pages you've seen open from a cache that refreshes in the background, and the videos you're likely to open next are looked up before you click. Quality never drops on its own: 60 fps first, the codec your device decodes in hardware, a buffer sized for 8K.
🔒 Your devices never talk to Google Video, thumbnails and pages all come through your server: no Google cookies or YouTube scripts in your browser. YouTube sees a Cloudflare WARP address, never your home.
🎙️ Captions for live streams YouTube has none. TubeHaus writes them on the fly with whisper.cpp, a few seconds ahead of playback, on one CPU core. Live streams themselves don't stall: segments are fetched ahead with exact timing.
📺 Made for the TV, too A TV mode driven by the remote's arrows, OK and Back, and Send to TV: pick a video on the phone and it starts on the TV, no Chromecast needed. Watch together keeps everyone in a room on the same second.
🌿 Calm mode One switch turns YouTube back into a tool: Home shows only new videos from your subscriptions, Shorts, trending and recommendations disappear, nothing autoplays, comments stay folded. Search still works.
🧠 Shorts that learn, on your server How long you watched, looped, liked or swiped away becomes a score per channel and topic in a small file on your server. Every fourth Short is something new. Nothing leaves the server; reset it any time.
🚫 No clickbait, no sponsor reads DeArrow titles and thumbnails chosen by people instead of the uploader, SponsorBlock skips with "Jump to the highlight", and dislike counts from Return YouTube Dislike.
💾 Keep it, in full quality 1080p and 4K come as separate video and audio; the server fetches both and merges them with ffmpeg. Subtitles are translated for videos without your language.
☁️ Happy on a cheap cloud VM Cloud addresses often get "Sign in to confirm you're not a bot". TubeHaus goes out through Cloudflare WARP in proxy mode, takes a fresh visitor identity, then a new WARP address when YouTube walls it off.
🌍 15 languages 한국어 · English · 日本語 · 简体中文 · Español · Português · Français · Deutsch · Русский · हिन्दी · Bahasa Indonesia · Türkçe · বাংলা · Tiếng Việt · Polski. View counts and dates follow each language's own style.
Optional lookups the browser makes itself: SponsorBlock and DeArrow (both by a hash prefix, not the video ID) and Return YouTube Dislike. DeArrow's thumbnails come through the server, so DeArrow sees the server rather than each viewer.
(Formerly HomeTube, renamed to avoid a clash with an unrelated project of the same name.)
FreeTube and NewPipe are great, mature projects, and TubeHaus owes a lot to them. The difference is mostly where it runs and how it looks:
| TubeHaus | FreeTube | NewPipe | |
|---|---|---|---|
| Runs on | Android phones and Android TV / Google TV, Windows, macOS, Linux, iPad/iPhone (sideloaded), and any browser through the server | Windows, macOS, Linux | Android phones and tablets |
| Looks like | YouTube itself: same layout, same keyboard shortcuts | Its own design | Its own design |
| Google account | Not needed | Not needed | Not needed |
| Home screen | Recommendations learned on the device from what you watch, like, skip and hide; nothing leaves it | Subscriptions, trending and popular | Subscriptions feed and trending |
| One library on several devices | Optional: connect the apps to your own TubeHaus server | Export and import a file | Export and import a file |
| SponsorBlock and DeArrow | Both built in | Both built in | Not in the official app (the Tubular fork has SponsorBlock) |
| On a TV | Made for the remote: a TV layout with arrow-key navigation | No TV version | Works, but made for phones |
| Track record | Young (2026), beta, one maintainer | Since 2018, large community | Since 2015, large community, on F-Droid |
When to pick something else: for a desktop app with the longest track record, FreeTube is excellent. For an Android phone only, with a long history and F-Droid, NewPipe is excellent. TubeHaus is for one YouTube-like app on the TV, the phone, the PC and the iPad, optionally sharing one library.
| You need | |
|---|---|
| A server | Linux with Docker and docker compose, x86-64 or ARM64 (a free Oracle Cloud ARM VM is plenty) |
| CPU / RAM | 2+ cores, about 4 GB RAM; live captions use one more core while someone watches live with captions on |
| Disk | about 10-20 GB, mostly images. Videos are streamed, not stored |
| An address | a domain or a free wildcard name such as sslip.io for HTTPS, or plain HTTP on a LAN |
git clone https://github.com/biolend83/tubehaus && cd tubehaus
cp .env.example .env # set your domain
docker compose pull # prebuilt images, amd64 and arm64
docker compose up -d
That's it: Caddy, the TubeHaus server with its YouTube engine and Cloudflare WARP, the PO-token provider for live streams and whisper.cpp for live captions come up together. WARP registers itself on first start and keeps its registration in a volume.
Open your domain. A new server asks how it will be used — just me, family (an account each), anyone (a public server) or no sign-in (home network / VPN only) — and makes your account. It asks for a 6-digit setup code first, so a stranger who finds the address can't take it over: docker compose logs tubehaus shows it. Everything else (accounts, guests, the name, menu links, quality and load limits, single sign-on) is in Settings → Server settings and takes effect at once. A setting written in .env still works and wins over the page.
Note On TrueNAS? TubeHaus is in the TrueNAS app catalog: Apps → Discover Apps, search for TubeHaus (community train). Nothing to clone.
Important Going on a public domain? Pick "just me" or "family" on the first start (or turn on accounts in Settings → Server settings). With "no sign-in", everyone who opens the address shares the same library. More ways: Add a login before you expose it.
Tip Updating from 1.5 or older? Invidious, its companion and PostgreSQL are no longer needed. After
git pull, rundocker compose pull && docker compose up -d --remove-orphansto stop them; their secrets in.envcan go. Your library is in thetubehaus-datavolume and stays as it is. Details: Updating and backups.
Caddy can serve plain HTTP on any port. In .env:
# plain HTTP on a LAN, at http://192.168.1.10:8080
TUBEHAUS_SITE=:80
TUBEHAUS_HTTP_BIND=8080
TUBEHAUS_URL=http://192.168.1.10:8080
# behind your own nginx, Traefik or Caddy, which handles HTTPS for tube.example.com
TUBEHAUS_SITE=:80
TUBEHAUS_HTTP_BIND=127.0.0.1:8080 # only your proxy reaches it
TUBEHAUS_HTTPS_BIND=127.0.0.1:8443 # unused, kept off the public 443
TUBEHAUS_URL=https://tube.example.com
Then point your proxy at http://127.0.0.1:8080 for everything, unbuffered (video and live streams), e.g. in nginx:
proxy_pass http://127.0.0.1:8080; proxy_buffering off; proxy_read_timeout 1h; proxy_set_header Host $host;
Complete nginx and Traefik examples are in Running behind your own reverse proxy.
The same three containers are also described for Flisk and read the same .env. Optional; docker compose stays the main way.
npm install -g @flisk-sh/flisk # Flisk 1.4.26 or later
git clone https://github.com/biolend83/tubehaus && cd tubehaus
cp .env.example .env
flisk up # flisk status / flisk logs --service tubehaus / flisk down
Pick one of the two for a server, not both. Ports, volumes, updates and moving an existing install are in Running with Flisk. Thanks to @odykyi for the Flisk setup (#40, #42).
docker compose up -d --build builds the TubeHaus image from your clone (for example after changing the code). The first build takes a few minutes because of whisper.cpp.
Without a login, everyone who opens the address shares the same library.
TUBEHAUS_AUTH=basic, TUBEHAUS_USER and TUBEHAUS_PASSWORD_HASH in .env (hash from docker compose run --rm caddy caddy hash-password; every $ as $$)TUBEHAUS_AUTH=accounts gives a sign-in page and a library per personTUBEHAUS_OIDC_ISSUER, TUBEHAUS_OIDC_CLIENT_ID and TUBEHAUS_OIDC_CLIENT_SECRET add a "Continue with …" button for your OpenID Connect provider (Authentik, Authelia, Keycloak, Pocket ID, …; redirect URI <TUBEHAUS_URL>/api/p/auth/oidc/callback). TUBEHAUS_OIDC_ONLY=1 turns passwords offforward_authAll of them, step by step: Opening TubeHaus to your household.
docker compose exec tubehaus python3 /app/server/tubehaus_server.py --doctor
One line each for WARP, YouTube, a search, a real video lookup with a few bytes of its stream, and the optional tools. If something fails, see Troubleshooting.
They aren't two editions to choose from: one is the server, the other the web app, and a working setup always has the server plus one way of serving the web app.
| Image | What it is | Ports |
|---|---|---|
ghcr.io/biolend83/tubehaus | The server. Talks to YouTube, keeps the library, live captions, offline saves, watch-together rooms. No pages of its own | 3010 (inside) |
ghcr.io/biolend83/tubehaus-web | The web app and its front door. The pages, plus Caddy sending every other request to the server. The only port you open | 8080 |
docker compose up from this repository uses only tubehaus: the web app comes from your clone's web/ folder, served by the plain caddy imagedeploy/docker-compose.home.ymldeploy/docker-compose.home.yml is the store set (one port, no WARP, no extra permissions)Both are published together on each server release with the same version number; keep them on the same version.
browser ──► Caddy ─┬─ /y/*, page navigations ──► web/ (the app)
└─ everything else ─────────► TubeHaus server
│ library, live streams, captions, downloads,
│ and its own YouTube engine (/api/v1/*,
│ video streams, captions, pictures)
▼
Cloudflare WARP (proxy mode)
│
YouTube
The engine asks YouTube the way YouTube's own apps do: lists (search, channels, playlists, comments) from the web client, the video streams from the visionOS client (plain addresses, no PO token) or over SABR when that one is refused, and the exact upload time and category from the web player, over kept-open, compressed connections. It answers in Invidious' API shapes (/api/v1/videos, /api/v1/search, ...; ?local=true included), so tools that speak that API can use it too. Streams, captions and pictures come through the server, so the viewer's browser only ever talks to it. More in How TubeHaus is put together.
You need a Linux server with Python 3.10+ and Caddy (or nginx).
1. Cloudflare WARP in proxy mode. Install the official client (pkg.cloudflareclient.com), then set proxy mode before connecting, or the whole server's routing moves into WARP:
warp-cli --accept-tos registration new
warp-cli --accept-tos mode proxy # listens on 127.0.0.1:40000
warp-cli --accept-tos connect
curl -x http://127.0.0.1:40000 https://www.cloudflare.com/cdn-cgi/trace # warp=on
(Unofficial WARP clients such as wgcf get rate-limited by Cloudflare; use the official one.)
2. The TubeHaus server.
git clone https://github.com/biolend83/tubehaus /opt/tubehaus
cd /opt/tubehaus && cp .env.example .env # edit it
sudo cp deploy/tubehaus.service /etc/systemd/system/ && sudo systemctl enable --now tubehaus
Optional extras:
ggml-base-q5_1.bin; set HT_WHISPER_BIN / HT_WHISPER_MODELffmpeg3. Caddy or nginx. Copy web/ to /srv/tubehaus/web and adapt deploy/Caddyfile.example. For nginx, start from deploy/nginx.conf.example and replace the hostname, certificate paths and upstream addresses; it keeps video streams, long polls and downloads unbuffered with extended timeouts.
Without HT_ACCOUNTS=1, anyone who can open it shares the same library: put your own login in front (Caddy basic_auth, or forward_auth to Authelia / Authentik / a passkey gate) before exposing it. Set window.TUBEHAUS_LOGIN_URL in index.html if expired sessions should be sent to your login page.
A personal TubeHaus has one shared library and doesn't ask who you are, so the real question when you set it up is who can reach the address. Pick one of these three; the first two need no password at all, because nobody outside can get to the server.
| Who can open it | Needs | |
|---|---|---|
| Home network only | devices on your Wi-Fi | nothing extra |
| Over a VPN | your own phones and laptops, anywhere | Tailscale or WireGuard on each device |
| On the internet with a login | anyone with the password | a domain (or sslip.io) and a login |
Install TubeHaus first with the Quick start, then come back here.
For a server at home (a mini PC, a Raspberry Pi 4/5, a NAS that runs Docker). In .env:
TUBEHAUS_SITE=:80
TUBEHAUS_HTTP_BIND=8080
TUBEHAUS_URL=http://192.168.1.10:8080 # the server's address on your network
docker compose up -d, then open http://192.168.1.10:8080 on any device at home. Don't forward
that port on your router: then it stays inside your home.
Give the server a fixed address in your router (often called "DHCP reservation"), so the address doesn't change after a power cut.
The server stays closed to the internet, and your own devices reach it as if they were at home, from anywhere. This is the safest way to use a cloud server.
Install Tailscale on the server (curl -fsSL https://tailscale.com/install.sh | sh, then
sudo tailscale up) and on every phone and laptop that should open TubeHaus, signed in to the
same account.
Let Tailscale give TubeHaus an HTTPS address inside your tailnet. In .env:
TUBEHAUS_SITE=:80
TUBEHAUS_HTTP_BIND=127.0.0.1:8080
TUBEHAUS_HTTPS_BIND=127.0.0.1:8443
TUBEHAUS_URL=https://myserver.your-tailnet.ts.net # shown by "tailscale serve status"
docker compose up -d
sudo tailscale serve --bg 8080
Open the https://….ts.net address on your devices. Nothing is open to the internet: in the
cloud provider's firewall you can close everything except SSH.
To share it with family members, invite them to your tailnet or share the machine with their Tailscale account.
If you'd rather not depend on Tailscale's coordination server, run WireGuard yourself:
sudo apt install wireguard, create /etc/wireguard/wg0.conf with an address
such as 10.8.0.1/24 and one [Peer] per device, and sudo systemctl enable --now wg-quick@wg0.iptables). That is the only port that needs to be open.TUBEHAUS_HTTP_BIND=10.8.0.1:8080,
TUBEHAUS_URL=http://10.8.0.1:8080, and the other lines as in Home network only.qrencode -t ansiutf8 < phone.conf).Use this when someone can't install a VPN app (a smart TV's browser, a work laptop). You need a
hostname: your own domain, or a free one from sslip.io such as
tube.203-0-113-7.sslip.io for the server at 203.0.113.7. Caddy gets the HTTPS certificate by
itself; ports 80 and 443 must be open.
Always set a login, or everyone who finds the address shares your library:
TUBEHAUS_AUTH=basic, TUBEHAUS_USER and TUBEHAUS_PASSWORD_HASH in .env
(the hash comes from docker compose run --rm caddy caddy hash-password; write every $ as $$).TUBEHAUS_AUTH=accounts. Everyone signs up with a name and a
password on TubeHaus' own sign-in page and gets their own subscriptions, history and playlists;
the first account keeps the library that was there before. Once everyone has an account, set
TUBEHAUS_MAX_ACCOUNTS to that number so nobody else can sign up. Passwords can be changed in
Settings.forward_auth.Already running nginx, Traefik or another Caddy? See Running behind your own reverse proxy.
docker compose exec tubehaus python3 /app/server/tubehaus_server.py --doctor checks every part.If nginx, Traefik or another proxy already owns ports 80 and 443 on your server, let it handle HTTPS
and pass everything to TubeHaus's Caddy on a local port. This page is for the Docker setup from the
Quick start. For a setup without Docker, see
deploy/nginx.conf.example instead.
In .env (replace tube.example.com with your hostname):
TUBEHAUS_SITE=:80
TUBEHAUS_HTTP_BIND=127.0.0.1:8080 # only your proxy reaches it
TUBEHAUS_HTTPS_BIND=127.0.0.1:8443 # unused, kept off the public 443
TUBEHAUS_URL=https://tube.example.com
Then docker compose up -d. curl -I http://127.0.0.1:8080/ on the server should answer.
Add a login before the proxy makes it public: TUBEHAUS_AUTH=basic, TUBEHAUS_USER and
TUBEHAUS_PASSWORD_HASH in .env (see Add a login).
Or use your proxy's own login (nginx auth_request, a Traefik forwardAuth middleware with
Authelia or Authentik) for the whole site.
Whatever proxy you use, four things matter:
| Why | |
|---|---|
Everything goes to http://127.0.0.1:8080 | Caddy inside the stack decides what goes to the app and what to the server. Don't split paths yourself. |
| Buffering off | Video, live streams and downloads are long responses; a buffering proxy holds them back or fills its disk. |
| A long read timeout (1 hour) | Live streams and large downloads stay open for a long time. |
The Host header passed through, plus X-Forwarded-Proto | So links and redirects use your hostname and https. |
Library imports are uploads of up to about 25 MB, so allow request bodies at least that big.
A complete server block, for example /etc/nginx/sites-available/tubehaus (then link it into
sites-enabled and nginx -t && systemctl reload nginx). The certificate paths are certbot's:
server {
listen 80;
listen [::]:80;
server_name tube.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on; # nginx 1.25.1 or later; on older versions write "listen 443 ssl http2;"
server_name tube.example.com;
ssl_certificate /etc/letsencrypt/live/tube.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/tube.example.com/privkey.pem;
client_max_body_size 25m; # library imports
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "";
proxy_buffering off; # video and live streams
proxy_request_buffering off;
proxy_read_timeout 1h;
proxy_send_timeout 1h;
}
}
If Traefik runs in Docker, it can reach TubeHaus's Caddy over a shared Docker network, and no host port is needed at all. This assumes a Traefik v2 or v3 that already has:
traefik (docker network create traefik),websecure and a certificate resolver called letsencrypt,exposedByDefault=false (so only containers with traefik.enable=true are published).Change those three names in the labels below if yours are different. Put this next to
docker-compose.yml as docker-compose.override.yml; docker compose reads it automatically:
services:
caddy:
ports: !reset [] # nothing on the host; Traefik comes in over the network (compose 2.24+)
networks: [default, traefik]
labels:
- traefik.enable=true
- traefik.docker.network=traefik
- traefik.http.routers.tubehaus.rule=Host(`tube.example.com`)
- traefik.http.routers.tubehaus.entrypoints=websecure
- traefik.http.routers.tubehaus.tls.certresolver=letsencrypt
- traefik.http.services.tubehaus.loadbalancer.server.port=80
- traefik.http.services.tubehaus.loadbalancer.passhostheader=true
networks:
traefik:
external: true
Keep the .env from step 1 (TUBEHAUS_SITE=:80 matters: Caddy then serves plain HTTP on port 80
inside its container). If your docker compose is older than 2.24 and doesn't know !reset, leave the
ports: line out; the host port then stays on 127.0.0.1:8080 and does no harm.
Traefik streams responses without buffering and has no response timeout by default, so video works as is. Two things to check in your Traefik's own configuration if you changed them:
buffering middleware to this router,entryPoints.websecure.transport.respondingTimeouts.writeTimeout must stay 0 (the default),
or long videos are cut off.Then docker compose up -d and open https://tube.example.com.
docker compose exec tubehaus python3 /app/server/tubehaus_server.py --doctor
Then open a video and seek around in it, and open a live stream if you use them. If video stops after a minute or so, the read timeout or buffering is the usual reason.
These examples are written from the settings above; if one of them doesn't work on your setup, or you run a different proxy, please open an issue or a pull request.
docker compose stays the main way to run TubeHaus (README, Quick start). If you already use
Flisk, the same three containers (Caddy, TubeHaus, bgutil) are also described as one small service.json each under services/tubehaus/.
They read the same .env. Contributed by @odykyi in #40.
Pick one of the two for a server, not both: they use the same ports and different volume names.
You need Docker and Flisk 1.4.26 or later (npm install -g @flisk-sh/flisk; flisk doctor checks the rest).
git clone https://github.com/biolend83/tubehaus && cd tubehaus
cp .env.example .env # set your domain, as for docker compose
flisk up
| docker compose | Flisk |
|---|---|
docker compose ps | flisk status |
docker compose logs tubehaus | flisk logs --service tubehaus |
docker compose restart tubehaus | flisk restart tubehaus |
docker compose exec tubehaus python3 /app/server/tubehaus_server.py --doctor | flisk run tubehaus -- python3 /app/server/tubehaus_server.py --doctor |
docker compose down | flisk down |
Everything Flisk generates (.tiltignore, a root package.json, shared-platform-engineering/, .autogenerated/) is git-ignored.
.env, the same as docker compose: TUBEHAUS_HTTP_BIND (default 80) and
TUBEHAUS_HTTPS_BIND (default 443), read in services/tubehaus/caddy/service.json. They hold a port or address:port.
TUBEHAUS_SITE=:80, TUBEHAUS_URL=http://192.168.1.10.TUBEHAUS_HTTP_BIND=127.0.0.1:8080 and TUBEHAUS_HTTPS_BIND=127.0.0.1:8443 in .env
before the first flisk up, or Caddy is reachable from the network and anyone could skip your proxy and its login.
flisk doctor warns about any published address that is not 127.x.flisk up: 8080/8443 with the default .env (Caddy holds 80 and 443), but 80/443 when Caddy
is moved off them, as in the proxy setup above. If your own proxy needs 80 and 443, pin the router elsewhere:
FLISK_HTTP_PORT=8180 FLISK_HTTPS_PORT=8543 flisk up (set them in the shell: Flisk does not read these two from .env).tubehaus-tubehaus-autogenerated_tubehaus-data and so on (docker volume ls).
A docker compose install's data isn't picked up by itself; see below."image": "ghcr.io/biolend83/tubehaus:latest" in
services/tubehaus/tubehaus/service.json with "buildContext": "../../.." and "dockerfile": "Dockerfile".deploy/docker-compose.public.yml (a public instance with log limits and the Anubis check) has no Flisk version.git pull
flisk down
for image in ghcr.io/biolend83/tubehaus:latest brainicism/bgutil-ytdlp-pot-provider caddy:2; do
docker pull "$image"
done
flisk up
Backups: the same volumes as in Updating and backups, with the prefix above, e.g.
docker cp tubehaus-tubehaus-autogenerated-tubehaus-1:/data/ytlib.json ./ytlib-backup.json.
Settings → Library → Export in the web page works the same either way.
cd tubehaus
docker compose down # never add -v: that deletes the volumes
If you ran behind your own proxy, change Caddy's ports first (above). Then copy each volume to its new name. The old names start
with your Compose project name (the folder name, tubehaus if you cloned it that way; docker volume ls shows them):
(
old_prefix=tubehaus_
new_prefix=tubehaus-tubehaus-autogenerated_
for v in tubehaus-data warp-data caddy-data; do
# a wrong prefix would make docker create an empty volume instead of failing, so check the source first
docker volume inspect "${old_prefix}${v}" > /dev/null || exit 1
docker volume create "${new_prefix}${v}" > /dev/null || exit 1
docker run --rm --mount "type=volume,src=${old_prefix}${v},dst=/from,readonly" --mount "type=volume,src=${new_prefix}${v},dst=/to" alpine cp -a /from/. /to/ || exit 1
done
) && flisk up
The old volumes stay as they are, so going back is flisk down then docker compose up -d.
Remove them with docker volume rm tubehaus_<name> once the Flisk setup works.
cd tubehaus
git pull
docker compose pull # newer TubeHaus and Caddy images
docker compose up -d --remove-orphans # add --build if you build the TubeHaus image yourself
Your library and the WARP registration live in Docker volumes, so they survive updates.
From 1.5 or older to 1.6: the server now asks YouTube itself, so Invidious, invidious-companion and
PostgreSQL are gone from docker-compose.yml. --remove-orphans above stops their old containers. Then, if you
like, delete what they left: docker volume rm tubehaus_postgres-data tubehaus_companion-cache (the names start
with your folder's name; docker volume ls shows them), and the COMPANION_KEY, INVIDIOUS_HMAC_KEY,
POSTGRES_PASSWORD, TUBEHAUS_DOMAIN, TUBEHAUS_HTTPS and TUBEHAUS_EXTERNAL_PORT lines in .env.
YouTube changes things often. If videos suddenly stop playing, docker compose pull && docker compose up -d
(after a git pull) is the first thing to try. Watch this repository's releases
(Watch → Custom → Releases) to hear about TubeHaus updates.
| Volume | Contents | Needed? |
|---|---|---|
tubehaus-data | your library: subscriptions, history, resume points, playlists (ytlib.json), subtitle cache | yes |
warp-data | the WARP registration; a new one is created if it's missing | no |
caddy-data | HTTPS certificates; Caddy gets new ones if it's missing | no |
The easiest backup is in the app: Settings → My data → Export → TubeHaus backup. It's one JSON file with everything (subscriptions, history, resume points, playlists, likes, Shorts preferences), and Import from file restores it on any TubeHaus.
From the command line instead:
docker compose cp tubehaus:/data/ytlib.json ./ytlib-backup.json
Restore it:
docker compose cp ./ytlib-backup.json tubehaus:/data/ytlib.json
docker compose restart tubehaus
ytlib.json as above.envytlib.json, then point your DNS at the new serverStart with the self-check. It tests every piece TubeHaus depends on and prints one line each:
docker compose exec tubehaus python3 /app/server/tubehaus_server.py --doctor
[ok ] WARP proxy 127.0.0.1:40000 -> warp=on ip=2a09:...
[ok ] YouTube reachable via WARP
[ok ] Search 20 results
[ok ] Video lookup 'Me at the zoo' -> 14 streams via VISIONOS
[ok ] Stream download 10000 of 10000 bytes
[ok ] yt-dlp (live streams) /opt/venv/bin/yt-dlp
[ok ] ffmpeg (HD downloads) /usr/bin/ffmpeg
[ok ] whisper (live captions) /opt/whisper/whisper-cli + ggml-base-q5_1.bin
[ok ] State directory /data
For a manual install, run python3 server/tubehaus_server.py --doctor with the same environment as the service.
When you open an issue, please paste this output together with docker compose logs tubehaus --tail 100.
docker compose logs tubehaus | grep -i warp. Restarting the container usually fixes a first-start race:
docker compose restart tubehaus.[warp] rotated in the logs.
If it keeps rotating without success, wait a while; the limit protects you from hammering YouTube.[engine] lines in docker compose logs tubehaus --tail 100, update to the latest release
(git pull && docker compose pull && docker compose up -d), and if that doesn't help, open an issue with
the doctor's output./companion/videoplayback or /api/p/dash/ requests./. The player loads
video through /companion/* on the same address and needs the same session.TUBEHAUS_URL in .env must be exactly the address you open in the browser, including https://.Live streams need yt-dlp and PO tokens from the bgutil container:
docker compose ps bgutil # must be running
docker compose logs tubehaus | grep live
A brand-new install can take a minute before the first PO token is ready.
The image was built without whisper.cpp (WITH_WHISPER=0), or the model download failed during the build.
Pull the prebuilt image (docker compose pull tubehaus && docker compose up -d), or rebuild with docker compose build --no-cache tubehaus.
Caddy gets a certificate automatically only if TUBEHAUS_SITE is a real hostname that points at your server and
ports 80 and 443 are reachable from the internet. On a LAN without a domain, or behind your own reverse proxy,
use TUBEHAUS_SITE=:80 with TUBEHAUS_HTTP_BIND for the host port: see "No domain, or your own reverse proxy?"
in the README.
docker compose ps shows whether each container is healthy. TubeHaus also answers GET /api/p/health with a
small JSON status (WARP proxy on/off, rotations in the last 30 minutes, live captions available).
There are three layers. A refused video moves on to the next way in (visionOS client → YouTube Kids → SABR → TV client), so one closed door doesn't stop playback. An address YouTube has flagged ("Sign in to confirm you're not a bot", Google's "sorry" page) is swapped for a new WARP address by the server itself, and the request is replayed. And every day a check runs each engine call against live YouTube and opens an issue the moment one breaks, so a fix usually ships before most people notice.
It's how youtube.com itself streams: one address, and the player tells YouTube where it is and what it wants in small requests (details). It's on by default as the fallback; nothing to set up. HT_SABR=only makes it the main way in on the server, at about 3 s per new video instead of under 1 s.
No, not since 1.6: the server asks YouTube itself. It answers in Invidious' API format, so apps that can use an Invidious instance's API (Yattee, FreeTube's API mode, ...) may work with it too; the parts that need an Invidious account (its own subscriptions and login) aren't there. A running Invidious instance doesn't get in the way; TubeHaus just no longer uses it.
Everything comes from YouTube. Nothing is stored except your library (subscriptions, history, playlists) and short-lived files for offline downloads.
For Shorts, yes, and it runs entirely on your server (see Shorts that learn above). For regular videos you get your subscriptions feed, trending and topic pages, and YouTube's related list for each video. Nothing is learned by Google, since no Google account is involved.
They usually don't play, since there's no signed-in account to pass the age check.
Yes. Under Settings → My data (or the subscriptions page), Import from file takes Google Takeout (the subscriptions CSV and watch-history.json), Invidious, NewPipe and FreeTube exports, OPML, and TubeHaus backups. Export gives you a full TubeHaus backup (subscriptions, history, resume points, playlists, likes), an Invidious-format file, a Takeout-style CSV, or OPML for any feed reader. Your data is never stuck here.
No. There is no telemetry. The only outside requests are YouTube (from the server, through WARP), DeArrow's thumbnail server (from the server, for the optional DeArrow thumbnails) and, from the browser, the optional SponsorBlock, DeArrow and Return YouTube Dislike lookups.
It's a web app: open your address in the browser, or use "Add to Home Screen" to install it like an app. TV browsers get a TV mode with remote-control navigation. Or use the TubeHaus apps, on their own or connected to your server.
It never transcodes. The server fetches the video from YouTube and passes it through, so even a small NAS or a Raspberry Pi barely notices. Decoding happens on the device you watch on, and the player picks a format that device decodes in hardware (AV1, VP9 or H.264, which YouTube all offers), so an older phone without AV1 simply gets VP9 or H.264. The one exception is a download in 1080p or 4K, where ffmpeg joins picture and sound without re-encoding.
The easy way is a private network: Tailscale or WireGuard, then the same address as at home, in the browser or the apps. To open it on the internet instead, give it a domain (Caddy gets the HTTPS certificate by itself) and add a login first.
Wait a few seconds first: when the usual way is refused, the next one is tried by itself (SABR takes 2-3 s). In the apps, the player's settings → Playback method pins one way; SABR or TV plays most videos the others can't, YouTube Kids most videos made for kids. On a server, --doctor (above) shows whether YouTube is answering at all. If it still won't play, open an issue with the video link.
Set TUBEHAUS_PUBLIC=1 in .env (or HT_PUBLIC_MODE=1 for a manual install). Then:
Handling a crowd. TubeHaus protects itself, and your YouTube access, when many people show up at once:
Setting (.env) | Default | What it does |
|---|---|---|
TUBEHAUS_MAX_VIEWERS | 0 (off) | people watching at once; newcomers beyond it get "busy, try again in a few minutes", people already watching are never cut off |
TUBEHAUS_MAX_HEIGHT | 0 (off) | highest quality offered, e.g. 1080, to keep bandwidth in check |
TUBEHAUS_RATE_PER_MIN | 120 on public instances | API requests per visitor per minute; more get "slow down" (429) |
HT_MAX_CONNECTIONS | 256 | requests handled at the same time; beyond it the server answers "busy" at once instead of falling over |
Always on: when many people open the same video (or the same channel feeds) at once, YouTube is asked once and the answer is shared; live streams are fetched once per stream however many people watch; idle connections are dropped after 30 seconds; and public instances don't pre-load recommended videos.
The ready-made public setup. deploy/docker-compose.public.yml puts all of this together:
HT_ACCOUNTS=1): a user name and a password, no e-mail or other personal details. Passwords are stored as PBKDF2 hashes (600,000 rounds); sessions are signed HttpOnly cookies; sign-ups and log-ins are rate-limited per networkdocker compose --env-file .env -f deploy/docker-compose.public.yml up -d
Also firewall the box so the containers can reach the internet only: no private networks, no cloud metadata service, none of your other servers. Before you open one:
TUBEHAUS_AUTH=none, and consider rate limiting in CaddyPublic instances
| Address | Region | Limits | Run by |
|---|---|---|---|
| none listed yet |
Running one? Add it here (or in the discussion) so others can find it.
| Variable | Default | |
|---|---|---|
HT_BIND, HT_PORT | 127.0.0.1, 3010 | where the API listens |
HT_STATE | ./state | library and subtitle cache |
HT_PUBLIC_URL | http://localhost:8080 | the address browsers use |
HT_YT_PROXY | 127.0.0.1:40000 | WARP proxy (empty = direct) |
HT_WARP_ROTATE | 1 | new WARP address when YouTube blocks (a reconnect, or a new registration when that keeps the address) |
HT_SABR | 1 | SABR (what YouTube's own web player gets) when no other way plays a video; first to use it before them, only for every video but live and age-restricted ones, 0 off. Needs deno. See How it keeps playing |
HT_SABR_LIVE | – | first: live streams over SABR before the usual HLS playlist (otherwise SABR only when that playlist can't be had) |
HT_REGION | US | default region of searches and trending |
HT_HL | (the viewer's language) | YouTube's language for its texts |
HT_YTDLP | yt-dlp | for live streams |
HT_WHISPER_BIN, HT_WHISPER_MODEL, HT_WHISPER_LANG | empty, empty, auto | live captions |
HT_SUB_LANG, HT_LIBRETRANSLATE | en, empty | default subtitle translation target (the app asks for its own language), optional fallback |
HT_DOWNLOAD_DIR | /var/tmp/tubehaus-dl | offline save workspace |
HT_PUBLIC_MODE | 0 | public instance: libraries stay in visitors' browsers (see above) |
HT_ACCOUNTS, HT_MAX_ACCOUNTS | 0, 1000 | require sign-up (user name + password) before anything else |
HT_MAX_VIEWERS, HT_MAX_HEIGHT, HT_RATE_PER_MIN, HT_MAX_CONNECTIONS | 0, 0, 120 public / 0, 256 | load limits (see Handling a crowd) |
HT_VID_PREFETCH (TUBEHAUS_PREFETCH) | 4 | videos you're likely to click next, looked up ahead so they start at once (0 = only what you ask for) |
TUBEHAUS_AUTH=accounts | Docker: a sign-in page and a library for each person (HT_ACCOUNTS=1 in a manual setup); TUBEHAUS_MAX_ACCOUNTS closes sign-ups | |
HT_OIDC_ISSUER, HT_OIDC_CLIENT_ID, HT_OIDC_CLIENT_SECRET (TUBEHAUS_OIDC_*) | empty | with accounts: sign in through your OpenID Connect provider; redirect URI <HT_PUBLIC_URL>/api/p/auth/oidc/callback. A first sign-in makes the account, named after the preferred_username claim (HT_OIDC_USER_CLAIM) |
HT_OIDC_NAME, HT_OIDC_ONLY, HT_OIDC_SCOPES | SSO, 0, openid profile email | the button's name ("Continue with …"), 1 = no passwords at all, the scopes asked for |
HT_PUBLIC_PROXIES | 0 | proxies with public addresses in front of your own (they can't be told from visitors); see Security |
HT_MAX_BODY_MB | 64 | largest request body (YouTube history imports) |
HT_NAME, HT_LINKS (TUBEHAUS_NAME, TUBEHAUS_LINKS) | empty | your instance's own name, and extra side-menu links as JSON [{"name": "…", "url": "https://…"}] (or /path; a .apk link downloads). Any name can be one per language, {"ko": "홈튜브", "en": "HomeTube"}: visitors see theirs, else English |
A map for finding your way around the code. TubeHaus is two small pieces with no build step and no dependencies of their own: a web app (plain ES modules) and a server (Python standard library only).
browser ──► Caddy ─┬─ /y/*, page navigations ──► web/ (the app, static files)
└─ everything else ─────────► TubeHaus server (server/tubehaus_server.py)
│
Cloudflare WARP (proxy mode) ──► YouTube
tubehaus_server.py) and answers YouTube data in Invidious' API shapes: /api/v1/videos, search,
channels, playlists, comments, ... It also passes the video streams (/companion/videoplayback,
the path Invidious' companion used, so older apps find it), captions and pictures (/vi/, /ggpht/,
/sb/), and adds the rest: live streams, captions, the shared library, ...
STATE/visitor.json). When every client is
walled ("Sign in to confirm you're not a bot") it gets a new identity once, then a new WARP address.common/src/app/tubehaus/engine on the android-app branch);
when YouTube changes a client, the versions in ENG_PLAYERS are the first thing to update./api/v1/... for YouTube data and the TubeHaus API (/api/p/...) for everything else.web/web/index.html loads y/main.js. Every file starts with a comment saying what it is for.
| File | What lives there |
|---|
With installers for Android, Windows, macOS, Linux and a sideload iOS beta, plus a self-hosted web app. The GitHub repo is still very new (created 2026-10-18).
Última actualización desde GitHub: hace 4 horas
Las cifras de GitHub se actualizan varias veces al día.
Todas las alternativas de código abierto a YouTube que aparecen aquí, lado a lado. Haz clic en una columna para ordenar.
Inicia sesión o crea una cuenta para comentar.
Aún no hay comentarios. Escribe el primero.
Luce tu proyecto: una tarjeta en vivo con tu posición y tu valoración, que se actualiza sola.
¿Prefieres la pequeña? Añade ?style=flat