Install and run the RTI

microrti runs the HLA 4 RTI server. Use microrti-cli to check that it answers, list federation executions and watch their traffic. You can install either program on its own.

Run the installers

The installers choose the archive for your system and put the executable in the bin directory under CARGO_HOME, or under $HOME/.cargo by default. Rust is only needed if you build from source. To choose an archive yourself, see Download the archives.

macOS and Linux

curl --proto '=https' --tlsv1.2 -fsSL https://github.com/microrti/microrti/releases/latest/download/microrti-installer.sh | sh
curl --proto '=https' --tlsv1.2 -fsSL https://github.com/microrti/microrti/releases/latest/download/microrti-cli-installer.sh | sh

Windows

Run both installers in PowerShell.

powershell -ExecutionPolicy Bypass -Command "irm https://github.com/microrti/microrti/releases/latest/download/microrti-installer.ps1 | iex"
powershell -ExecutionPolicy Bypass -Command "irm https://github.com/microrti/microrti/releases/latest/download/microrti-cli-installer.ps1 | iex"

Open a new terminal if you just added the install directory to your PATH. Then check the installed versions.

microrti --version
microrti-cli --version

Download the archives

On the latest release page, choose an archive named microrti-<target>.tar.gz for the server or microrti-cli-<target>.tar.gz for the operator tool. Windows archives end in .zip.

Systemx86-64 / IntelARM64Format
macOSx86_64-apple-darwinaarch64-apple-darwin (Apple Silicon).tar.gz
Windowsx86_64-pc-windows-msvcaarch64-pc-windows-msvc.zip
Linux with glibcx86_64-unknown-linux-gnuaarch64-unknown-linux-gnu.tar.gz
Linux, statically linked with muslx86_64-unknown-linux-muslaarch64-unknown-linux-musl.tar.gz

Use the musl archive on Alpine Linux or when you need a Linux binary that does not depend on the system’s shared libraries.

Download the archive and the file with the same name ending in .sha256. On Apple Silicon, verify and extract the server archive with these commands.

shasum -a 256 -c microrti-aarch64-apple-darwin.tar.gz.sha256
tar -xzf microrti-aarch64-apple-darwin.tar.gz

On Linux, use sha256sum -c with the checksum file. On Windows, run Get-FileHash -Algorithm SHA256 with the ZIP file, compare the hash with the one in its .sha256 file, then extract the ZIP. From the extracted directory, start the server with ./microrti on macOS and Linux or .\microrti.exe in PowerShell. You can also copy the executable to a directory on your PATH. The server archive includes microrti.example.toml with the settings and their defaults.

Install with Cargo

Cargo builds both programs from crates.io with Rust 1.88 or later.

cargo install --locked microrti microrti-cli

For the example federates chat and restaurant, run cargo install --locked microrti-examples.

Build from a clone

A clone gives you every program of the repository: the server, microrti-cli, and the example federates chat and restaurant.

git clone https://github.com/microrti/microrti
cd microrti
git checkout v0.5.1
cargo build --locked --release -p microrti -p microrti-cli -p microrti-examples --bins

Look in target/release for microrti, microrti-cli, chat and restaurant. On Windows, the executables end in .exe. The five-minute tour uses a debug build, which is quicker to compile.

Start the RTI

With no option and no configuration file, microrti listens for plain TCP on port 15164 of every network interface (0.0.0.0:15164), with authorisation switched off:

microrti

