Quick answer
How do I run a trading bot on a VPS?
To run a trading bot on a VPS, install Docker, pull the bot (Freqtrade here), create a config in dry-run mode, add exchange API keys without withdrawal rights and start it with docker compose up -d. A SaltVPS Flake server (4 GB RAM) keeps it online all day. No setup makes a strategy profitable.
In brief
- Why a VPS: the bot keeps running when your laptop sleeps or your home connection drops.
- Example bot: Freqtrade, free and open source, run in Docker.
- Start in dry-run: simulated trades with no real orders until you choose otherwise.
- API keys: trading rights only, never withdrawals, and restricted to the server IPv4 where the exchange allows it.
- Risk: a bot follows your rules faithfully, losses included.
How do you run a trading bot on a VPS with Freqtrade?
Docker must be installed first. These commands follow the Freqtrade Docker quickstart.
Make a project folder
Run
mkdir ft_userdataandcd ft_userdata.Get the Compose file
Run
curl https://raw.githubusercontent.com/freqtrade/freqtrade/stable/docker-compose.yml -o docker-compose.yml, thendocker compose pull.Create the user folder
Run
docker compose run --rm freqtrade create-userdir --userdir user_data.Create a config
Run
docker compose run --rm freqtrade new-config --config user_data/config.jsonand answer the questions. Keep dry-run on.Start the bot
Run
docker compose up -d. The container restarts on its own after a reboot.Watch the logs
Run
docker compose logs -fto follow what the bot does. Press Ctrl+C to stop reading; the bot keeps running.Open the web UI safely
FreqUI listens on 127.0.0.1:8080. From your computer, run
ssh -L 8080:127.0.0.1:8080 root@your-ip, then open http://127.0.0.1:8080.
Which settings matter most in a Freqtrade config?
A handful of keys in config.json decide whether the bot trades for real.
| Setting | What it does | Safe first value |
|---|---|---|
| dry_run | Simulates trades with no real orders | true |
| dry_run_wallet | Starting balance for the simulation | A small test amount |
| stake_amount | Amount placed per trade | A fixed small amount |
| max_open_trades | How many trades can be open at once | A low number, such as 3 |
| exchange.key / secret | Exchange API credentials | Empty in dry-run; trade-only keys later |
| api_server.listen_ip_address | Where the web UI listens | Keep 127.0.0.1 behind an SSH tunnel |
How do you keep exchange API keys safe on a VPS?
Create keys that can trade but never withdraw, and lock them to the server's address. Most exchanges let you untick withdrawals and enter allowed IP addresses. Every SaltVPS server has one dedicated IPv4, so that list stays one line long.
- Keep config.json readable by its owner only:
chmod 600 user_data/config.json. - Log in with an SSH key, not a password; the security guide lists the other steps.
- Rotate the keys at the exchange if you ever suspect the server was reached by someone else.
Which VPS is best for a trading bot?
A single Freqtrade bot is light; backtests and several bots at once want more RAM and CPU. SaltVPS checked its plan list on 16 November 2026: vCPU counts run from 1 on Grain to 12 on Dome, and the plan list matches Grain to a bot. Flake (1 vCPU / 4 GB / 80 GB, $4.50 a month on 12 months) gives Docker more room.
Pick a city near your exchange's servers if latency matters to your strategy; the six cities share one price. The trading bot VPS comparison weighs plans and cities, and the Docker guide comes first if Docker is not installed.
When should a bot leave dry-run mode?
Only after the strategy behaves as you expect in backtests and in a long dry run. Freqtrade's own documentation tells users not to risk money they are afraid to lose. A good backtest is no promise of future results. A bot can lose money fast in a market move it was never tested on.
Check the exchange's terms too. Some exchanges limit access by country, and the server's IP addresses are registered in the country of its city.
Trading bots on a VPS: questions
Can I run a trading bot on a VPS 24/7?
Yes. That is the main reason to use one. Docker restarts the container after a reboot, and the server stays up without your computer.
Is Freqtrade the best bot to run on a VPS?
It is one free, open-source option with good documentation. Hummingbot, OctoBot and Jesse are others; the same Docker approach applies.
Does SaltVPS allow trading bots?
Yes. Crypto mining is forbidden on SaltVPS servers, but a trading bot is not mining.
How do I update Freqtrade?
In the project folder, run docker compose pull, then docker compose up -d to restart on the new image.
Can I control the bot from my phone?
Freqtrade can send alerts and take commands through a Telegram bot you set up in config.json.
Verdict
- Running a trading bot on a VPS takes Docker, a dry-run config and trade-only keys.
- Keep the web UI behind an SSH tunnel and go live only after long testing.
Sources (3)
- Freqtrade with Docker quickstart — Freqtrade (2026-11-16)
- Freqtrade configuration — Freqtrade (2026-11-16)
- Freqtrade REST API and FreqUI — Freqtrade (2026-11-16)
Keep your bot online
Flake runs Docker and a bot comfortably, with a dedicated IPv4 for exchange allow-lists.
- Built by a person, 1 hour at most after confirmation
- Lost days credited back if a server cannot be delivered
- Pay in BTC, XMR, USDT, USDC, ETH, SOL or LTC
- DomaineGoat LLC · Panama