Freqtrade is an open source crypto trading bot written in Python: it applies your strategy on exchanges around the clock, in simulation or with real funds. To avoid missing a single candle, it has to run on a machine that is always on. This guide installs Freqtrade with Docker on a Linux VPS, from the first dry run to the web interface, with the security rules your API keys need.
1. Which VPS to choose
| Use | Configuration |
|---|---|
| One bot, dry run or live | 2 vCPU, 2 GB RAM |
| Several bots and the FreqUI interface | 2 vCPU, 4 GB |
| Long backtests and hyperopt | 4 vCPU, 8 GB and up |
Pick a recent Debian or Ubuntu. The VPS's fixed IP address will be used to restrict your API keys.
2. Install Docker
Logged in as root, install Docker with the official script, then check it:
curl -fsSL https://get.docker.com | sh
docker compose version
3. Get Freqtrade
Freqtrade provides a ready-to-use Docker Compose file:
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
The last command asks a few questions: exchange, stake currency, amount per trade. Answer yes to dry-run mode: the bot will use a simulated wallet.
4. Start the bot in dry-run
By default, the Compose file runs the example strategy SampleStrategy, copied into user_data/strategies. Start the bot in the background:
docker compose up -d
docker compose logs -f
The container restarts by itself after an error or a VPS reboot. To use your own strategy, put its file in user_data/strategies, replace SampleStrategy with its name in docker-compose.yml and run docker compose up -d again.
5. Test a strategy on historical data
Before letting a strategy run, even in simulation, measure how it behaved in the past:
docker compose run --rm freqtrade download-data --exchange binance -t 5m --days 90
docker compose run --rm freqtrade backtesting --strategy SampleStrategy -i 5m
Adjust the exchange and timeframe to your setup. A good past result guarantees nothing: beware of over-optimised strategies that fit the history and then fail.
6. The FreqUI interface, without exposing it
Enable the API server in user_data/config.json (the api_server block: enabled set to true, a username, a long password and a random jwt_secret_key). The Compose file only publishes the port on 127.0.0.1:8080, which is intended. From your computer, open an SSH tunnel:
ssh -L 8080:127.0.0.1:8080 root@VPS_IP
then open http://127.0.0.1:8080 in your browser. You can also receive alerts and control the bot from Telegram with the telegram block of the configuration.
7. Going live: API key security
- Create a dedicated key for the bot, with trading rights only. Never withdrawal rights.
- Restrict the key to the VPS IP address in the exchange settings: if stolen, it is useless elsewhere.
- Set
"dry_run": falseonly after several weeks of simulation consistent with the backtest, and start with a small amount. - Protect the server: SSH key login, firewall and regular updates.
- Check the exchange's terms for your country and for a server located in France: some restrict access by location.
8. Updating
docker compose pull
docker compose up -d
Read the release notes before a major update: a strategy may need adjusting.
Frequently asked questions
Which VPS for Freqtrade?
2 vCPU and 2 GB of RAM are enough for one bot. Allow 4 GB for several bots with FreqUI, and 8 GB with 4 vCPU for strategy optimisation.
Does Freqtrade run on Windows?
Yes, but the recommended installation uses Docker on Linux. A Linux VPS is simpler, lighter and cheaper than a Windows VPS for this use.
Can I run several bots on one VPS?
Yes, with one folder and one service per bot in the Compose file, each with its own configuration and a different API port.
Does dry-run mode use real funds?
No. In dry-run, Freqtrade follows the real market but places no orders: it simulates trades with a virtual wallet.