--listen (short form -l) replaces the default listener. Its value is [TRANSPORT://]IP[:PORT], and you can give it several times:

TransportSchemeStandard port
TCPtcp (the default)15164
TLS 1.3tls15165
WebSocketws80
Secure WebSocketwss443

A missing port is the standard port of the transport. Port 0 lets the system choose a free one, which is handy in scripts and tests. tls and wss need a certificate: --tls-cert and --tls-key with your own PEM files, or --tls-self-signed for encryption without authentication of the RTI. Without one, microrti refuses to start (exit status 2) and names the settings to add.

For each listener, the RTI prints one listening on line on the standard output, with the port it really got. Here is one RTI on all four transports, on the loopback interface, with ports chosen by the system:

microrti -l tcp://127.0.0.1:0 -l tls://127.0.0.1:0 -l ws://127.0.0.1:0 -l wss://127.0.0.1:0 --tls-self-signed
listening on tcp://127.0.0.1:58258
listening on tls://127.0.0.1:58259
listening on ws://127.0.0.1:58260
listening on wss://127.0.0.1:58261

A federate can use any of these addresses as its RTI address. The log goes to the standard error stream; at start-up it looks like this:

2026-12-02T20:44:58.446700Z  INFO microrti: microrti starting version="0.5.0"
2026-12-02T20:44:58.447113Z  INFO microrti::server: FOM modules and MIMs named by file:, http: or https: URL are read wherever they are: set fom_urls = "none" or fom_url_directory to restrict this when federates outside a trusted network can reach the RTI timeout=30s
2026-12-02T20:44:58.447130Z  INFO microrti::server: federation saves are kept in memory and lost when the RTI stops: set save_directory to keep them in files
2026-12-02T20:44:58.448578Z  INFO microrti::server: RTI listening endpoint=tcp://127.0.0.1:58258
2026-12-02T20:44:58.448631Z  INFO microrti::server: RTI listening endpoint=tls://127.0.0.1:58259
2026-12-02T20:44:58.448635Z  INFO microrti::server: RTI listening endpoint=ws://127.0.0.1:58260
2026-12-02T20:44:58.448638Z  INFO microrti::server: RTI listening endpoint=wss://127.0.0.1:58261
2026-12-02T20:44:58.448652Z  INFO microrti_fedpro::server: Federate Protocol listener ready address=127.0.0.1:58261 transport=wss
2026-12-02T20:44:58.448656Z  INFO microrti_fedpro::server: Federate Protocol listener ready address=127.0.0.1:58259 transport=tls
2026-12-02T20:44:58.448668Z  INFO microrti_fedpro::server: Federate Protocol listener ready address=127.0.0.1:58260 transport=ws
2026-12-02T20:44:58.448689Z  INFO microrti_fedpro::server: Federate Protocol listener ready address=127.0.0.1:58258 transport=tcp

At the default level, info, the log records listeners, sessions opened and closed, federation executions created and destroyed, federates joining and resigning, and failed TLS handshakes (the same failure from the same address once a minute); a service refused for lack of the right password is a warning. --log-level debug adds every service call that raises an exception. Two lines near the top describe defaults you may want to change.

The first is about FOM modules. The MicroRTI clients send the content of a module, but a federate may instead name it by a file:, http: or https: URL, and by default the RTI then reads it: any file its process may read, any address its host can reach. That suits a machine of your own. When federates you do not trust can reach the RTI, restrict it with fom_urls = "none" or fom_url_directory (FOM modules named by URL). On a listener that other hosts can reach, such as 0.0.0.0, this line is a warning, worded for that case:

2026-12-02T20:45:24.078724Z  WARN microrti::server: FOM modules and MIMs named by file:, http: or https: URL are read wherever they are, for federates of other hosts too: set fom_urls = "none" or fom_url_directory unless every host that reaches the RTI is trusted timeout=30s

The second line says that federation saves are kept in memory unless you give the RTI a directory for them (Configure the RTI).

Coming from 0.4? Version 0.5.0 changes three things for an operator. The server now reads the FOM modules that federates name by URL, where 0.4 refused them unless fom_url_directory was set: fom_urls = "none" gives back the default of 0.4. A designator without a scheme, such as Chat.xml, is no longer read, not even under fom_url_directory, where you now write file:Chat.xml. And a save that a 0.4 server wrote in its save_directory cannot be restored by 0.5, which writes a new save format; see federation saves.

If a port is taken, microrti stops at once with cannot open the listeners: ... Address already in use and exit status 1. On macOS it also refuses a port that another program already serves on an overlapping address, such as 0.0.0.0:15164 when 127.0.0.1:15164 is taken.

Check that it is up

microrti-cli ping connects to the RTI, makes one service call, disconnects, and tells you how long it took. With the RTI started above:

microrti-cli --rti tcp://127.0.0.1:58258 ping
tcp://127.0.0.1:58258: connected in 3.716 ms, service round trip 0.502 ms, 4.918 ms in all

The same works on the other transports, --rti wss://127.0.0.1:58261 for example. Without --rti, microrti-cli tries tcp://localhost:15164. The exit status is 0 when the RTI answers and 1 when it does not, with the reason on the standard error, so it fits in scripts:

microrti-cli ping && echo the RTI is up

microrti-cli list goes one step further and lists the federation executions; on a fresh RTI it says that there are none. Watch and operate a federation covers the other commands. Without microrti-cli, the listening on lines tell you that the listeners are open.

Check a configuration file

The settings of the RTI (its RTI initialization data, or RID) can come from a TOML file given with --config FILE or the environment variable MICRORTI_CONFIG. Command line options take precedence over the file. microrti check-config validates the settings and prints the effective ones without starting anything. With no file, it shows the defaults:

microrti check-config
# defaults and options: the settings are valid. Effective settings:
log_level = "info"
tick_period_ms = 100
service_report_directory = "microrti-service-reports"
# no save_directory: federation saves are kept in memory, lost when the RTI stops
fom_urls = "all"
# FOM modules and MIMs named by file:, http: or https: URL are read wherever they are: restrict with fom_urls = "none" or fom_url_directory
fom_url_timeout = 30
# no fom_url_root_certificates: https servers are verified against the trust store of the system
max_message_size = 67108864
rti_timeout_heart = 180
rti_timeout_purge = 600
# no TLS certificate

[[listener]]
transport = "tcp"
address = "0.0.0.0:15164"

[authorization]
enabled = false
authorizer = "HLAauthorizer"
# no password

Give it a file to check, here a microrti.toml that keeps the RTI on the loopback interface and shortens one timeout:

log_level = "info"
rti_timeout_purge = 120
[[listener]]
transport = "tcp"
address = "127.0.0.1:15164"
microrti check-config microrti.toml
# microrti.toml: the settings are valid. Effective settings:
log_level = "info"
tick_period_ms = 100
service_report_directory = "microrti-service-reports"
# no save_directory: federation saves are kept in memory, lost when the RTI stops
fom_urls = "all"
# FOM modules and MIMs named by file:, http: or https: URL are read wherever they are: restrict with fom_urls = "none" or fom_url_directory
fom_url_timeout = 30
# no fom_url_root_certificates: https servers are verified against the trust store of the system
max_message_size = 67108864
rti_timeout_heart = 180
rti_timeout_purge = 120
# no TLS certificate

[[listener]]
transport = "tcp"
address = "127.0.0.1:15164"

[authorization]
enabled = false
authorizer = "HLAauthorizer"
# no password

A key the RTI does not know is an error, so a misspelt setting does not go unnoticed. The same message stops microrti --config before it opens any port, with exit status 2:

microrti: invalid setting `log_levle`: unknown setting (known: authorization, fom_url_directory, fom_url_root_certificates, fom_url_timeout, fom_urls, listener, log_level, max_message_size, rti_timeout_heart, rti_timeout_purge, save_directory, service_report_directory, tick_period_ms, tls_certificate_chain, tls_private_key, tls_self_signed)

All the options

This is microrti --help of version 0.5.0:

microrti: an HLA 4 Run-Time Infrastructure (IEEE Std 1516.1-2025).

Hosts one RTI and serves federates over the standard HLA Federate Protocol: plain TCP, TLS 1.3,
WebSocket and secure WebSocket. Without any option it listens for TCP on 0.0.0.0:15164.

The settings come from a RID file in TOML (see microrti.example.toml for every key) and from the
options below, which take precedence over the file. The log goes to the standard error stream; when
nobody reads that stream, log lines are dropped rather than the federates kept waiting, and their number
is logged at shutdown (unless the stream is still blocked then: the RTI does not wait for it). The
addresses the RTI listens on are also printed to the standard output, one `listening on <address>` line
per listener. Ctrl-C or SIGTERM stops the RTI in an orderly way.

Usage: microrti [OPTIONS] [COMMAND]

Commands:
  run           Start the RTI (the default when no command is given)
  check-config  Validate a RID and print the effective settings, without starting anything
  help          Print this message or the help of the given subcommand(s)

Options:
  -c, --config <FILE>
          RID file (TOML); without it the defaults apply
          
          [env: MICRORTI_CONFIG=]

  -l, --listen <[TRANSPORT://]IP[:PORT]>
          Listen on this address instead of the listeners of the RID; may be given several times. TRANSPORT is tcp (default), tls, ws or wss; a missing port is the standard port of the transport (15164, 15165, 80, 443); port 0 lets the system choose

      --tls-cert <FILE>
          PEM file with the certificate chain of the tls and wss listeners (leaf certificate first)

      --tls-key <FILE>
          PEM file with the private key of the certificate

      --tls-self-signed
          Generate a self-signed certificate at start: encryption without authentication of the RTI

      --rti-timeout-heart <SECONDS>
          RTI_TIMEOUT_HEART: a session whose federate was silent for this long becomes inactive and may be resumed [default: 180]

      --rti-timeout-purge <SECONDS>
          RTI_TIMEOUT_PURGE: a session inactive for this long is purged and its federate lost [default: 600]

      --max-message-size <BYTES>
          Largest message accepted from a federate [default: 67108864]

      --tick-period-ms <MILLISECONDS>
          Period of the RTI's wall-clock driven work [default: 100]

      --save-directory <DIRECTORY>
          Write federation saves to files in this directory, created if missing, and restore them from there, also after a restart of the RTI; without it they are kept in memory and lost when the RTI stops

      --fom-urls <all|none>
          Which FOM modules and MIMs that federates name by URL the RTI reads: all (every file:, http: and https: URL, wherever it leads; the proxy settings of the environment are not followed) or none (federates send their content). Restrict it when federates outside a trusted network can reach the RTI [default: all]

      --fom-url-directory <DIRECTORY>
          Read the FOM modules and MIMs that federates name by file: URL from this directory only (a relative URL is relative to it; nothing outside it is read, also through .. or a symbolic link); http: and https: URLs are then refused

      --fom-url-timeout <SECONDS>
          Longest time the FOM modules one call names by URL may take, all of them together: the wait for a reader, the files, the connections and the downloads; at most 3600 [default: 30]

      --fom-url-root-certificates <FILE>
          PEM file of the certificates that https: servers of FOM modules are verified against, instead of the trust store of the system

      --authorization <true|false>
          Require authorization (the HLAauthorizer with a global password) or switch it off
          
          [possible values: true, false]

      --password-env <VARIABLE>
          Take the password from this environment variable

      --password-file <FILE>
          Take the password from this file (the line end at its end is not part of the password)

      --log-level <LEVEL>
          error, warn, info, debug or trace [default: info]; RUST_LOG, when set, selects per module

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Examples:
  microrti                                   TCP on 0.0.0.0:15164, no authorization
  microrti --config /etc/microrti.toml       settings from a RID file
  microrti -l tcp://127.0.0.1:0              loopback only, port chosen by the system
  microrti -l tcp://0.0.0.0:15164 -l tls://0.0.0.0:15165 --tls-cert chain.pem --tls-key key.pem
  microrti -l wss://[::]:8443 --tls-self-signed
  microrti --authorization true --password-env RTI_PASSWORD
  microrti --save-directory saves            federation saves kept in files, across restarts
  microrti --fom-urls none                   no FOM module named by URL is read: federates send the content
  microrti --fom-url-directory /srv/foms     FOM modules named by file: URL read from this directory only
  microrti check-config microrti.toml        validate a RID and print the effective settings

A federate reaches the RTI with the RTI address tcp://HOST:15164 (or tls://, ws://, wss://).

Stop the RTI

Press Ctrl-C in its terminal. On macOS and Linux, you can also send SIGTERM with kill PID. The RTI closes its listeners and logs a summary before it exits with status 0.

2026-12-02T20:45:15.851966Z  INFO microrti: shutdown requested signal="SIGTERM"
2026-12-02T20:45:15.852220Z  INFO microrti::server: RTI stopped
2026-12-02T20:45:15.852235Z  INFO microrti: microrti stopped sessions=3 calls=9 callbacks=3

Federation executions live in the memory of the RTI process, so they end with it; federation saves too, unless the RTI has a save_directory. Stop the federates first: a federate built on the Rust client whose RTI disappears tries to resume its session for up to 600 seconds (the client setting FED_TIMEOUT_RECONNECT) before it reports the connection lost.

Ports and firewalls

The standard Federate Protocol ports are 15164 for TCP and 15165 for TLS. When the RTI has a certificate and no listener is configured, it listens on both. In your firewall, open the ports of the listeners you configure and nothing else.

To write the settings down in a file, see Configure the RTI; for certificates, encrypted transports and passwords, see TLS and authorisation.

Next steps