Skip to content

Get Started

Christian Mayer edited this page May 21, 2023 · 8 revisions

This page covers everything you need to get the FluxChat Python client running.

Dependencies

Install Dependencies on Debian 11

apt-get install -y python3 python3-pip python3-virtualenv

Install Dependencies on macOS via Homebrew

TODO

Quick Start

For a detailed installation process see below, 'Installation' section.

Run this in your favourite shell, Bash.

git clone https://github.com/FluxChat/fluxchat-py.git
cd fluxchat-py
./bin/setup.sh

Installation

The setup process for FluxChat involves installing the required Python dependencies and generating the necessary configuration files. We assume you already installed Python.

To start the setup process, run

./bin/setup.sh

The script uses virtualenv (see venv documentation) to create a virtual environment and install the required Python dependencies located under .venv. The environment variables used during the setup process are optional. See a list of available environment variables in Environment Variables page.

If the private key file is not found, the src/gen_rsa.py script will be executed to generate the private key, public key, and a self-signed certificate. This can also be done manually using openssl.

Towards the end of the setup process, the script runs envsubst to substitute Environment Variables in the config-example.json template file with environment variables, generating the final configuration file located var/config1.json.

For the setup we assume that FluxChat is running on a personal Computer in a Local Area Network (LAN), which is connected to the public Internet via a default gateway. By default FluxChat will listen on all network interfaces (0.0.0.0).

Setting up multiple nodes on the same maschine

There are several Environment Variables to get different behaviours. For example, to setup another node, you can use environment variables in combination with ./bin/setup.sh.

export FLUXCHAT_CONFIG=./var/config2.json
export FLUXCHAT_PORT=25002
export FLUXCHAT_DATA_DIR=./var/data2
export FLUXCHAT_IPC_PORT=26002
./bin/setup.sh

Files and Directories

This section describes the directory and file structures, paths used in this documenation.

Let's assume that you are currently located at /path/to/your/home and have used the git clone command to obtain the source code for the FluxChat project. In this case, all the documentation and paths provided are relative to the directory /path/to/your/home/fluxchat-py.

Path Type Description
bin Directory Where the basic scripts live.

TODO