5.5 KiB
Configuration Setup Guide
Important: Protecting Your Personal Information
This repository includes template configuration files (.example files) that you should copy and customize with your own credentials. Your personal config files are automatically excluded from Git to keep your credentials safe.
Quick Setup
Step 1: Copy Template Files
Copy the .example files and remove the .example extension:
# In the configs/ directory
cd configs
# Copy gallery-dl config template
Copy-Item gallery-dl.conf.example -Destination gallery-dl.conf
# Copy Instagram cookies template (if needed)
Copy-Item instagram_cookies.json.example -Destination instagram_cookies.json
# Copy auth config template (if needed)
Copy-Item auth_config.json.example -Destination auth_config.json
Step 2: Add Your Credentials
Edit the copied files (without .example) and replace placeholder values with your actual credentials:
For gallery-dl.conf:
{
"extractor": {
"reddit": {
"client-id": "YOUR_REDDIT_CLIENT_ID", // ← Replace with real values
"client-secret": "YOUR_REDDIT_CLIENT_SECRET",
"username": "YOUR_REDDIT_USERNAME",
"password": "YOUR_REDDIT_PASSWORD"
}
}
}
For instagram_cookies.json:
Export cookies from your browser using a browser extension or developer tools.
Step 3: Verify Protection
Your personal configs are safe because:
- They're in
.gitignore- Won't be committed to Git - Template files are committed - Users get examples without your data
- Clear documentation - Users know how to set up their own
What's Protected
These files will NEVER be committed to GitHub:
configs/gallery-dl.conf(your personal file)configs/gallery-dl-*.conf(any variations)configs/instagram_cookies.jsonconfigs/reddit_cookies.jsonconfigs/twitter_cookies.jsonconfigs/auth_config.json- Any
*.secretor*.keyfiles
What's Committed to GitHub
These template files WILL be committed (they're safe):
configs/gallery-dl.conf.example(template only)configs/instagram_cookies.json.example(template only)configs/auth_config.json.example(template only)configs/yt-dlp.conf(no credentials in yt-dlp configs)configs/yt-dlp-*.conf(safe config files)
For New Users
When you clone this repository:
- Look for
.examplefiles in theconfigs/directory - Copy them and remove
.examplefrom the filename - Edit them with your own credentials
- Never commit the non-example versions
Configuration Options
Gallery-dl Authentication
For detailed authentication setup, see:
Docs/gallery_dl_authentication_guide.mdDocs/gallery_dl_advanced_options_guide.md
Supported methods:
- Browser cookies (automatic extraction)
- Username/password (direct credentials)
- OAuth tokens (for certain sites)
- API keys (for API-based access)
yt-dlp Configuration
yt-dlp configs typically don't contain sensitive info, but can include:
- Cookie extraction settings (browser choice)
- Output templates (file naming)
- Quality preferences
- Post-processing options
See Docs/yt_dlp_node_complete_guide.md for details.
Troubleshooting
"Config file not found" error
Make sure you've copied the .example file:
Copy-Item configs\gallery-dl.conf.example -Destination configs\gallery-dl.conf
"Authentication failed" error
- Check your credentials in the config file
- Try browser cookie extraction instead:
"cookies-from-browser": "firefox" - See authentication guide:
Docs/gallery_dl_authentication_guide.md
"Git wants to commit my credentials!"
This shouldn't happen if .gitignore is working. Check:
# Test if file is ignored
git check-ignore configs/gallery-dl.conf
# Should output: configs/gallery-dl.conf
# If nothing appears, the file is NOT ignored (check .gitignore)
Best Practices
- Never edit
.examplefiles directly - They're templates for other users - Keep credentials out of code - Always use config files
- Use browser cookies when possible - Easier and more secure than passwords
- Rotate credentials regularly - Especially if shared on multiple machines
- Don't share screenshots - They might show sensitive config data
Getting Credentials
Reddit API
- Go to https://www.reddit.com/prefs/apps
- Click "create another app"
- Choose "script" type
- Copy client ID and secret
- Use browser cookie extraction (easiest method)
- Or use extension like "EditThisCookie" or "Cookie-Editor"
- Export cookies to JSON format
- See
Docs/gallery_dl_authentication_guide.md
Other Sites
See gallery-dl documentation: https://github.com/mikf/gallery-dl#authentication
Security Notes
⚠️ Important Security Warnings:
- Don't commit credentials - Even to private repos (they can leak)
- Use browser cookies - They expire naturally, passwords don't
- Check .gitignore - Before making your first commit
- Review Git history - If you accidentally committed secrets, they stay in history
- Rotate compromised credentials - If you accidentally shared them
Need Help?
- Authentication issues: See
Docs/gallery_dl_authentication_guide.md - Configuration options: See
Docs/gallery_dl_advanced_options_guide.md - yt-dlp setup: See
Docs/yt_dlp_node_complete_guide.md - General questions: Open an issue on GitHub or contact eric@rollei.us
Remember: Template files (.example) are for sharing. Real config files are for you alone! 🔒