Self-hosting
Omnillink is free software under the MIT licence. You need Node.js 22 or newer; Redis is optional.
With Node.js
git clone https://github.com/kayzen-lyon/linkforge.git
cd linkforge
npm install
npx playwright-core install chromium
cp .env.example .env
npm run dev
The API listens on http://localhost:3000. npm run build then npm start run the compiled version.
On Vercel
The repository contains the configuration of a single serverless function deployment that serves both the API and this site. The root directory of the Vercel project is apps/api.
- On Vercel, Chromium comes from the
@sparticuz/chromiumpackage, which is made for serverless functions. - Without Redis the cache lives in memory, per instance. Add
REDIS_URLto share it. - The first render of a cold instance is slower: Chromium has to start first.
Environment variables
All of them are optional. The defaults suit a local trial.
| Variable | Default | Purpose |
|---|---|---|
PORT, HOST | Default3000, 0.0.0.0 | PurposeListening address. |
REDIS_URL | Defaultempty | PurposeShared cache. Empty: in-memory cache. |
API_KEYS | Defaultempty | PurposeKeys accepted in x-api-key, comma-separated, 16 to 256 characters. |
RATE_LIMIT_MAX | Default60 | PurposeRequests per window and per IP address. |
RATE_LIMIT_KEY_MAX | Default600 | PurposeRequests per window and per key. |
RATE_LIMIT_WINDOW_MS | Default60000 | PurposeLength of the window. |
CACHE_*_TTL_SECONDS | Default3600 | PurposeCache lifetime per endpoint: META, SCREENSHOT, PDF, EXTRACT, CONTENT. |
HTTP_TIMEOUT_MS | Default10000 | PurposeTimeout of the HTTP read. |
BROWSER_NAVIGATION_TIMEOUT_MS | Default20000 | PurposeNavigation timeout in Chromium. |
BROWSER_MAX_CONCURRENCY | Default4 | PurposePages rendered in parallel (2 on serverless). |
REQUEST_DEADLINE_MS | Default55000 | PurposeOverall deadline of a request. |
SSRF_ALLOWED_PORTS | Default80,443 | PurposeAllowed destination ports. |
SSRF_BLOCKED_HOSTS | Defaultempty | PurposeExtra refused destinations, host or host:port. This list can only restrict. |
BROWSER_PAGE_MAX_REQUESTS | Default1500 | PurposeRequests at most per rendered page. |
BROWSER_PAGE_MAX_BYTES | Default60 MB (30 on serverless) | PurposeBytes received at most per rendered page. |
CIRCUIT_BREAKER_THRESHOLD | Default5 | PurposeConsecutive network failures before a host is set aside. |
CIRCUIT_BREAKER_COOLDOWN_MS | Default30000 | PurposeHow long it is set aside. |
ANIMATION_MAX_BYTES | Default10 MB (4 on serverless) | PurposeMaximum size of an animated capture. |
METRICS_TOKEN | Defaultempty | PurposeToken that protects /metrics (Prometheus format). Empty: the route does not exist. |
MCP_ENABLED | Defaulttrue | PurposeTurns on the MCP endpoint POST /mcp. |
CORS_ORIGIN | Default* | PurposeOrigins allowed to call the API from a browser. |
SSRF_ALLOW_PRIVATE_NETWORKS=true allows local and private addresses. It exists for tests: the API refuses to start with it when NODE_ENV=production.
Checking the installation
curl http://localhost:3000/health
The answer gives the uptime, the cache backend and the state of the browser pool. The Status page shows the same for this instance.