A real-time comment overlay server for Facebook Live streams. This server receives comments from the Facebook Live Comment Bridge browser extension and displays them in a beautiful, customizable overlay interface via WebSocket.
- 🚀 Real-time Updates: WebSocket-based live comment streaming
- 🔒 Secure: Optional API key authentication
- 🔌 Extension Compatible: Fully compatible with facebook-live-comment-bridge
- 🐳 Docker Ready: Pre-built Docker image available
- 📡 RESTful API: Standard HTTP endpoints for comment submission
The easiest way to run the server is using the pre-built Docker image:
docker pull ghcr.io/ryneex/facebook-live-comment-overlay:latest
docker run -p 3000:3000 ghcr.io/ryneex/facebook-live-comment-overlay:latestdocker run -p 3000:3000 \
-e SECRET_KEY=your-secret-key \
-e BASE_URL=http://localhost:3000 \
ghcr.io/ryneex/facebook-live-comment-overlay:latestOr with custom port and host via environment variables:
docker run -p 8080:8080 \
-e PORT=8080 \
-e HOST=0.0.0.0 \
ghcr.io/ryneex/facebook-live-comment-overlay:latest- Node.js >= 18
- pnpm >= 10.28.0
- Clone the repository:
git clone https://github.com/ryneex/facebook-live-comment-overlay.git
cd facebook-live-comment-overlay- Install dependencies:
pnpm install- Build the project:
pnpm build- Start the server:
cd apps/server
node dist/index.jsPORT(optional): Port to listen on. Defaults to 3000.HOST(optional): Host to listen on. Defaults to 0.0.0.0.SECRET_KEY(optional): Secret key for API authentication. If provided, all API requests must include a valid API key.BASE_URL(optional): Base URL for the server. Defaults tohttp://<HOST>:<PORT>.
Note: When running in Docker, use environment variables to configure the server. CLI arguments are only available when running locally.
When running locally (not in Docker), you can use CLI arguments:
--port, -p: Port to listen on (default: 3000). Can be overridden byPORTenvironment variable.--host, -h: Host to listen on (default: 0.0.0.0). Can be overridden byHOSTenvironment variable.--secret, -s: Secret key for API authentication (optional). Can be overridden bySECRET_KEYenvironment variable.
Note: Environment variables take precedence over CLI arguments.
Examples:
# Using CLI arguments
node dist/index.js --port 8080 --host 0.0.0.0 --secret my-secret-key
# Using environment variables
PORT=8080 HOST=0.0.0.0 SECRET_KEY=my-secret-key node dist/index.jsStart the server using Docker or locally:
# Docker
docker run -p 3000:3000 ghcr.io/ryneex/facebook-live-comment-overlay:latest
# Local
cd apps/server && node dist/index.jsThis server is fully compatible with the Facebook Live Comment Bridge browser extension.
- Install the Facebook Live Comment Bridge extension
- Open the extension settings
- Set your API endpoint URL to:
http://localhost:3000/api(or your server URL) - If you've set a
SECRET_KEY, enter it in the extension's API key field
Once the server is running, you'll see output like:
✓ Overlay server is running
Host: 0.0.0.0
Port: 3000
Overlay URL: http://localhost:3000
API URL: http://localhost:3000/api
WebSocket URL: http://localhost:3000/api/ws
Open the Overlay URL in a browser (or OBS browser source) to display the live comments.
If authentication is enabled, the overlay URL will include an API key:
Overlay URL: http://localhost:3000?key=your-generated-api-key
Submit comments to the server. This endpoint is used by the browser extension.
Headers:
Content-Type: application/jsonx-api-key: <api-key>(required ifSECRET_KEYis set)
Request Body:
[
{
"image": "https://example.com/profile.jpg",
"author": "John Doe",
"comment": "Great stream!"
}
]Response:
Returns the same array of comments that was submitted.
Health check endpoint.
Response:
{
"status": "OK"
}Real-time WebSocket connection for receiving comment updates.
Connection URL:
- Without auth:
ws://localhost:3000/api/ws - With auth:
ws://localhost:3000/api/ws?key=<api-key>
Message Format:
{
"type": "comments",
"data": [
{
"image": "https://example.com/profile.jpg",
"author": "John Doe",
"comment": "Great stream!"
}
]
}This is a Turborepo monorepo containing:
apps/server: Node.js server applicationapps/overlay: React overlay frontendpackages/ui: Shared UI componentspackages/config: Shared configuration (ESLint, Prettier, TypeScript)
# Install dependencies
pnpm install
# Run development server
pnpm dev
# Build all packages
pnpm build
# Format code
pnpm format
# Lint code
pnpm lint
# Type check
pnpm check-types# Server only
cd apps/server
pnpm dev
# Overlay only
cd apps/overlay
pnpm dev- Server: Node.js, TypeScript, oRPC
- Frontend: React, Vite, Tailwind CSS
- WebSocket: ws
- Build Tool: Turborepo, esbuild
- Package Manager: pnpm
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
- Facebook Live Comment Bridge - Browser extension for scraping Facebook Live comments