Overview
Vyla API is a self-hosted Node.js application that you run on your own infrastructure. It is designed for local/desktop deployment and does not provide any public hosted instances. The API server has no required external services besides SQLite for API key storage. It runs as a single process that can fork into multiple workers via the built-incluster module, with an in-memory cache shared across workers through the primary process.
Requirements
- Node.js 18 or later
- SQLite (included automatically through
better-sqlite3) - A TMDB API key if you want title validation and metadata lookups
Environment variables
Create a.env file in the project root:
Variable reference
Database setup
The API uses SQLite throughbetter-sqlite3. No external database service or connection string is required.
On startup, initAuth() calls ensureApiKeysTable() and ensurePublicKey(). These functions automatically create the database directory, initialize SQLite, create the api_keys table, and seed a default public key if one does not already exist.
The database is stored at:
publicstandardpartner
active = 0) takes effect after the next refresh cycle.
Installing and running
/health to confirm it is running and check which sources are currently reachable from your host.
The stream-api repository is private. You need access to the GitLab repository to clone it. Contact the Vyla team for repository access if needed.
Running with multiple workers
SettingWORKER_COUNT above 1 forks additional worker processes via cluster.
The primary process holds a shared in-memory cache (capped at 1500 entries, pruned every 30 seconds) and relays cache reads/writes between workers over IPC, allowing cached stream results to be shared rather than duplicated.
Network considerations
Several sources are documented inconfig.js as blocked on datacenter IPs. This commonly affects cloud hosting providers and VPS environments.
If a source’s getStream consistently returns nothing from your server but works from a residential connection, the cause is usually upstream blocking based on IP reputation. For the best experience, run Vyla API on a residential connection or use a residential proxy.
When running on a local desktop environment, you should have minimal issues with source availability since you’re using a residential IP address.
Reverse proxy / TLS
The server runs over plain HTTP. For public deployments, place it behind a reverse proxy such as Caddy, Nginx, or Cloudflare Tunnel to terminate TLS and forward requests to the configuredPORT.
CORS is already configured at the application layer with:
Verifying your deployment
Run these checks in order:-
GET /healthConfirms the process is running and reports per-source reachability from your host. -
GET /api/test/155?source=vidrockRuns a real source resolution using a known TMDB movie ID and returns whether the source succeeded. Requires astandardorpartnerAPI key. -
GET /api/debug/155?source=vidrockOnly available whenENABLE_DEBUG_ROUTE=true. Returns request traces, headers, and raw candidate URLs for debugging source failures.
Desktop Application
For users who prefer a desktop application over running the Node.js server directly, Vyla provides a desktop version that includes the streaming API. The desktop application runs the same backend services but with a simplified user interface. The desktop version includes:- Built-in streaming API server
- Desktop player interface
- Automatic updates
- Simplified configuration

