TutorialNov 7, 20264 min read

Run Freqtrade on a VPS: Docker Setup Step by Step

How to run the Freqtrade crypto trading bot 24/7 on a Linux VPS paid with crypto: which size, the Docker setup from the official quickstart, dry run first, and reaching FreqUI safely over an SSH tunnel.

Short answer: Freqtrade is a Python bot, so it runs on a cheap Linux VPS, not Windows. For live or dry-run trading a server with 2 GB RAM ($6.50 a month) is enough; if you also run backtests or hyperopt on it, take 2 vCPU and 6 GB RAM ($13). The setup below follows Freqtrade's own Docker quickstart and takes about ten minutes on a fresh Ubuntu or Debian server.

A trading bot on your laptop stops when the lid closes. On a VPS it runs day and night, close to the exchange, and you check on it from FreqUI, Telegram or SSH.

01Which Size

What you runPlanPrice
One bot, live or dry run1–2 vCPU, 2 GB RAM, 20 GB NVMe$6.50/month
Several bots, or backtesting now and then2 vCPU, 6 GB RAM, 40 GB NVMe$13/month
Regular hyperopt over long periods6 vCPU, 10 GB RAM$26/month

Live trading uses little CPU; backtesting and hyperopt use all of it while they run. The 1 GB plan is too tight once Docker and the market data are on it.

Nano1 vCPU · 1 GB · 10 GB NVMe$3.90/mobilled monthlyBuy
Most popularSpark1 vCPU · 2 GB · 20 GB NVMe$6.50/mobilled monthlyBuy
Pulse2 vCPU · 2 GB · 20 GB NVMe$6.50/mobilled monthlyBuy
Surge2 vCPU · 6 GB · 40 GB NVMe$13.00/mobilled monthlyBuy
Storm6 vCPU · 10 GB · 40 GB NVMe$26.00/mobilled monthlyBuy
Apex6 vCPU · 10 GB · 80 GB NVMe$39.00/mobilled monthlyBuy

Full root SSH access · NVMe storage · DDoS protection · No setup fee

02Which Location

Pick the location closest to your exchange's servers. Binance, Bybit and OKX are mostly reached through Tokyo, Singapore and Hong Kong, so Hong Kong is the usual pick for them; European exchanges are close to Amsterdam and Frankfurt. Trading Bot VPS: Which Location? has a script to measure it yourself. For a bot on 5-minute candles the difference rarely shows; it matters more for fast strategies.

03Install Docker

On a fresh server, logged in over SSH as root:

bash
apt update && apt upgrade -y
curl -fsSL https://get.docker.com | sh
adduser --disabled-password --gecos "" ft
usermod -aG docker ft
su - ft

Running the bot as its own user keeps it away from root.

04Set Up Freqtrade

These are the commands from Freqtrade's Docker quickstart:

  1. 1Make a folder: mkdir ft_userdata && cd ft_userdata
  2. 2Get the compose file: curl https://raw.githubusercontent.com/freqtrade/freqtrade/stable/docker-compose.yml -o docker-compose.yml
  3. 3Pull the image: docker compose pull
  4. 4Create the user folder: docker compose run --rm freqtrade create-userdir --userdir user_data
  5. 5Create a config: docker compose run --rm freqtrade new-config --config user_data/config.json. It asks for the exchange, stake currency, Telegram and FreqUI. Answer yes to dry run.
  6. 6Start it: docker compose up -d
  7. 7Watch the log: docker compose logs -f

The container restarts by itself after a crash or a server reboot, because the compose file sets a restart policy.

05Reach FreqUI Safely

FreqUI and the REST API listen on port 8080 and don't come with HTTPS. Don't open that port to the internet. Make sure the compose file maps it to localhost:

yaml
ports:
  - "127.0.0.1:8080:8080"

Then open a tunnel from your own computer and browse to http://localhost:8080:

bash
ssh -L 8080:127.0.0.1:8080 ft@your-server-ip

The Telegram integration is the other easy way to watch the bot: it needs no open port at all.

06Keep It Running Well

Restrict SSH

to your own IP with the firewall on your server page, and use a key instead of a password.

Update on purpose

docker compose pull && docker compose up -d gets the latest stable image; read the release notes first.

Back up user_data

Strategies, config and the trade database live there. Copy it off the server now and then.

Watch the disk

Downloaded candles grow over time; delete old pairs you don't trade.

07Paying for It

Sign up with an email or Telegram and pay with USDT, USDC, Bitcoin, Ethereum, Litecoin, Solana, BNB or Monero, no ID. The Linux VPS is ready a few minutes after the payment confirms. Running MetaTrader instead? That needs Windows: see MT4 and MT5 VPS.

Freqtrade's older docs list 2 GB as the minimum for a cloud server, and that's enough for live trading. Backtests and hyperopt want more, so take 6 GB if you run them on the same server.

  • freqtrade vps
  • freqtrade docker vps
  • run freqtrade 24/7
  • crypto trading bot server
  • freqtrade hosting
  • vps for freqtrade

Keep reading

All articles