StreamVault uses a backend server for OAuth authentication and API proxying. While the official backend is hosted atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/SlasshyOverhere/StreamVault/llms.txt
Use this file to discover all available pages before exploring further.
streamvault-backend-server.onrender.com, you can fork and deploy your own instance.
Backend Repository
Official backend repository: StreamVault-BackendWhy Self-Host?
- Privacy: Keep your OAuth credentials and API keys on your own server
- Control: Customize authentication flows and API proxy behavior
- Reliability: Avoid dependency on third-party hosting
- Development: Test backend changes alongside frontend development
Prerequisites
- Node.js v18 or higher
- A hosting platform (Render, Vercel, Railway, etc.)
- Google OAuth credentials (for Drive integration)
- TMDB API access token (for metadata)
Setup Instructions
1. Fork the Backend Repository
- Navigate to StreamVault-Backend
- Click Fork to create your own copy
- Clone your fork locally:
2. Configure Environment Variables
Create a.env file in the backend repository with your credentials:
3. Deploy the Backend
Deploy your backend to a hosting platform. Here’s an example using Render:- Create a new Web Service on render.com
- Connect your forked GitHub repository
- Configure the service:
- Build Command:
npm install - Start Command:
npm start - Environment: Node
- Build Command:
- Add environment variables from your
.envfile - Deploy and note your backend URL (e.g.,
https://your-backend.onrender.com)
Other platforms like Vercel, Railway, or Heroku work similarly. Ensure WebSocket support is enabled for Watch Together features.
4. Configure the Frontend
Update your StreamVault desktop app to use your custom backend.Environment Variables
Create or update.env in the frontend repository:
Build-Time Backend Configuration
For Tauri builds, set environment variables before building:5. Update AUTH_SERVER_URL in Rust Code
Editsrc-tauri/src/gdrive.rs and update line 17:
/auth/google- OAuth authorization flow/auth/refresh- Token refresh requests
6. Build the Desktop App
With all configuration in place, build the app:src-tauri/target/release/bundle/.
Verification
Test OAuth Flow
- Launch your built app
- Go to Settings → Cloud Storage
- Click Connect Google Drive
- Verify the OAuth flow completes successfully
- Check that your backend logs show the authentication request
Test TMDB Proxy
- Click Update Library to index media
- Verify posters and metadata are fetched correctly
- Check backend logs for TMDB proxy requests
Test Watch Together (Optional)
If using the Watch Together feature:- Start a Watch Together session
- Verify WebSocket connection to
wss://your-backend.onrender.com/ws/watchtogether - Test real-time playback synchronization
Environment Variables Reference
Frontend (.env)
| Variable | Description | Default |
|---|---|---|
VITE_AUTH_SERVER_URL | Backend server URL | https://streamvault-backend-server.onrender.com |
VITE_AI_SIGNATURE_SECRET | Shared secret for AI chat | (required) |
VITE_AI_MODEL | Default AI model | llama-3.1-8b-instant |
Build-Time Variables
| Variable | Description | Default |
|---|---|---|
STREAMVAULT_AUTH_SERVER_URL | Backend URL embedded in build | (required) |
STREAMVAULT_TMDB_PROXY_URL | TMDB proxy endpoint | {AUTH_SERVER_URL}/api/tmdb |
STREAMVAULT_WS_URL | WebSocket endpoint | wss://{AUTH_SERVER_URL}/ws/watchtogether |
Backend (.env)
| Variable | Description |
|---|---|
GDRIVE_CLIENT_ID | Google OAuth client ID |
GDRIVE_CLIENT_SECRET | Google OAuth client secret |
TMDB_ACCESS_TOKEN | TMDB API bearer token |
AI_CLIENT_SIGNATURE_SECRET | Shared secret for AI requests |
GDRIVE_REDIRECT_URI | OAuth redirect URI (optional) |
Troubleshooting
OAuth Returns 404
Problem: Google Drive authentication fails with 404 error. Solution:- Verify
AUTH_SERVER_URLingdrive.rsmatches your deployed backend - Check that backend environment variables are set correctly
- Ensure backend is deployed and accessible
TMDB Metadata Not Loading
Problem: Posters and metadata fail to load. Solution:- Verify
TMDB_ACCESS_TOKENis set in backend.env - Check backend logs for TMDB API errors
- Ensure
STREAMVAULT_TMDB_PROXY_URLpoints to your backend
Watch Together Not Connecting
Problem: WebSocket connection fails for Watch Together. Solution:- Verify your hosting platform supports WebSockets
- Check
STREAMVAULT_WS_URLuseswss://protocol - Ensure backend WebSocket server is running on
/ws/watchtogether
AI Chat Signature Errors
Problem: AI chat requests fail with signature validation errors. Solution:- Ensure
VITE_AI_SIGNATURE_SECRET(frontend) matchesAI_CLIENT_SIGNATURE_SECRET(backend) - Rebuild both frontend and backend after changing the secret
Updating Your Backend
To pull updates from the official backend:Security Considerations
Next Steps
- Troubleshooting - Common issues and solutions
- Configuration Settings - Detailed configuration reference
- Introduction - Understanding StreamVault’s architecture