selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

cobalt logo

Self-host cobalt

11.7.1

Ad-free media downloader for social video and audio

ReleaseOpen SourceAGPL-3.0
Docker ComposeCompose file & guide
docker compose up -d
Updated7 months ago
LanguageSvelte
Setup difficultyEasy
ThemeDark mode
Stars
46 237
Port
9000 (cobalt API instance (API_PORT), mapped as 9000:9000/tcp in the compose example)
Docker
ghcr.io/imputnet/cobalt

What is cobalt?

cobalt is a media downloader for public content from over twenty social and video sites: you paste a link and get the file, without ads, trackers or a paywall. The repo is a monorepo holding a static SvelteKit frontend and an Express-based processing API, and the docs walk you through hosting your own instance with Docker Compose or running the API directly with node.js. Downloads can be video+audio, audio only or muted, with control over quality, codec, container, audio bitrate and format (mp3, ogg, wav, opus), plus subtitle selection, metadata embedding and choice of filename style. Remuxing and transcoding happen either on the visitor's device or on the instance, where media is streamed through short-lived tunnels and never written to disk; the project states it keeps no download logs. Instance operators can require Cloudflare Turnstile challenges or API keys, tune rate limits and duration limits, disable individual services, and scale several sub-instances behind Redis. The API code is AGPL-3.0, while the frontend code is under the non-commercial CC-BY-NC-SA-4.0 licence and the branding is copyrighted.

cobalt alternatives

Should you self-host cobalt?

cobalt scores 83/100 on selfhost.directory (how scoring works) and ranks #1 of 46 in Download Management. It has 46 237 GitHub stars, +1 366 in the last 30 days.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in Svelte.

Its closest alternative on selfhost.directory is Gopeed (80/100, 27 703 stars). cobalt scores higher overall. See cobalt vs Gopeed side by side.

Features

  • API Key Authentication
  • Audio format conversion
  • Audio-only download
  • Community instance support
  • Metadata Embedding
  • Multi-item picker
  • Multi-language interface
  • Multiple worker instancesrequires API_INSTANCE_COUNT and API_REDIS_URL
  • On-device processing
  • Per-service disabling
  • Rate Limiting
  • REST API
  • Subtitle download
  • Tunnel streaming without disk writes
  • Video quality selection

cobalt README

How to install cobalt

Install cobalt with Docker Compose

docker and docker-compose installed and configured
Environment variables
API_URL
  1. create a folder for cobalt config file, something like this:

    mkdir cobalt
    
  2. go to cobalt folder, and create a docker compose config file:

    cd cobalt && nano docker-compose.yml
    
  3. copy and paste the sample config from here and edit it to your needs. make sure to replace default URLs with your own or cobalt won't work correctly.

  4. finally, start the cobalt container (from cobalt directory):

    docker compose up -d
    

Recommended way; the sample compose file also runs watchtower to update the cobalt image automatically, and a reverse proxy such as nginx is advised for public instances.

How to configure cobalt

  • API_URLURL your instance is reachable at; the only required variable, tunnels break if it isn't valid.

    values: a URL

  • API_PORT9000Port the API server listens on.

    values: number 1024-65535

  • COOKIE_PATHPath to the cookies.json file, relative to the instance's working directory.
  • PROCESSING_PRIORITYnice value for ffmpeg subprocesses, unix only; higher means lower priority.

    values: number

  • API_INSTANCE_COUNTSpawns several sub-instances that requests are balanced across; linux with node.js >=23.1.0, needs API_REDIS_URL.

    values: number

More in Download Management

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…