Skip to content

Autoconnecting to Sessions

July 29, 2025

FastX allows admins to create autoconnect scripts that will automatically connect to a running session on login.

Enabling Autoconnect

Set the environment variable AUTOCONNECT_SCRIPT in /etc/fastx/fastx.env to enable autoconnect.

The AUTOCONNECT_SCRIPT is the path to the script that chooses the session to connect to. It can be written in any language, and must be executable

The Autoconnect Script

JSON encoded data is passed on stdin. The script should return a string of the sessionID that autoconnect wishes to connect to.

Input

// input
{
"sessions": [//array of user's sessions],
"user": LOGGED_IN_USER_OBJECT,
"nodeID": "node_user_logged_in_to",
"input": {} //extra input -- reserved for future use
}

Output

//output
// return a string of the sessionID you want to connect to

Latest News