LogoLogo
Back to HaasOnline.comSwitch to Developer API
4.x
4.x
  • Welcome
  • TradeServer Cloud
    • Overview
    • Security
    • Troubleshooting
  • TradeServer Enterprise
    • Overview
    • Updates
    • Security
    • Installation
      • Windows
      • MacOS
      • Linux
    • Configuration
      • License Key
      • Login credentials
      • Hosting
        • Linux VPS Hosting
    • Special features
      • Price history
      • Backups
      • Machine Learning
        • Built-in Machine Learning
        • Custom Machine Learning
      • Scripted Exchange API (Coming Soon)
      • Local API (Coming Soon)
    • Troubleshooting
  • Interface
    • General Interface
      • Left Menu
      • Upper Right Items
        • Account data
        • Execute trade
        • AI Chatbots
          • Chatbot Julia
          • Chatbot David
          • Chatbot Thomas
        • Notifications
        • Menu
          • Exchange accounts
          • Settings
          • License information
          • Change Logs
          • Logout
      • Status bar
        • Price tickers
    • Dashboard
    • Bots
      • Bot management
      • Bot templates
    • HaasScript
      • Web Editor
      • Backtest Lab
        • Lab test setup
      • Backtest History
      • Manage Scripts
      • Manage Signals
    • Tools
      • Marketview
      • Market intelligence
      • Exchange profiler
      • Markets explorer
      • News
    • Finance
      • Portfolio
      • External Wallet
  • Haasscript
    • About
      • Change Log
    • Tutorials
      • Bot building
        • Trade-bot building
        • Visual bot building
        • Scripted bot building
      • Usage
        • HaasScript
          • Interval
          • Markets
          • Input Fields
          • Memory Management
          • Signal Handling
          • Position Information
          • Positions Handling
            • Fee correction
          • Order Handling
          • Trading
          • Charting
          • Optimizations
        • Visual Editor
          • Blocks
          • Parameters
          • Flow Control
          • Interaction
        • Script Editor
          • Classes
        • Managed Trading
        • Unmanaged Trading
    • Commands
      • Trade Bots
        • TradeBot Containers
        • Easy Indicators
        • Easy Safeties
        • Easy Insurances
      • Helpers
        • Array Helpers
        • Custom Command Helpers
        • Enumerations
        • Equations
        • Mathematical
        • Memory Helpers
        • Signal Helpers
        • String Helpers
        • Miscellaneous
        • Technical Analysis Helpers
      • Input data
        • Bot Settings
        • Input fields
        • Price Market Information
        • Script Settings
        • Time Information
        • Trade Market Information
      • Prices
      • Technical Analysis
      • Charting
      • Trading
        • Managed Trade Commands
        • Unmanaged Trade Commands
        • Order Information
        • Order Handeling
        • Position Information
        • Position Price Information
        • Profit Information
        • Wallet Information
      • Social Media
    • Built-in Bots
      • Version 3 bots
        • C# Scripted Bot
        • Email bot
        • Trendline Bot
        • Triangle Arbitrage Bot
      • Accumulation Bot
      • Enhanced RSI bot
      • FlashCrash (Grid) Bot
      • Crypto Index Bot
      • Intellibot Alice
      • Inter Exchange Arbitrage Bot
      • MadHatter Bot
      • Market Making Bot
      • Order Bot
      • PingPong Bot
      • Scalper bot
      • Zone-Recovery Bot
    • Community Bots
      • Simple Grid Bot (SPOT)
      • Simple Grid Bot (FUTURES)
      • Simple Market Maker (SPOT)
      • Simple Market Maker (FUTURES)
  • Usage
    • First Usage
    • Setup Exchange
      • Adding an API to the Platform
      • Binance
      • Binance US
      • Bit2me
      • Bitfinex
      • Bitget
      • BitMEX
      • ❌Bitpanda
      • Bitstamp
      • ❌Bittrex
      • Bybit
      • ❌Cex.IO (Legacy API)
      • ❌Coinbase
      • ❌Crypto.com
      • Deribit
      • Gemini
      • Gleec
      • ❌HitBTC
      • Huobi
      • ❌Ionomy
      • Kraken
      • Kraken Futures
      • KuCoin
      • KuCoin Futures
      • LBank
      • ❌OKCoin
      • OKX
      • OKX-Futures
      • OKX-Swap
      • Phemex
      • Poloniex
      • Poloniex Futures
      • WooX
    • Setup Telegram Notification Bot
    • Setup Discord Notification Bot
    • Use Signals
  • Other Resources
    • YouTube
    • Guides & Tutorials
    • Questions & Answers
    • Community Projects
  • Need Help?
    • Ask on Discord
    • Submit Support Ticket
Powered by GitBook
On this page
  • How to run HTS Enterprise on a Linux VPS/Server
  • Requirements
  • Install docker
  • Configure SSH to be secure
  • Install HTS Enterprise
  • Tunnel to HTS enterprise to access locally
  • macOS or Linux
  • Windows

Was this helpful?

  1. TradeServer Enterprise
  2. Configuration
  3. Hosting

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

PreviousHostingNextSpecial features

Last updated 1 year ago

Was this helpful?