Quick start
This guide provides simple instructions to get a single host instance of KeySquare running quickly on Linux.
For more detailed deployment instructions, please see Deployment Guide.
Installing
The KeySquare platform can be installed in the following forms:
- Container platform using Docker.
- Bare-metal platform on Linux.
Please contact Sales for installation file(s) and a licence key.
1. Extract Installation Files
- Container
- Bare-metal
Extract the archive file. This creates a keysquare-docker-(version)/ directory in which setup files will be placed.
tar xvzf keysquare-docker-(version).tar.gz
Extract the archive files. This creates a keysquare-baseline-(version)/ directory in which setup files will be placed.
tar xvzf keysquare-baseline-(version).tar.gz
tar xvzf keysquare-core-platform-(version).tar.gz
You may have been provided with a keysquare-runtime-(version).tar.gz, leave the archive beside the extracted
keysquare-baseline-(version)/ directory in the same staging directory. Do not extract it manually.
2. Run Setup
- Container
- Bare-metal
Must have tar, openssl, docker-composer 2.24.0+, and docker 25.0+ installed
Run the setup.sh script from the keysquare-docker-(version) directory that was extracted:
cd keysquare-docker-(version)
./setup.sh
Must have tar and openssl installed
Run the setup.sh script from the keysquare-baseline-(version) directory that was extracted:
cd keysquare-baseline-(version)
./setup.sh
Example Output
- Container
- Bare-metal
Setup output
./setup.sh
██╗ ██╗███████╗██╗ ██╗███████╗ ██████╗ ██╗ ██╗ █████╗ ██████╗ ███████╗
██║ ██╔╝██╔════╝╚██╗ ██╔╝██╔════╝██╔═══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝
█████╔╝ █████╗ ╚████╔╝ ███████╗██║ ██║██║ ██║███████║██████╔╝█████╗
██╔═██╗ ██╔══╝ ╚██╔╝ ╚════██║██║▄▄ ██║██║ ██║██╔══██║██╔══██╗██╔══╝
██║ ██╗███████╗ ██║ ███████║╚██████╔╝╚██████╔╝██║ ██║██║ ██║███████╗
╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝ ╚══▀▀═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝
=== KeySquare Docker Platform Setup ===
Version: 1.1.3
=== SETUP PROFILE ===
Base directory
KeySquare home base: apps, runtime files, config, logs, and working data live here.
Base directory [~/keysquare]:
-> ~/keysquare
----------------------------------------
Host name
Lower-case KeySquare identity for this server, used for host-specific config and process definitions.
Host name [kstest01]:
-> kstest01
----------------------------------------
Host instance
Numeric instance id for process names on this host. Use 1 unless this host runs multiple platform instances.
Host instance [1]:
-> 1
----------------------------------------
Created setup profile: $HOME/.config/keysquare/keysquare.properties
=== KEYSQUARE APP SETUP ===
[done] Loading available Docker images (5s)
Docker Compose package:
PACKAGE INSTALLED BUNDLE
---------------------------- ---------------- ----------------
docker not installed 1.1.3
Docker image archive:
IMAGE INSTALLED AVAILABLE VERSION STATUS
-------------------------------- ---------------- ---------------- --------------
key-access not loaded 1.1.3 load (yes)
key-ui not loaded 1.1.3 load (yes)
keysquare-proxy not loaded 1.1.3 load (yes)
ks-quest not loaded 1.1.3 load (yes)
sequencer not loaded 1.1.3 load (yes)
relay-live not loaded 1.1.3 load (yes)
relay-cache not loaded 1.1.3 load (yes)
web-data-server not loaded 1.1.3 load (yes)
ks-ingress-controller not loaded 1.1.3 load (yes)
ks-grafana not loaded 1.1.3 load (yes)
aeron-media-driver not loaded 1.1.3 load (yes)
monitor not loaded 1.1.3 load (yes)
Load all available Docker images [Y/n]:
Preparing Docker package files in $HOME/keysquare...
[done] Copying Docker image archive (0s)
Installed bin/docker-env.sh
Installed bin/ks-platform.sh
Preparing Docker Compose app in $HOME/keysquare/apps/docker/1.1.3...
Installed apps/docker/1.1.3/docker-compose-platform.yaml
Linked apps/docker/latest -> 1.1.3
[done] Loading Docker images (8s)
Loaded image: gitea.keysquare.trading/keysquare/ks-grafana:1.1.3
Loaded image: gitea.keysquare.trading/keysquare/ks-quest:1.1.3
Loaded image: gitea.keysquare.trading/keysquare/aeron-media-driver:1.1.3
Loaded image: gitea.keysquare.trading/keysquare/sequencer:1.1.3
Loaded image: gitea.keysquare.trading/keysquare/relay-live:1.1.3
Loaded image: gitea.keysquare.trading/keysquare/relay-cache:1.1.3
Loaded image: gitea.keysquare.trading/keysquare/monitor:1.1.3
Loaded image: gitea.keysquare.trading/keysquare/key-access:1.1.3
Loaded image: gitea.keysquare.trading/keysquare/key-ui:1.1.3
Loaded image: gitea.keysquare.trading/keysquare/web-data-server:1.1.3
Loaded image: gitea.keysquare.trading/keysquare/keysquare-proxy:1.1.3
Loaded image: gitea.keysquare.trading/keysquare/ks-ingress-controller:1.1.3
Removed staged Docker image archive: $HOME/keysquare/keysquare.tar.gz
=== CONFIG + FILE STRUCTURE SETUP ===
Added conf/db.properties
Added conf/logback-app.xml
Added conf/net.properties
Added conf/secrets.properties
Added certs/README.md
Licence key: test-licence
Installed licence file: $HOME/keysquare/conf/licence.key
Created platform host config: $HOME/keysquare/conf/kstest01.properties
=== PLATFORM NETWORK ADDRESSES ===
Review the shared addresses used by platform services. Press Enter to keep each current value.
Important: Each IP address must end with an odd-numbered final octet.
Sequencer input address
IP address applications use to send messages for sequencing.
Sequencer input address [224.0.0.1]:
-> 224.0.0.1
Kept sequencer input address.
----------------------------------------
Sequencer output address
IP address applications use to receive sequenced messages.
Sequencer output address [224.0.0.3]:
-> 224.0.0.3
Kept sequencer output address.
----------------------------------------
Key access discovery address
IP address key access servers use to discover cluster peers.
Key access discovery address [224.0.0.5]:
-> 224.0.0.5
Kept key access discovery address.
----------------------------------------
=== OVERRIDE DEFAULT PLATFORM SECRETS ===
Fresh KeySquare install detected. An Admin UI password is required.
All other platform secrets will be generated automatically.
Admin UI password
Password for signing in to the KeySquare Admin UI.
Enter Admin UI password:
Re-enter Admin UI password:
Admin UI password saved.
----------------------------------------
Generating key access service key... done
Generating key access cluster token... done
Generating Grafana admin password... done
Generating QuestDB HTTP password... done
Generating QuestDB Postgres password... done
Important: If another platform will use this key access cluster,
KS_KEY_ACCESS_CLUSTER_TOKEN must have the same value on every platform.
Platform secrets are stored in:
$HOME/keysquare/conf/secrets.properties
Edit this file to update them later.
=== Docker Setup Complete ===
Base: $HOME/keysquare
Docker app: $HOME/keysquare/apps/docker/latest
Config: $HOME/keysquare/conf
Platform secrets: $HOME/keysquare/conf/secrets.properties
Licence file: $HOME/keysquare/conf/licence.key
Setup profile: $HOME/.config/keysquare/keysquare.properties
Platform host config: $HOME/keysquare/conf/kstest01.properties
Logs: $HOME/keysquare/var/logs
Next steps:
1. Review config under $HOME/keysquare/conf
2. Start platform: $HOME/keysquare/bin/ks-platform.sh start
Would you like to launch the platform [Y/n]:
HOSTNAME: [kstest01]
KS_HOSTNAME: [kstest01]
KS_HOST_INSTANCE: [1]
USER_UID: [314200022]
USER_GID: [976]
REGISTRY: [gitea.keysquare.trading/keysquare]
KS_HOME: [$HOME/keysquare]
DOCKER_APP_DIR: [$HOME/keysquare/apps/docker/latest]
DOCKER_PROJECT_DIR: [$HOME/keysquare]
DOCKER_ENV_SOURCE_FILE: [$HOME/keysquare/apps/docker/latest/docker-compose-platform.yaml]
File exists: $HOME/keysquare/conf/net.properties
File exists: $HOME/keysquare/conf/secrets.properties
File exists: $HOME/keysquare/conf/db.properties
File exists: $HOME/keysquare/conf/kstest01.properties
Executing: docker compose --project-directory $HOME/keysquare --profile all --env-file $HOME/keysquare/conf/net.properties --env-file $HOME/keysquare/conf/secrets.properties --env-file $HOME/keysquare/conf/db.properties --env-file $HOME/keysquare/conf/kstest01.properties -f $HOME/keysquare/apps/docker/latest/docker-compose-platform.yaml -p keysquare up -d
[+] up 12/12
✔ Container aeron-media-driver Started 0.6s
✔ Container ks-quest Healthy 28.1s
✔ Container ks-ingress-controller Started 0.6s
✔ Container ks-grafana Started 28.0s
✔ Container key-access Started 28.0s
✔ Container sequencer Started 28.1s
✔ Container relay-live Healthy 40.1s
✔ Container relay-cache Healthy 40.1s
✔ Container monitor Healthy 42.6s
✔ Container keysquare-proxy Started 42.7s
✔ Container web-data-server Healthy 49.2s
✔ Container key-ui Started 49.2s
[done] Waiting for web entrypoint at http://kstest01:6500/ (4s)
============================================================
You're up and running here: http://kstest01:6500/
Sign in as admin using the Admin UI password configured during setup.
============================================================Setup output
./setup.sh
██╗ ██╗███████╗██╗ ██╗███████╗ ██████╗ ██╗ ██╗ █████╗ ██████╗ ███████╗
██║ ██╔╝██╔════╝╚██╗ ██╔╝██╔════╝██╔═══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝
█████╔╝ █████╗ ╚████╔╝ ███████╗██║ ██║██║ ██║███████║██████╔╝█████╗
██╔═██╗ ██╔══╝ ╚██╔╝ ╚════██║██║▄▄ ██║██║ ██║██╔══██║██╔══██╗██╔══╝
██║ ██╗███████╗ ██║ ███████║╚██████╔╝╚██████╔╝██║ ██║██║ ██║███████╗
╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝ ╚══▀▀═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝
=== KeySquare Platform Setup ===
Version: 1.1.3
=== SETUP PROFILE ===
Base directory
KeySquare home base: apps, runtime files, config, logs, and working data live here.
Base directory [~/keysquare]:
-> ~/keysquare
----------------------------------------
Host name
Lower-case KeySquare identity for this server, used for host-specific config and process definitions.
Host name [kstest01]:
-> kstest01
----------------------------------------
Host instance
Numeric instance id for process names on this host. Use 1 unless this host runs multiple platform instances.
Host instance [1]:
-> 1
----------------------------------------
Created setup profile: $HOME/.config/keysquare/keysquare.properties
=== KEYSQUARE APP SETUP ===
[done] Loading available app packages (2s)
Core platform package:
PACKAGE INSTALLED BUNDLE
---------------------------- ---------------- ----------------
platform-manager not installed 1.1.3
platform-manager-tui not installed 1.1.3
Package-managed file handling:
- conf defaults are added only when missing; existing config files are kept.
- var state directories are created when missing; existing state files are not copied over.
Staged app packages:
APP INSTALLED AVAILABLE VERSION STATUS
---------------------------- ---------------- ---------------- --------------
aeron-media-driver not installed 1.1.3 install (no)
key-access not installed 1.1.3 install (no)
keysquare-proxy not installed 1.1.3 install (no)
key-ui not installed 1.1.3 install (no)
ks-grafana not installed 1.1.3 install (no)
ks-ingress-controller not installed 1.1.3 install (no)
ks-quest not installed 1.1.3 install (no)
monitor not installed 1.1.3 install (no)
relay-cache not installed 1.1.3 install (no)
relay-live not installed 1.1.3 install (no)
sequencer not installed 1.1.3 install (no)
web-data-server not installed 1.1.3 install (no)
[done] Updating Platform Manager 1.1.3 (0s)
[done] Updating Platform Manager TUI 1.1.3 (0s)
Available app packages:
- aeron-media-driver 1.1.3
- key-access 1.1.3
- keysquare-proxy 1.1.3
- key-ui 1.1.3
- ks-grafana 1.1.3
- ks-ingress-controller 1.1.3
- ks-quest 1.1.3
- monitor 1.1.3
- relay-cache 1.1.3
- relay-live 1.1.3
- sequencer 1.1.3
- web-data-server 1.1.3
Install all available app packages [Y/n]:
[done] Installing aeron-media-driver 1.1.3 (0s)
[done] Installing key-access 1.1.3 (1s)
[done] Installing keysquare-proxy 1.1.3 (0s)
[done] Installing key-ui 1.1.3 (1s)
[done] Installing ks-grafana 1.1.3 (5s)
[done] Installing ks-ingress-controller 1.1.3 (0s)
[done] Installing ks-quest 1.1.3 (0s)
[done] Installing monitor 1.1.3 (0s)
[done] Installing relay-cache 1.1.3 (1s)
[done] Installing relay-live 1.1.3 (0s)
[done] Installing sequencer 1.1.3 (0s)
[done] Installing web-data-server 1.1.3 (1s)
=== CONFIG + FILE STRUCTURE SETUP ===
Preparing package-managed platform files in $HOME/keysquare...
Ensuring var directories... done
Added conf/db.properties
Added conf/logback-app.xml
Added conf/net.properties
Added conf/secrets.properties
Added conf/sequencer-1.properties
Added conf/sequencer-2.properties
Added conf/sequencer-3.properties
Files copied successfully
[done] Installing bundled runtime 1.1.3 (4s)
Licence key: test-licence
Installed licence file: $HOME/keysquare/conf/licence.key
Created platform host config: $HOME/keysquare/conf/kstest01.properties
Generated Platform Manager API token: $HOME/keysquare/conf/pm-token
Registered selected apps with Platform Manager: $HOME/keysquare/conf/kstest01.properties
=== PLATFORM NETWORK ADDRESSES ===
Review the shared addresses used by platform services. Press Enter to keep each current value.
Important: Each IP address must end with an odd-numbered final octet.
Sequencer input address
IP address applications use to send messages for sequencing.
Sequencer input address [224.0.0.1]:
-> 224.0.0.1
Kept sequencer input address.
----------------------------------------
Sequencer output address
IP address applications use to receive sequenced messages.
Sequencer output address [224.0.0.3]:
-> 224.0.0.3
Kept sequencer output address.
----------------------------------------
Key access discovery address
IP address key access servers use to discover cluster peers.
Key access discovery address [224.0.0.5]:
-> 224.0.0.5
Kept key access discovery address.
----------------------------------------
=== OVERRIDE DEFAULT PLATFORM SECRETS ===
Fresh KeySquare install detected. An Admin UI password is required.
All other platform secrets will be generated automatically.
Admin UI password
Password for signing in to the KeySquare Admin UI.
Enter Admin UI password:
Re-enter Admin UI password:
Admin UI password saved.
----------------------------------------
Generating key access service key... done
Generating key access cluster token... done
Generating Grafana admin password... done
Generating QuestDB HTTP password... done
Generating QuestDB Postgres password... done
Important: If another platform will use this key access cluster,
KS_KEY_ACCESS_CLUSTER_TOKEN must have the same value on every platform.
Platform secrets are stored in:
$HOME/keysquare/conf/secrets.properties
Edit this file to update them later.
=== Installation Complete ===
KS_HOME: $HOME/keysquare
Config: $HOME/keysquare/conf
Platform secrets: $HOME/keysquare/conf/secrets.properties
Licence file: $HOME/keysquare/conf/licence.key
Setup profile: $HOME/.config/keysquare/keysquare.properties
Platform host config: $HOME/keysquare/conf/kstest01.properties
Next steps:
1. Review config under $HOME/keysquare/conf
2. Start platform: $HOME/keysquare/bin/ks-platform.sh start
3. Launch TUI: $HOME/keysquare/bin/ks-platform.sh tui
Would you like to launch the platform [Y/n]:
[done] Launching KeySquare platform (3s)
Included definition: $HOME/keysquare/conf/process/aeron-media-driver-kstest01.proc-def.yaml
Included definition: $HOME/keysquare/conf/process/key-access-1-kstest01.proc-def.yaml
Included definition: $HOME/keysquare/conf/process/keysquare-proxy-1-kstest01.proc-def.yaml
Included definition: $HOME/keysquare/conf/process/key-ui-kstest01.proc-def.yaml
Included definition: $HOME/keysquare/conf/process/ks-grafana-kstest01.proc-def.yaml
Included definition: $HOME/keysquare/conf/process/ks-ingress-controller-kstest01.proc-def.yaml
Included definition: $HOME/keysquare/conf/process/ks-quest-kstest01.proc-def.yaml
Included definition: $HOME/keysquare/conf/process/monitor-1-kstest01.proc-def.yaml
Included definition: $HOME/keysquare/conf/process/relay-cache-1-kstest01.proc-def.yaml
Included definition: $HOME/keysquare/conf/process/relay-live-1-kstest01.proc-def.yaml
Included definition: $HOME/keysquare/conf/process/sequencer-1-kstest01.proc-def.yaml
Included definition: $HOME/keysquare/conf/process/web-data-server-1-kstest01.proc-def.yaml
Wrote platform-manager include file: $HOME/keysquare/conf/platform-manager/kstest01.proc-defs.yaml
Component platform-manager-1 is running with PID 1322668
Platform Manager REST API is healthy.
Managed process autostart is handled by Platform Manager bootstrap.
[done] Waiting for web entrypoint at http://kstest01:6500/ (35s)
============================================================
You're up and running here: http://kstest01:6500/
Sign in as admin using the Admin UI password configured during setup.
============================================================Running Your Platform
From the keysquare/bin directory, use ks-platform.sh.
Start the platform:
./ks-platform.sh start
Stop the platform:
./ks-platform.sh stop
Restart the platform:
./ks-platform.sh restart
Get Status of the platform:
./ks-platform.sh status
- Container
- Bare-metal
Pass Compose service names as one comma-separated argument to manage only those services:
./ks-platform.sh status sequencer,monitor
./ks-platform.sh restart sequencer,monitor
./ks-platform.sh remove sequencer,monitor
For a host-specific Compose file, put host-file before the optional service list:
./ks-platform.sh start host-file sequencer,monitor
./ks-platform.sh config host-file
remove stops and removes containers without removing their volumes. config host-file prints the resolved Compose
configuration.
Pass Platform Manager process names as one comma-separated argument to manage only those processes:
./ks-platform.sh status sequencer,monitor
./ks-platform.sh stop sequencer,monitor
./ks-platform.sh start sequencer,monitor
./ks-platform.sh restart sequencer,monitor
Use the names shown by the unfiltered status command. Platform Manager must already be running and remains running
for selected-process operations.
Open the Platform Manager TUI
The Platform Manager TUI gives you a live view of your bare-metal KeySquare host. It shows managed processes, health and provides the ability to start/stop applications.
./ks-platform.sh tui

Next Steps
Configuration can be found in the keysquare/conf directory.
See the Deployment Guide and Configurations for more information.
Ready to build your first application?
Learn how to do so in the language of your choice: