Self-hosted media download manager with a web interface.
Snare wraps yt-dlp and gallery-dl with a clean dashboard UI. Submit URLs from your browser, track download progress in real-time, manage cookie profiles for authenticated downloads, and browse/stream/download your archived files — all without touching the command line.
- Download queue — Submit any URL and track progress live with real-time log streaming
- Auto tool detection — Automatically picks yt-dlp or gallery-dl based on the URL domain
- Cookie authentication — Import browser cookies to download from authenticated sites (Patreon, YouTube memberships, Instagram, etc.)
- File browser — Browse downloaded files by folder directly in the UI
- Media preview — Stream video, audio, and images right in the browser
- Direct download — Pull any archived file to your local machine with one click
- Disk monitoring — Live disk usage in the sidebar
- Settings panel — Configure download directory, concurrency, and request delays
| Dashboard | Queue |
|---|---|
| Dashboard | Queue |
| Archive Browser | Media Preview |
|---|---|
| Archive | Preview |
| Cookie Profiles | Settings |
|---|---|
| Cookies | Settings |
Snare inherits full site support from its underlying tools:
| Tool | Examples |
|---|---|
| yt-dlp | YouTube, Twitter/X, TikTok, Vimeo, Twitch, Reddit, Instagram, Facebook, SoundCloud, Bandcamp, Bilibili, and 1000+ more |
| gallery-dl | DeviantArt, Flickr, Pixiv, ArtStation, Danbooru, Imgur, Tumblr, Patreon, and 300+ more |
- Ubuntu 20.04, 22.04, or 24.04
- 512 MB RAM minimum
sudo/ root access- Internet access to reach package mirrors and GitHub
Either clone from GitHub:
git clone https://github.com/yourusername/snare.git
cd snareOr download and extract the zip:
unzip snare.zip
cd snaresudo bash installer/install.sh
The installer will:
- Install system dependencies (
ffmpeg,python3,curl,p7zip, etc.) - Download and install
yt-dlpto/usr/local/bin - Install
gallery-dlvia pip - Create a dedicated
snaresystem user - Set up a Python virtual environment at
/opt/snare/venv - Copy all application files to
/opt/snare - Write a config file at
/opt/snare/.env - Install and start a
systemdservice
When the installer completes, it will print your URL:
Web Interface: http://YOUR-SERVER-IP:8080
Open that in your browser — Snare is ready to use.
SNARE_PORT=9090 sudo bash installer/install.sh
Or edit /opt/snare/.env manually and restart:
sudo nano /opt/snare/.env sudo systemctl restart snare
Edit /opt/snare/.env:
SNARE_DOWNLOAD_DIR=/your/custom/path
Or use the Settings page in the web UI. Make sure the snare system user has write access to the directory:
sudo mkdir -p /your/custom/path sudo chown snare:snare /your/custom/path
Then restart the service:
sudo systemctl restart snare
In the web UI go to Settings and adjust:
- Max Concurrent Downloads — how many jobs run in parallel (default: 3)
- Sleep Between Requests — polite delay passed to yt-dlp/gallery-dl (default: 1s)
# Check status sudo systemctl status snare # View live logs sudo journalctl -u snare -f # Restart sudo systemctl restart snare # Stop sudo systemctl stop snare # Start sudo systemctl start snare # Disable autostart sudo systemctl disable snare
Some sites require you to be logged in to download content (Patreon posts, YouTube memberships, Instagram private accounts, etc.). Snare handles this via cookie profiles.
- Install the Cookie-Editor extension in Chrome or Firefox
- Log into the target website in your browser
- Click the Cookie-Editor icon → click Export → Export as JSON → copy to clipboard
- In Snare, go to Cookie Profiles → New Profile
- Enter a name (e.g.
My YouTube) and the domain (e.g.youtube.com) - Click Import Cookies on your new profile and paste the JSON
- When submitting a download job, select your cookie profile from the dropdown
Snare accepts the standard JSON format exported by Cookie-Editor, which is compatible with both yt-dlp and gallery-dl.
⚠️ Security warning: Cookie files grant full access to your accounts. Only run Snare on a trusted private network. Never expose it to the public internet without a reverse proxy and authentication layer in front of it.
For access outside your local network, put Snare behind Nginx with HTTPS.
server { listen 80; server_name snare.yourdomain.com; return 301 https://$host$request_uri; } server { listen 443 ssl; server_name snare.yourdomain.com; ssl_certificate /etc/letsencrypt/live/snare.yourdomain.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/snare.yourdomain.com/privkey.pem; # Optional: basic auth to restrict access auth_basic "Snare"; auth_basic_user_file /etc/nginx/.htpasswd; location / { proxy_pass http://127.0.0.1:8080; 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_buffering off; proxy_read_timeout 300s; } }
sudo apt install certbot python3-certbot-nginx sudo certbot --nginx -d snare.yourdomain.com
sudo apt install apache2-utils sudo htpasswd -c /etc/nginx/.htpasswd yourusername sudo systemctl reload nginx
cd snare
git pull
sudo bash installer/install.shThe installer is fully idempotent — safe to re-run. It will update all files and restart the service.
snare/
├── backend/
│ ├── main.py # FastAPI app entry point + lifespan
│ ├── core/
│ │ ├── database.py # SQLite schema & init
│ │ ├── downloader.py # yt-dlp / gallery-dl subprocess wrapper
│ │ └── queue_manager.py # Async job queue with semaphore concurrency
│ └── api/routes/
│ ├── jobs.py # Job CRUD, cancel, log streaming
│ ├── cookies.py # Cookie profile management
│ ├── archive.py # File browser, streaming, download
│ └── system.py # System info & settings
├── frontend/
│ ├── templates/index.html # Single-page app shell
│ └── static/
│ ├── css/app.css # Full UI stylesheet (IBM Plex, dark theme)
│ └── js/app.js # SPA router, all page renderers, API client
├── installer/
│ └── install.sh # Ubuntu installer script
├── docker/
│ ├── Dockerfile
│ └── docker-compose.yml
├── docs/
│ └── screenshots/ # UI screenshots (add your own here)
└── requirements.txt
sudo journalctl -u snare -n 50 --no-pager
sudo chown -R snare:snare /opt/snare/downloads
sudo yt-dlp -U
sudo pip3 install -U gallery-dl --break-system-packages
Edit /opt/snare/.env, change SNARE_PORT, then:
sudo systemctl restart snare
sudo systemctl stop snare
sudo rm -rf /opt/snare
sudo userdel snare
sudo rm /etc/systemd/system/snare.service
sudo systemctl daemon-reload
# Then re-run the installer
sudo bash installer/install.shMIT — do whatever you want with it.
Snare is a frontend and orchestration layer built on top of:
- yt-dlp — the best media downloader
- gallery-dl — image gallery downloader
- FFmpeg — media processing
- FastAPI — Python web framework
Upgrading preserves your existing downloads, settings, database, and config file. Only application code and dependencies are updated.
cd snare
git pull
sudo bash installer/install.sh --upgradeunzip snare.zip
cd snare
sudo bash installer/install.sh --upgradeThe upgrade process:
- Updates system packages
- Updates yt-dlp to the latest release
- Updates gallery-dl to the latest release
- Updates Python packages in the venv
- Stops the running service
- Replaces application files
- Preserves your
.envconfig - Preserves all downloaded files
- Preserves your database (jobs, cookie profiles, settings)
- Restarts the service
See CHANGELOG.md for full release notes.