1
0
Fork 0
docker-synapse/README.md

2.1 KiB

docker.jcg.re/synapse

Build Status

Introduction:

A basic docker image running synapse, a matrix homeserver.

For a complete self hosted chat and VOIP app, you also need a TURN server (for example coturn), and a matrix client (for example Riot.im).

Getting started:

First, start by generating a config file:

docker run \
    -e SERVER_NAME=example.com \
    -v `pwd`/data:/data \
    --rm \
    --entrypoint generate \
    docker.jcg.re/synapse

There are 2 things you need to take care of here:

  • put your domain where example.com is
  • modify `pwd`/data to match the folder where you want your homeservers data to be. This contains things like log, database, media and config.

After you're done with that, you might want to change some things in the default configuration. You will find the configuration file in data/config/homeserver.yaml.

Now that you have synapse configured, it's time to start it up:

docker run \
    -v `pwd`/data:/data \
    -p 8008:8008 \
    -p 8448:8448 \
    -n synapse \
    docker.jcg.re/synapse

You now should have synapse running and should be able to connect to it from a client.

If you haven't enabled registration manually in the config file, you can create users from the CLI:

docker exec \
    --interactive \
    --tty \
    synapse \
    register_new_matrix_user \
    -c /data/config/homeserver.yaml \
    http://localhost:8008

The next step would be to put a reverse proxy in front of it for secure client connections, and to install and configure a TURN server.

Tags:

  • latest: latest stable version

Environment variables:

Runtime:
  • UID: user id (default: 1337)
  • GID: group id (default: 1337)
Config generation:
  • SERVER_NAME: domain name of the homeserver. (mandatory)
  • REPORT_STATS: either yes or no, default: yes

Ports:

  • 8008: client-to-server matrix traffic
  • 8448: server-to-server matrix traffic