Linux VPS Hosting

How to run HTS Enterprise on a Linux VPS/Server

Requirements

  • VPS running Ubuntu 20.04

  • 100GB disk space depending on the number of markets you want to support

  • 4 cores minimum, recommended 8+

Install docker

Execute the following commands to install docker.

Source: https://docs.docker.com/engine/install/ubuntu/

sudo apt remove docker docker-engine docker.io containerd runc
sudo apt update
sudo apt install ca-certificates curl gnupg lsb-release
sudo mkdir -m 0755 -p /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Test that the installation worked with: docker run hello-world

Configure SSH to be secure

If you're only using password authentication please be sure that password is very secure. Ideally you should be using public key authentication to ssh to this server.

To use public key authentication follow these steps:

mkdir -p ~/.ssh
cd ~/.ssh
ssh-keygen -m PEM -t rsa

We recommend naming the key haasonline_ent_id_rsa. You can use a passphase if you'd like to have passwordless authentication, but a password on your key is more secure.

Save the generated two files (haasonline_ent_id_rsa and haasonline_ent_id_rsa.pub) to your local machine. You can use Transmit or WinSCP to connect over SSH to transfer files.

Now you must copy the public key to your ~/.ssh/authorized_keys file:

touch ~/.ssh/authorized_keys
chmod -R go= ~/.ssh
cat ~/.ssh/haasonline_ent_id_rsa.pub >> ~/.ssh/authorized_keys

If you are on macOS or linux, you can update your local ssh config to use this key for this server. Just open ~/.ssh/config with your favorite editor and add a host for it:

Host the.ip.address.of.server
  User my_ssh_username
  IdentityFile ~/.ssh/haasonline_ent_id_rsa # Or update this path to where you saved it on your local machine.

Test that you are able to SSH to your server WITHOUT using your SSH password. Once you have confirmed this is working, you can disable password authentication:

sudo vim /etc/ssh/sshd_config

Find PasswordAuthentication and ensure no is next to it:

. . .
PasswordAuthentication no
. . .

Press escape, then type :wq and press enter to save the changes.

Now restart SSH so the changes are used:

sudo systemctl restart ssh

Install HTS Enterprise

wget https://www.haasonline.com/tradeserver4/DockerImage.zip
sudo apt install unzip
unzip DockerImage.zip
cd docker/hcdn
screen
docker compose up

To leave the screen you can press control+a d. To reconnect to the screen just type screen -r while SSHed to the server.

Tunnel to HTS enterprise to access locally

macOS or Linux

ssh -L 8090:127.0.0.1:8090 -L 8092:127.0.0.1:8092 user@yourserver

Windows

You can configure Putty to have tunnels. Simply edit the configuration and go to Connection -> SSH -> Tunnel.

You want to forward two ports:

  • 8090 to 8090

  • 8092 to 8092

You can now access HTS Enterprise on your local machine! Just navigate to http://127.0.0.1:8090

Last updated