3.4 KiB
3.4 KiB
Quick Setup - Make Your Worker Live
Your worker is deployed but needs configuration to enable admin features.
Current Status
✅ Worker deployed
✅ R2 bucket obs-videos exists
❌ KV namespace missing (needed for admin)
❌ Admin password not set
❌ Custom domain not configured
3-Minute Setup
1. Create KV Namespace (30 seconds)
cd /home/jeffe/Github/obs-r2-uploader/worker
wrangler kv namespace create VIDEO_METADATA
Example output:
⛅️ wrangler 4.50.0
🌀 Creating namespace with title "obs-video-server-VIDEO_METADATA"
✨ Success!
Add the following to your configuration file in your kv_namespaces array:
{ binding = "VIDEO_METADATA", id = "abc123def456..." }
COPY THE ID (the abc123def456... part)
2. Update Configuration (1 minute)
# Copy enhanced config
cp wrangler-enhanced.toml wrangler.toml
# Edit the file
nano wrangler.toml
Find this line:
id = "placeholder_id"
Replace with YOUR ID:
id = "abc123def456..." # Use your actual ID from step 1
Save and exit (Ctrl+X, then Y, then Enter)
3. Set Admin Password (30 seconds)
wrangler secret put ADMIN_PASSWORD
Type your password when prompted, then press Enter.
4. Deploy (30 seconds)
wrangler deploy
5. Add Custom Domain (1 minute)
Option A: Via Dashboard (Recommended)
- Go to: https://dash.cloudflare.com/
- Click Workers & Pages
- Click obs-video-server
- Click Settings → Domains & Routes
- Click Add Custom Domain
- Enter:
videos.jeffemmett.com - Click Add Domain
Option B: Via Command Line
# Edit wrangler.toml and uncomment these lines:
[env.production]
routes = [
{ pattern = "videos.jeffemmett.com/*", custom_domain = true }
]
# Then deploy again
wrangler deploy
Done! 🎉
Now test:
- Visit:
https://videos.jeffemmett.com/admin - Login with your password
- See the beautiful empty state
- Upload a test video
What Gets Enabled
Without KV namespace:
- ❌ Admin login
- ❌ Video upload via browser
- ❌ Visibility controls
- ❌ Video metadata
- ❌ Delete videos
With KV namespace:
- ✅ Admin login
- ✅ Video upload via browser
- ✅ Visibility controls (Private/Shareable/Clip)
- ✅ Video metadata
- ✅ Delete videos
- ✅ Beautiful empty states
- ✅ Statistics dashboard
Troubleshooting
"Namespace already exists"
# List existing namespaces
wrangler kv namespace list
# Use the ID from an existing VIDEO_METADATA namespace
"Secret not found"
# Set it again
wrangler secret put ADMIN_PASSWORD
"Worker not found"
# Make sure you're in the worker directory
cd /home/jeffe/Github/obs-r2-uploader/worker
wrangler deploy
Can't access admin panel
- Check worker is deployed:
wrangler deployments list - Check password is set:
wrangler secret list - Check KV is bound:
cat wrangler.toml | grep VIDEO_METADATA - Try the worker URL first before custom domain
Quick Copy-Paste Commands
All in one:
cd /home/jeffe/Github/obs-r2-uploader/worker
wrangler kv namespace create VIDEO_METADATA
# Copy the ID shown
cp wrangler-enhanced.toml wrangler.toml
nano wrangler.toml
# Replace placeholder_id with your ID, save and exit
wrangler secret put ADMIN_PASSWORD
# Enter your password
wrangler deploy
Then add custom domain via dashboard.
Need help? Check logs:
wrangler tail