Skip to content

[EN] TMA‐2 Server Setup Guide

LUFT-AQUILA edited this page Nov 1, 2023 · 2 revisions

In most cases, you can use the provided TMA-2 telemetry server (monolith.luftaquila.io) and don't need to set up your own server.

If you want to use the default Monolith server, you'll need to register as a user first. Please send your school, team name, vehicle ID, and key to [email protected].

However, you can self-host your own server if you want. This guide assumes a basic knowledge of domain setup, Linux commands, and related things.

1. Domain Setup

  1. Purchase a domain address to use as your server.
  2. Configure DNS records to point the domain name to your server's IP address. The setup process may vary depending on your domain service provider and is not explained in detail in this guide.

2. NGINX Installation

Follow the instructions in the Install NGINX documentation to install the NGINX web server.

3. Monolith Repository

Clone the Monolith repository by executing the following commands:

git clone https://github.com/luftaquila/monolith.git
cd monolith

4. Configuration

NGINX Configuration

Open the monolith/server/monolith.conf file and replace the <YOUR_SERVER_DOMAIN>, <YOUR_MONOLITH_PORT>, and <YOUR_MONOLITH_PATH> values.

  • <YOUR_SERVER_DOMAIN>: Your server's domain address (e.g., monolith.luftaquila.io).
  • <YOUR_MONOLITH_PORT>: The port where the TMA-2 server will run. Make sure it matches the value set in server/config.json.
  • <YOUR_MONOLITH_PATH>: The path to the Monolith repository.

SSL/TLS Configuration

Put the necessary SSL settings like ssl_certificate, ssl_certificate_key, and ssl_trusted_certificate, in place of <YOUR_SSL_CERTIFICATES>. You can refer to the Configuring HTTPS servers documentation.

Copy the file to your NGINX configuration directory and restart NGINX to apply the changes.

sudo cp server/monolith.conf /etc/nginx/sites-available
cd /etc/nginx/sites-enabled
sudo ln -s ../sites-available/monolith.conf monolith.conf
sudo systemctl restart nginx

TMA-2 Configuration

NPM modules

Execute npm install in the monolith/server directory to install the required NPM modules.

Channel Configuration

Set the channels value in the monolith/server/config.json file.

Only TMA-1 and clients with a channel name and key matching this list can access the server.

The channel key is used for basic validation and is transmitted in plain text across the entire communication.

Port

Change the port value in the monolith/server/config.json file to match the port value you set earlier in NGINX.

Linux Service Registration

Run the following commands to register and start the Monolith service:

sudo cp monolith/server/monolith.service /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable monolith
sudo systemctl start monolith

5. Operation

To register or modify the channels, edit monolith/server/config.json and run sudo systemctl restart monolith to restart service.

All packets will be recorded in monolith/server/log directory.