GUIDE · 7 MIN READ

Freqtrade guide: Docker setup, strategies, backtesting and dry-run

TopTradingBots editorial team · Published 18 Nov 2026 · Updated 18 Nov 2026 · Editorial policy

SHORT ANSWER

Freqtrade is a free, open-source crypto trading bot written in Python. You run it yourself, usually with Docker on a Linux server, write or pick a strategy as a Python class, backtest and tune it on historical data, then run it in dry-run mode with simulated money. Only after dry-run results hold up should you switch to live trading with a small amount and a withdrawal-disabled API key.

What Freqtrade is, and who it suits

The Freqtrade documentation describes it as “a free and open source crypto trading bot written in Python.” You download it, run it on your own machine or server, connect it to an exchange, and control it through Telegram or a web interface called FreqUI. Around that core it bundles historical data download, backtesting, parameter optimization (“hyperopt”), a simulated dry-run mode and live trading.

Two lines from the same page set the tone: the software “is for educational purposes only,” and “USE THE SOFTWARE AT YOUR OWN RISK.” Nobody runs the bot for you, and nobody refunds a bad order.

Freqtrade suits you if you can read Python, are comfortable with a command line and a server, and want full control over strategy logic. If you would rather pick settings in a web app, a hosted platform is a better fit. Our Freqtrade review has the facts in one place. If you are still choosing between open-source projects, see the best open-source trading bots ranking. And if you have not yet decided whether to code at all, how to build a trading bot compares no-code, Python and AI-assisted routes. This guide picks up once you have chosen Freqtrade.

What it costs to run Freqtrade

The software is free under the GPL-3.0 license (see our review). The real costs sit elsewhere:

Cost What drives it
Bot license None
Server Only if the bot runs 24/7 away from your computer
Exchange fees Every entry and exit, set by your exchange and tier
Your time Writing, testing and monitoring strategies

Server. The docs recommend a Linux cloud instance with at least 2GB RAM, 1GB disk space and 2 vCPUs. As one example of current pricing, DigitalOcean’s droplet pricing page lists a Basic droplet with 2 GiB RAM and 2 vCPUs at $18.00/month. That is a reference point, not a recommendation; any provider meeting the minimum works.

Exchange fees. These usually cost more than the server. Our data lists spot maker/taker fees of 0.08%/0.10% at OKX and 0.40%/0.80% at Kraken for the base tier. Example: a strategy making 200 round trips a month with $500 per trade, at 0.10% per side, pays about $200 a month in fees. A strategy that trades often needs an edge larger than that just to break even. Our trading fees for bots guide and the bot fee calculator show how to run these numbers.

Installing Freqtrade with Docker

Docker is the route the docs recommend; a manual install needs Python 3.12 or newer. The Docker quickstart comes down to six steps:

  1. Create a working folder (the docs use ft_userdata) and download the project’s docker-compose.yml into it.
  2. Pull the image with docker compose pull.
  3. Create the user directory with the create-userdir command.
  4. Generate a config with the new-config command, which asks interactive questions, including whether to run dry-run or live.
  5. Copy your strategy into user_data/strategies/ and name its class in docker-compose.yml. Otherwise the bundled SampleStrategy runs.
  6. Start the bot in the background with docker compose up -d.

Logs go to user_data/logs/freqtrade.log and trades to an SQLite database in user_data. Two warnings from the quickstart are worth keeping. First, the docs do not recommend Docker on Windows for production; use it there for experiments and backtests, and run live bots on a Linux VPS. Second, “freqUI does not support https out of the box,” so on a VPS reach it through an SSH tunnel or VPN rather than opening the port to the internet. The REST API page adds: keep the listen address on 127.0.0.1, use a strong unique password, and change the jwt_secret_key to a random value.

The config settings to check first

new-config produces a working file, but the docs ask you to “verify that all options correspond to what you want.” The configuration page lists these as the ones that decide how much money is at work:

  • dry_run: defaults to true. Leave it there until you have tested.
  • dry_run_wallet: the simulated starting balance (default 1000). Set it to the amount you would actually trade.
  • stake_currency and stake_amount: the currency you trade from and the size of each trade. "unlimited" lets the bot use the full available balance.
  • max_open_trades: how many trades can be open at once. Together with stake amount, this caps your exposure.
  • tradable_balance_ratio: the share of the balance the bot may use (default 0.99).
  • minimal_roi, stoploss, trailing_stop, timeframe: can live in the strategy or the config, and config values override the strategy.
  • pairlists: which pairs the bot trades, from a static list or a filtered dynamic one.

Keys deserve their own rule. The docs say: “NEVER share your private configuration file or your exchange keys with anyone!” Keep the API key and secret in a separate private config file or in environment variables, so the main config can be shared or backed up safely. Our API key safety guide covers permissions; at minimum, disable withdrawals.

Freqtrade strategies: how they are built

