Video coming soon…

▶️ Setup TubeArchivist — Self-Hosted YouTube Archive

Archive and browse your favorite YouTube channels offline with TubeArchivist — a self-hosted YouTube media server powered by yt-dlp and Elasticsearch.

⚠️ This script is provided for demo and testing purposes only. Not intended for production use.
⚠️ RAM: TubeArchivist requires Elasticsearch which adds 1+ GB RAM on top of the app itself. Minimum recommended: 2 GB RAM total.

📦 Resources & Setup Scripts

Grab the automated bash script from GitHub to follow along with the video.

Automated install script — one command sets everything up.
View on GitHub

Quick Install:

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/media/tubearchivist/tubearchivist-ubuntu.sh
chmod +x tubearchivist-ubuntu.sh
sudo bash tubearchivist-ubuntu.sh

Tutorial Steps

1 Download the Script

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/media/tubearchivist/tubearchivist-ubuntu.sh

2 Make it Executable

chmod +x tubearchivist-ubuntu.sh

3 Run the Installer

The script installs Docker, then deploys TubeArchivist with Elasticsearch and Redis.

sudo bash tubearchivist-ubuntu.sh

4 Access the Web UI

Open your browser and navigate to the UI. Default login is admin/admin — change immediately after first login.

http://<your-server-ip>:8000

5 Subscribe to Channels

Go to Channels → Add and enter a YouTube channel URL or ID. TubeArchivist will begin downloading the channel archive using yt-dlp.

Ports Used

PortPurpose
8000TubeArchivist Web UI
9200Elasticsearch — internal only

Overview

TubeArchivist is a self-hosted YouTube media server that archives channels and playlists using yt-dlp. Videos are indexed in Elasticsearch for fast full-text search across titles, descriptions, and transcripts. The clean web UI lets you browse by channel, manage download queues, and watch videos directly in the browser — all without ads or tracking.

Why Use It

YouTube removes videos, terminates channels, and restricts content based on geography, age verification, and monetisation decisions beyond your control. A channel you rely on for learning can disappear overnight. TubeArchivist lets you subscribe to channels and archive their entire video library locally — including metadata, thumbnails, and subtitles. Once downloaded, your archive is permanent, searchable by transcript content, and watchable without buffering, ads, or algorithm distractions.

When You Need It

    Who Should Use It

      Real Use Cases

        Main Features

          How to Use After Installation

            Security Best Practices

              Ports and Firewall Notes

              TubeArchivist serves its web UI on port 8000. Elasticsearch runs on port 9200 (internal Docker network only — never expose to the internet). Redis runs internally. Open only port 8000 on your firewall for local network access, or proxy through Nginx Proxy Manager with HTTPS for remote access. Elasticsearch must never be exposed publicly — it has no authentication by default.

              Backup and Maintenance

                Common Mistakes

                  Troubleshooting

                    Alternatives

                    Jellyfin (plays existing video files but does not download from YouTube), PodGrab (podcast-focused, not YouTube), yt-dlp CLI (no web UI, single-user, no scheduling), Pinchflat (macOS-native, simpler), Invidious (YouTube frontend without downloading). TubeArchivist is the only full-featured self-hosted solution combining channel subscriptions, bulk downloading, full-text search, and a web player.

                    When Not to Use It

                    Skip TubeArchivist if you only want to download individual videos occasionally — the yt-dlp CLI is simpler. Also avoid it with less than 2 GB RAM (Elasticsearch alone needs 1 GB) or limited storage (video archives grow to hundreds of gigabytes quickly). For legal or compliance reasons, archiving copyrighted commercial content may not be appropriate — TubeArchivist is best suited for archiving educational or openly licensed content.

                    PrismaTechWork Professional Help

                    PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.

                      Contact Us

                      Frequently Asked Questions

                      How does TubeArchivist download videos?

                      TubeArchivist uses yt-dlp, the most actively maintained YouTube downloader, to fetch video files, thumbnails, subtitles, and metadata. When you subscribe to a channel and trigger a download, TubeArchivist adds each video to a Redis-backed queue and processes them one at a time (or in parallel if configured). Downloads respect the format preferences you set — 1080p, 720p, or best available — and store everything in the mounted media directory.

                      How do I keep yt-dlp up to date?

                      Update yt-dlp inside the container: docker exec tubearchivist pip install -U yt-dlp. YouTube changes its internal API frequently, and an outdated yt-dlp causes silent download failures. TubeArchivist's Docker image updates include yt-dlp version bumps, so keeping the image current (docker compose pull && docker compose up -d) is the easiest approach. Check the TubeArchivist GitHub releases for notes on when yt-dlp updates are critical.

                      Can TubeArchivist auto-download new videos from subscribed channels?

                      Yes. In Settings → Scheduler, configure the channel scanner interval (e.g. every 6 hours). TubeArchivist checks all subscribed channels for new uploads and automatically adds them to the download queue. You can also set a 'download after' threshold — only download videos published after a certain date — useful for not re-archiving entire old backlogs when adding a new subscription.

                      How do I search video transcripts?

                      TubeArchivist downloads subtitles (both auto-generated and manually uploaded) alongside each video. These are indexed in Elasticsearch, enabling full-text search across transcript content. In the search bar, type any term and TubeArchivist returns videos where the word appears in the title, description, tags, or transcript — with a snippet showing the timestamp where the term appears. This makes it ideal for finding exactly where a topic is discussed across a large channel.

                      How much storage does a typical YouTube archive require?

                      A 10-minute 1080p video is roughly 300–500 MB. A channel with 200 videos averages 60–100 GB depending on length and resolution. A large educational channel with 500+ long-form videos can exceed 500 GB. Plan your storage accordingly — TubeArchivist will tell you the total archive size in the dashboard. Use 720p format for a reasonable quality/storage trade-off. External drives or NAS mounts work well as the media volume destination.

                      Can I integrate TubeArchivist with Jellyfin?

                      Yes. TubeArchivist stores videos in a structured folder format that Jellyfin can read as a library. Mount the TubeArchivist media directory as a Jellyfin library source. TubeArchivist also has a native Jellyfin integration in Settings that syncs watched status bidirectionally — mark a video watched in Jellyfin and it appears watched in TubeArchivist too. This gives you the polished Jellyfin media player with full TubeArchivist archiving in the background.

                      Why does Elasticsearch need so much RAM?

                      Elasticsearch is a JVM-based search engine that requires significant memory for its Java heap. By default it allocates 512 MB heap, but real usage is higher. For smooth operation with a large archive (10,000+ videos), allocate 1–2 GB RAM to Elasticsearch via the ES_JAVA_OPTS environment variable. On low-memory servers (2 GB total), reduce the heap to 256 MB and expect slower search performance. TubeArchivist requires Elasticsearch — there is no way to replace it with a lighter alternative.

                      Is it legal to archive YouTube videos?

                      The legality depends on the content and your jurisdiction. For personal use, archiving freely available videos for offline personal viewing is generally considered fair use in many jurisdictions. Redistributing archived content, archiving DRM-protected content, or using archives commercially is typically prohibited. Creative Commons licensed content and content creators who explicitly permit downloading have the clearest legal standing. Always respect the content creator's terms and your local copyright law. TubeArchivist is designed for personal archiving, not redistribution.