# Cobalt — Open-Source Media Downloader for Any Platform > Save videos and audio from social platforms without ads, trackers, or rate limits using a privacy-first self-hosted API. ## Install Save as a script file and run: # Cobalt — Open-Source Media Downloader for Any Platform ## Quick Use ```bash docker run -d -p 9000:9000 ghcr.io/imputnet/cobalt:latest # Then open http://localhost:9000 in your browser # Or use the API directly: curl -X POST http://localhost:9000/api/json -H "Content-Type: application/json" -d '{"url": "https://youtube.com/watch?v=example"}' ``` ## Introduction Cobalt is a media downloader that extracts video and audio from popular social platforms. It runs entirely without ads, tracking, or paywalls, and can be self-hosted as a private API instance for personal or team use. ## What Cobalt Does - Downloads video and audio from YouTube, Twitter/X, TikTok, Reddit, Instagram, and more - Supports multiple quality options including highest available resolution - Provides both a clean web UI and a REST API for programmatic access - Strips tracking parameters and does not log user activity - Converts and remuxes media into common formats like MP4 and MP3 ## Architecture Overview Cobalt is a Node.js application that acts as a proxy between the user and upstream media platforms. When given a URL, it resolves the media source, fetches stream metadata, and either redirects to the direct download link or tunnels the content through the server. The frontend is a lightweight single-page app that communicates with the backend API. ## Self-Hosting & Configuration - Deploy with Docker using the official `ghcr.io/imputnet/cobalt` image - Configure via environment variables for port, rate limiting, and CORS - Supports reverse proxy setups with Nginx or Caddy for HTTPS - No database required; the service is stateless - Resource usage is low; a 1-core VPS with 512 MB RAM is sufficient ## Key Features - Completely ad-free and tracker-free by design - No account registration or API key required for self-hosted instances - Supports downloading with or without audio, and audio-only extraction - Clean API that integrates easily with scripts, bots, and automation tools - Active development with frequent updates for platform compatibility ## Comparison with Similar Tools - **yt-dlp** — CLI-focused with broader site support; Cobalt adds a web UI and API layer - **Invidious** — Focuses on YouTube playback, not downloading; Cobalt handles multiple platforms - **MeTube** — Self-hosted YouTube downloader wrapping yt-dlp; Cobalt has its own extraction engine - **Stacher** — Desktop GUI for yt-dlp; Cobalt is web-based and self-hostable ## FAQ **Q: Which platforms does Cobalt support?** A: YouTube, Twitter/X, TikTok, Reddit, Instagram, Tumblr, SoundCloud, Twitch clips, and several others. The list is updated as new extractors are added. **Q: Is Cobalt legal to self-host?** A: Cobalt is open-source software. Legality of downloading specific content depends on your jurisdiction and the terms of service of each platform. **Q: Does Cobalt store downloaded files on the server?** A: No. Cobalt streams or redirects content directly to the client without caching files on disk. **Q: Can I use the Cobalt API in my own applications?** A: Yes. The JSON API accepts a URL and returns download links. It is straightforward to integrate into bots or automation scripts. ## Sources - https://github.com/imputnet/cobalt - https://cobalt.tools --- Source: https://tokrepo.com/en/workflows/cobalt-open-source-media-downloader-any-platform-f875af5a Author: Script Depot