Configuration

Node configuration

Step 1. Create node in UI and get secret key

Step 2. Create node config file with minimal config

settings.yaml:

services:
  - name: bash
    command: /bin/bash
    env:
      TERM: xterm

server: shell1.teamshell.com:7890
secret: 6ig94zfzdz2g21h5pwgv98pzp9qjsc
keyFile: "/etc/nodekey.pem"
node_name: node_on_server1

Available services options

command - command to launch on session start REQUIRED
name - service name unique ID within workspace. REQUIRED
env - pass dictonary with environment variables and their values
inactivity_ttl - maximum idle connection time before session is closed by node. Example: 1800s
init_commands - list of commands that must be running on node start
max_history_length - maximum session size in bytes(or megabytes). Examples: 100M; 500K
on_exit - run command on exit according to exit code
Example:

services:
  - name: bash
    command: /bin/bash
    on_exit:
      0: echo "Success" > /tmp/file.txt
      1: echo "Not success" > /tmp/file.txt

run_as - run command on behalf of specified system user
save_history - save session log for later replaying or not
tags - Tags allow you to group services and specify the picture related to particular service and its sessions
work_dir - Default work directory

Service clustering
You may launch 2 or more nodes with same service ID (name). The session will be routed to node with fastest response. Resuming session only at origin node.

Graceful reload

If you use config file as node config source you may want to reload node without your current connections interruptions. You can do it by sending USR1 signal to node process:

KILL -USR1 <pid>

If you’re using GUI configuration that is stored in database the graceful reload is automatically performed upon configuration update.