πŸ—£ Open group setup

Open groups are Session group chat servers that can host many thousands of chat participants. This guide explains how to set up a Session open group.

Note: Open groups provide transit encryption, but open group messages are not encrypted while stored on the open group server, making closed groups (which can be created within Session itself) a better solution for high-security communications with groups of 100 or less people.

Open groups are based on an express REST API for serving persistent-history public chat rooms. Open groups are unlimited in size, as they are hosted by your own server. Please be aware these are public groups, and highly sensitive private information should not be shared in this group format.

Open group servers are run by 2 daemons: the platform server, providing an ADN standard REST API, and another daemon with Session-specific behaviors (crypto-key registration and enhanced moderation functions).

Requirements

  • A hosting solution with a public IP address

  • A working DNS hostname that points to your public IP address.

  • An email address (required by LetsEncrypt)

  • At least 4GB of free disk space and 512MB of RAM on the host machine (an open group server may run with less resources, but you may attempt to do so at your own risk)

Installation

1. Install Docker (Debian)

For non-Debian-based installation instructions of Docker: https://docs.docker.com/v17.12/install/#server​

Use this guide for additional troubleshooting help: https://docs.docker.com/v17.12/install/linux/docker-ce/debian/#set-up-the-repository or https://docs.docker.com/v17.12/install/linux/docker-ce/ubuntu/​

Remove any possibly previously installed Docker installations

sudo apt-get remove docker docker-engine docker.io

Install the official Docker repo

  • sudo apt-get update

  • sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common

For Debian

  • curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

  • sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

For Ubuntu

  • curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

  • sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Install and test Docker

  • apt-get update

  • sudo apt-get install docker-ce

  • To check to make sure it's all working: docker run hello-world

2. Install docker-compose

Create docker-compose script

curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Ensure script is executable

chmod u+x /usr/local/bin/docker-compose

3. Install SOGS

  • git clone https://github.com/loki-project/session-open-group-server.git

Install SOGS git submodules

  • cd session-open-group-server

  • git submodule init

  • git submodule update

Make sure permissions on acme.json is correct

chmod 600 docker/acme.json

Set up config

  • cp loki_template.ini loki.ini

Get your public key

  • Run echo "PUBKEY=true" >> loki.ini (replacing PUBKEY with your public key)

Start the server

Replace [email protected] with your email address and yourssl.domain.tld with your public facing hostname. These are required for getting an SSL certification from LetsEncrypt, which we will attempt to do automatically for you.

[email protected] DOMAIN=yourssl.domain.tld docker-compose up -d

Upgrade instructions

  • Make sure you're in the loki-messenger-public-server directory

  • [email protected] DOMAIN=yourssl.domain.tld docker-compose down to stop it from running

  • git pull to grab the latest source and configs

  • git submodule init to grab any submodule changes

  • git submodule update to grab any platform/nodepomf changes

  • [email protected] DOMAIN=yourssl.domain.tld docker-compose build to update the local docker images

  • [email protected] DOMAIN=yourssl.domain.tld docker-compose up -d to restart the server

Getting help

If something in this guide doesn't make sense, or if you’re running into issues that you can’t identify on your own, the first place to go would be the Oxen Discord. Alternatively, you can find help on our other communication channels: Telegram, Twitter, or Reddit.

Reporting bugs

If you've sought help through our communication channels but have not arrived at a solution for your issue, we recommend opening an issue ticket on the Session public server GitHub repository.