Black Friday: Save 10% for life on all of our VPS plans, now through Cyber Monday

10% off on selected plans for as long as you keep the service · new orders · up to 10 uses per customer · ends Dec 1, 2026, 12:00 AM EST.

See plans
Guideschevron_rightServers

Servers · 8 min read · Updated

How to Run a Freqtrade Crypto Trading Bot on a VPS

To run Freqtrade on a VPS, install Docker on Ubuntu, download Freqtrade's docker-compose.yml, create the user folder and a config with its create-userdir and new-config commands, then start it with docker compose up -d. Backtest the strategy, run it in dry-run before using real money, keep FreqUI on 127.0.0.1:8080 behind an SSH tunnel, and give the exchange key trading rights only.

1. Install Docker and Freqtrade

On Ubuntu 24.04, after securing the server and installing Docker:

mkdir ft_userdata && cd ft_userdata
curl https://raw.githubusercontent.com/freqtrade/freqtrade/stable/docker-compose.yml -o docker-compose.yml
docker compose pull
docker compose run --rm freqtrade create-userdir --userdir user_data
docker compose run --rm freqtrade new-config --config user_data/config.json

new-config asks a series of questions: the exchange, the stake currency and amount, whether to start in dry-run (answer yes), and whether to turn on FreqUI and Telegram. The answers end up in user_data/config.json, which you can edit later.

2. Backtest First

Download history and test the strategy against it before it touches an exchange. With the sample strategy Freqtrade ships as an example:

docker compose run --rm freqtrade download-data --pairs ETH/BTC --exchange binance --days 5 -t 1h
docker compose run --rm freqtrade backtesting --config user_data/config.json --strategy SampleStrategy -i 5m

SampleStrategy is a demonstration, not a strategy to trade. Put your own in user_data/strategies/ and test it over several market conditions, not one good month.

3. Run in Dry-Run

docker compose up -d
docker compose logs -f

In dry-run the bot trades with simulated money against live prices. Freqtrade's docs say to always start this way and to run it for some time before risking real money. Its database and logs are in user_data/. After changing the config, apply it with docker compose up -d --force-recreate.

4. Keep FreqUI Private

FreqUI controls the bot, so whoever reaches it can trade your account. In config.json, the API server listens on all addresses inside the container, while Docker publishes it only to the server itself:

"api_server": {
    "enabled": true,
    "listen_ip_address": "0.0.0.0",
    "listen_port": 8080,
    "jwt_secret_key": "a-long-random-value",
    "username": "you",
    "password": "a-long-unique-password"
}

Check that docker-compose.yml maps the port as "127.0.0.1:8080:8080", never "8080:8080", which the docs warn makes the bot controllable by anyone who finds the port. Generate the secret with python3 -c "import secrets; print(secrets.token_hex())". Then, from your own computer:

ssh -L 8080:127.0.0.1:8080 [email protected]
# then open http://localhost:8080

FreqUI has no HTTPS of its own; the tunnel encrypts it. For a phone, WireGuard or the Telegram bot are the easier ways in.

5. Lock Down the Exchange Key

  • Trading only: create the API key with permission to read and trade, and never to withdraw. A leaked trading-only key cannot move your funds off the exchange.
  • Restrict it to the server's IP: most exchanges let you allow a key only from given addresses. Your VPS keeps the same IP address, so a key locked to it is useless anywhere else.
  • Keep the config private: config.json holds the key and secret; do not commit it to a public repository or paste it into a support chat.

When you do switch to live trading, change dry_run to false, start with a small stake, and watch the first trades closely.

Updates and Backups

cd ~/ft_userdata
docker compose pull
docker compose up -d

Back up user_data/ (config, strategies and the trade database) with Borg to a storage box. For market making rather than strategies, see Hummingbot. Running MetaTrader rather than crypto? See keeping MetaTrader running on a Windows VPS.

Common Questions

  • What is Freqtrade?

    A free, open-source crypto trading bot written in Python. It runs a strategy you write or choose against an exchange, and includes backtesting, dry-run (paper trading), a web interface called FreqUI, and Telegram control.

  • How big a server does Freqtrade need?

    Its documentation recommends a Linux cloud server with at least 2 GB of memory, 1 GB of disk and 2 vCPUs. Backtesting long periods or many pairs, and machine-learning strategies, want more of each.

  • Why a VPS rather than my own computer?

    A bot only trades while it runs, and a VPS is on all the time with a fixed IP address you can lock exchange keys to. Freqtrade's own docs also advise against Docker on Windows for production, because the container's clock drifts and exchanges then reject requests.

  • Does Virteche give trading advice?

    No. We provide the server. The strategy, the exchange account and the results are yours; Freqtrade's documentation itself says not to risk money you are afraid to lose.

Plans and prices

VPS Plans

KVM servers with NVMe storage, a fixed IP address and full root access.

See all plans
  • Bronze

    3 vCPU · 6 GB RAM · 75 GB NVMe

    2 TB transfer

    $37.50/mo

    Configure inAshburnDallas
  • Silver

    4 vCPU · 8 GB RAM · 100 GB NVMe

    4 TB transfer

    $46.50/mo

    Configure inAshburnDallas
  • Gold

    6 vCPU · 12 GB RAM · 150 GB NVMe

    6 TB transfer

    $60.00/mo

    Configure inAshburnDallas
  • Diamond

    8 vCPU · 16 GB RAM · 200 GB NVMe

    8 TB transfer

    $73.50/mo

    Configure inAshburnDallas

Network port: 10 Gbps in Ashburn, VA, 50 Gbps in Dallas, TX. Pick the location when you configure.

Keep Reading

All guides