A strategy is a Python class based on IStrategy, described on the strategy customization page. The new-strategy command creates one from a template. Three methods do the work:

  • populate_indicators() adds indicator columns to a pandas dataframe of candles.
  • populate_entry_trend() marks the candles where the bot should enter.
  • populate_exit_trend() marks where it should exit.

Class attributes set the risk rules: minimal_roi (the return at which a trade may close), stoploss, timeframe and startup_candle_count (how much history the indicators need before they are stable). The docs say setting a stop loss “is highly recommended to protect your capital from strong moves against you.”

The most common bug is lookahead. Backtesting hands the strategy the whole dataframe at once, so code that peeks at future candles “will perform well during backtesting” and then fails live. Strategies shared online, or drafted by an AI assistant, deserve a line-by-line read for exactly this. For strategy ideas and their trade-offs, see trading bot strategies.

Backtesting and hyperopt

Download data first with download-data, then run backtesting with your strategy’s class name. The backtesting page is frank about the limits: orders fill “at the requested price (no slippage)” as long as price is inside the candle, and the backtester cannot know how prices moved inside a candle (the --timeframe-detail option narrows this). Fees come from the exchange’s market info by default. The report includes maximum drawdown, the largest fall from a peak, which tells you more about the pain ahead than total profit does. Our backtesting guide covers out-of-sample testing and the other traps.

Hyperopt runs backtests over and over with different parameter values and keeps the combinations that score best on a loss function you choose (Sharpe, Sortino, Calmar and others). It uses the optuna library, ships in the Docker image, and is heavy: the docs warn it “will burn all your CPU cores” and is not supported on a Raspberry Pi. They also note that results rarely improve much beyond 500 to 1,000 epochs and that precision beyond three decimals “will usually result in overfitted results.” Treat hyperopt output as a hypothesis. Re-test it on a period it was not tuned on.

Dry-run, then going live safely

In dry-run, per the configuration docs, “the bot does not engage your money”: balances come from dry_run_wallet, orders are simulated and never posted, and API keys can stay empty. The backtesting docs say backtesting “will never replace running a strategy in dry-run mode,” so give dry-run several weeks of live market data. Our paper trading guide explains what simulated fills miss.

When you switch, the docs ask for a fresh database so dry-run trades do not mix with live statistics. Then set dry_run to false and add your keys. A sensible first live run:

  1. Spot only, no leverage.
  2. A small stake_amount and low max_open_trades, sized so a full stop-out of every open trade is affordable.
  3. An API key with trading only, restricted to your server’s IP, which the exchange notes strongly recommend.
  4. A dedicated exchange account or sub-account, because “Freqtrade assumes accounts to be dedicated to the bot.”
  5. Telegram alerts on, and a habit of comparing live fills with dry-run results.

Supported exchanges

The docs list spot support for Binance, BingX, Bitget, Bybit (and Bybit EU), Gate (and Gate EU), HTX, Hyperliquid, Kraken, MyOKX (OKX EEA) and OKX. Futures are supported on Binance, Bitget, Bybit, Gate, Hyperliquid, Kraken and OKX. The community has confirmed Bitvavo and KuCoin; other exchanges may work, but the docs “cannot guarantee they will work.”

The exchange notes contain details that can stop a bot. Binance blocks servers in Canada, Malaysia, the Netherlands and the United States, while US users of Binance.US must use the binanceus exchange ID. Binance futures need One-way and Single-Asset mode. OKX and KuCoin keys need a passphrase. Hyperliquid has no market orders. Kraken’s API returns only 720 historic candles, so backtests need trade data instead.

Whether an exchange accepts you is a separate question from whether Freqtrade supports it. Check your country on our exchanges hub and country pages before you create keys. Futures add liquidation risk on top of strategy risk, so test spot first.

FAQ

Is Freqtrade free?

Yes. The software is open source under the GPL-3.0 license and has no subscription or bot fee. You still pay the exchange's trading fees on every order and, if you run it around the clock, the cost of a server.

Do I need to know Python to use Freqtrade?

To write your own strategy, yes: a Freqtrade strategy is a Python class that builds indicators with pandas. You can run the bundled sample strategy without coding, but you should still be able to read a strategy before trusting it with money.

Is Freqtrade dry-run mode safe?

The docs say that in dry-run the bot does not engage your money: balances and orders are simulated and nothing is posted to the exchange. Dry-run fills are still estimates, so live results will differ.

Can Freqtrade trade futures?

Yes, on a shorter list of exchanges than spot. The docs list Binance, Bitget, Bybit, Gate, Hyperliquid, Kraken and OKX for futures. Futures add leverage and liquidation risk, so test spot first.

Can I run Freqtrade on Windows?

Docker on Windows works for experiments, data download and backtesting, but the Freqtrade docs do not recommend it for production and suggest a Linux VPS for reliable live trading.

Sources

Not financial advice. Trading bots do not remove market risk.