This document covers how to host a harmony server.

Requirements

Bandwidth

Clients may simultaneously transmit and receive up to four audio streams at a rate of 64 kilobits/second.

HTTPS

A web client is hosted from the server using insecure HTTP. Do not expose the web client directly to the Internet. Place it behind a HTTP daemon such as Caddy, nginx or Apache via reverse proxy instead.

Caddy example

Launch harmony-server with the following configuration option:

webaddress: localhost:19000

Add the following to the relevant site directive in your Caddyfile:

proxy /w http://localhost:19000 {
        websocket
}

proxy / http://localhost:19000

Installation

There are two ways to install harmony-server:

Download

Download harmony-server

Compile

Download and install the Go compiler, then install harmony-server with the following command:

GO111MODULE=on go get git.sr.ht/~tslocum/harmony/...@latest

This command will also update the server when ran again.

Execute harmony-server with the -help flag for more information:

harmony-server -help

If the command was not found, add ~/go/bin to your PATH variable.

Configuration

The path to a configuration file may be specified with --config, or the default path of ~/.config/harmony-server/config.yaml may be used.

Example configuration:

webaddress: localhost:19000
webpath: /
channels:
  Lobby-Text:
    type: text
    topic: Example text channel
  Lobby-Voice:
    type: voice
    topic: Example voice channel
  Lobby-Voice2:
    type: voice
    topic: Another voice channel

Hosting the web client on a different path

The web client expects to be hosted at the root of the domain, /.

To host the web client on a different path, such as /chat/, set the webpath configuration option:

webpath: /chat/

Hosting the web client on multiple addresses

Multiple address may be specified:

webaddress: localhost:19000,192.168.0.101:19010

About this wiki

commit 32c12d625046fe2e0033a0736365db3be53afc96
Author: Trevor Slocum <trevor@rocketnine.space>
Date:   2019-12-19T15:58:44-08:00

Add channel support
Clone this wiki
https://git.sr.ht/~tslocum/harmony (read-only)
git@git.sr.ht:~tslocum/harmony (read/write)