Architecture options
NOVOSKY can run on one machine or be split across two. The split is recommended because MT5 only runs on Windows, while the training stack runs best on Linux.- Option A — Single machine
- Option B — Two machines (recommended)
One Linux VPS handles everything: the MT5 API Docker container (via Wine), the trading bot, and weekly retraining.
Retraining on the minimum spec (CPU-only, 4 cores) takes ~2–2.5 h. With an NVIDIA GPU the full retrain drops to ~30–45 min. The trading bot itself uses under 300 MB RAM at runtime.Cloud equivalents: Hetzner CCX23 (€15/mo, 8 vCPU/16GB), DigitalOcean 8 GB Droplet ($48/mo), AWS t3.xlarge, Azure D4s v5.For GPU training: AWS g4dn.xlarge (T4, ~$0.50/h spot) or Hetzner GPU server.
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 4 cores | 8 cores |
| RAM | 6 GB | 8 GB |
| Disk | 40 GB SSD | 80 GB SSD |
| OS | Ubuntu 24.04 | Ubuntu 24.04 |
| Network | 50 Mbps stable | 100 Mbps stable |
| GPU | — | NVIDIA (any CUDA-capable) |
GPU note
Training uses a GPU when one is available via LightGBM’s CUDA backend and XGBoost’sdevice=cuda. Without a GPU, training falls back to CPU automatically — no configuration change needed.
| Setup | Retrain time (all 4 models) |
|---|---|
| CPU-only, 4 cores | ~2–2.5 hours |
| CPU-only, 8 cores | ~1–1.5 hours |
| NVIDIA GPU (T4 / RTX 3060+) | ~30–45 minutes |
If running on Azure or another hypervisor VM, GPU passthrough requires a specific VM type (e.g. Azure NC-series, not the default B/D/E series which have only virtual VGA). CPU-only is perfectly viable for weekly retraining.
MT5 REST API setup
The bot does not use the MetaTrader5 Python package. All broker communication goes through a self-hosted HTTP API running on port 6542.Install MetaTrader 5 on your Windows VM
Download and install MT5 from your broker’s website. Log in with your trading account credentials.
Pull and run the MT5 REST API container
<your_account_number>, <your_password>, <broker_server_name> with your MT5 credentials.
Set <choose_a_secret_token> to a long random string — this is the API_TOKEN in your .env on the Linux VM.If you are using a broker-provided hosted VPS with MT5 pre-installed, skip Docker and configure the API container to connect to the already-running MT5 terminal.
Linux VM setup
Process management (PM2)
PM2 keeps the trading bot running continuously and restarts it if it crashes (but not after a hard halt —sys.exit(99) is intentional).
ecosystem.config.js is pre-configured for trading.py. Edit it to set NODE_APP_INSTANCE or add environment overrides.