Self-hosting

The Hub runs on any host with PHP 8.1 or newer (with pdo_sqlite or pdo_mysql, mbstring, curl and openssl). There's no build step and no Node server to keep running.

Install

  1. Upload the app folder (everything except website/ and deploy/) to your host, for example as /hub/.
  2. Make data/, uploads/ and plugins/ writable by PHP.
  3. Open it in a browser over https:// (browsers only allow microphones on secure pages). It creates its database on the first request. The first account to sign up owns The Hub Lounge.
  4. Edit config.php: put your own username in OWNER_USERNAMES (the people who run this Hub), and read the other settings below.

Settings in config.php

SettingWhat it does
OWNER_USERNAMESAccounts that run this Hub: they get the owner badge, give the DEV tag, see why plugins were left out, and install from the plugin shop. Register these names yourself.
DB_PATH / database.phpSQLite file by default. Create database.php (see database.example.php) to use MySQL or MariaDB instead; tools/sqlite-to-mysql.php moves an existing database across.
PEER_HOST, PEER_PORT, PEER_PATHThe PeerJS signalling server that introduces people in a call. The public one works for testing; run your own for real use (npx peer --port 9000).
ICE_SERVERSSTUN and TURN servers. A TURN server makes calls work for people behind strict networks.
GIF_PROVIDER and keysGIF and sticker search through KLIPY, GIPHY or Tenor.
CONTENT_FILTER_FILESWhere the sensitive media filter loads its model from. Empty uses jsDelivr; php tools/vendor-content-filter.php copies it to your own server.
PLUGIN_SHOP_URLThe plugin shop catalog. The official shop by default; 'self' makes this Hub host a shop of its own.
EGG_CAT_GIFThe GIF for one of the easter eggs. A Tenor or GIPHY page link works too.

Updating

Replace the files (keep config.php, database.php, data/, uploads/ and any plugins you added). The database upgrades itself on the next request. Write the update's notes in patch-notes.json: everyone gets a notice with a link to them.

Backups

Everything that matters is in the database (or data/voicelink.sqlite) and uploads/. Copy both. Messages in direct messages are encrypted, so a backup of them can only be read on the devices of the people who wrote them.

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