The Hub developer wiki

The Hub (formerly VoiceLink) is a self-hosted, voice-first community app: voice rooms, video, chat and end-to-end encrypted direct messages, built with plain HTML, CSS, JavaScript and PHP. This wiki explains how to run it and how to build on it.

Where to start

  • Using The Hub: spaces, rooms, roles, settings, and what everything does.
  • Self-hosting: put The Hub on any PHP host, configure it, and keep it up to date.
  • Production server: how the official server is set up, with worker pools pinned to CPU cores so one busy part can't take the rest down.

Build on The Hub

WhatWhat you can make
ThemesColour schemes, radii and extra CSS, for one person or everyone on a server.
PluginsSlash commands, buttons by the message box, message decorations, settings panels, styles. Plain JavaScript, no build step.
Publishing to the shopShare a plugin with every Hub through the plugin shop.
BotsAccounts your own programs run: welcome people, answer commands, post updates.
APIEvery action the app uses to talk to the server.
Desktop appThe Windows, macOS and Linux app: global shortcuts, the in-game overlay, game capture.

How The Hub fits together

  • The server is api.php, one PHP file that answers JSON for every action, with its database in SQLite or MySQL. The app asks it for changes about every second and a half (sync), so it works on any shared host, with no WebSocket server to run.
  • Voice and video go directly between people's browsers with WebRTC. The server only introduces them (through a PeerJS signalling server) and keeps track of who's in which room.
  • The app is index.html with the scripts in assets/: no framework and no build step. Edit a file, reload, done.
  • Direct messages are end-to-end encrypted in the browser (assets/e2ee.js); the server stores ciphertext.

Patch notes for every update are in the changelog.

This page is built from docs/wiki/index.md in The Hub's source.