Skip to content

Instantly share code, notes, and snippets.

@ilyasst
Last active April 25, 2023 07:38
Show Gist options
  • Save ilyasst/548f837fd365ff2810387ab7e3d4259e to your computer and use it in GitHub Desktop.
Save ilyasst/548f837fd365ff2810387ab7e3d4259e to your computer and use it in GitHub Desktop.

Run freqtrade on your VM


Important

TA-lib requires 2Gb of RAM. You can either:

  1. Upgrade your VM to a 2Gb RAM VM
  2. Use this guide to create a SWAP file (virtual memory) on the VM's SSD that is at least 2Gb: https://www.vultr.com/docs/setup-swap-file-on-linux

In fresh Ubuntu 19.04 LTS Vultr VM, as root SSH.

We need python 3.6 and pip3, let's check that we have Python 3.6 and install pip3 247MB (python3 should be there by default, but not pip3):

sudo apt-get update
sudo apt-get install python3.6
sudo apt-get install python3-pip

We will also need venv otherwise the install will fail + a few others that should help with the install of the ones necessary for freqtrade:

sudo apt-get install python3-venv build-essential libssl-dev libffi-dev python3-dev

Let's get freqtrade:

git clone https://github.com/freqtrade/freqtrade.git
cd freqtrade
git checkout develop
./setup.sh --install

Wait ... Answer Y to all promps.

Run freqtrade: source .env/bin/activate; freqtrade trade

Additional ressources:

https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-18-04-server

@qkum
Copy link

qkum commented May 15, 2020

Hello dear Ilyasst, after successfully following these steps with the newest version of the bot. On a DigitalOcean 4 GB ram, 2 cores virtual machine, Ubunto 18.04. My strategy folder was empty. So the command "source .env/bin/activate; freqtrade trade" gives an error as result.

I have to find out how I import strategies to a headless virtual server now.

Btw the command to downloading ta.lib + the command to build it is missing.
So I used the raspberry pi script in confusing but it worked.

"sudo ./build_helpers/install_ta-lib.sh"

PS: Please upload a fully working virtual machine, with the newest version of the bot, like every 3 months. So people can use that when everything goes wrong and they dont got the technical knowledge or patience to fight to the bitter end for a solution.

When open-source stuff suddenly is broken, commands in the bot changed, broken docker images is provided, you are running headless suddenly and dont know the 25 commands to do it headless, so you try use VNC and shit that is outdated and dont work...and so on and so on. A working 3-month-old build would be a godsend. You can just update the bot very 3 months and re-upload the bot if it still works after that update + write the latest changes since the last version maybe. Easier and better for everybody than giving support to 1000+ people every month :)

Have a nice day my friend.

We are all greatly thankful for all the hard work you 2 put into it.

@pedropda11
Copy link

pedropda11 commented Jul 8, 2020

That's the idea! To learn by fixing the problems you encounter.

@DsiKorp
Copy link

DsiKorp commented Aug 11, 2022

Python 3.10.6 working

sudo apt-get update
sudo apt-get install python.pip
sudo apt-get install sqlite3
sudo apt install libsqlite3-dev
sudo apt install -y python3-pip python3-venv python3-dev python3-pandas git curl
sudo apt-get install make build-essential python3-dev
sudo apt-get install bzip2
sudo apt-get install libbz2-dev

cd Python-3.10.6/
./configure --enable-optimization
sudo make install or altinstall
sudo cp /usr/lib/python3.10/lib-dynload/_bz2.cpython-310-x86_64-linux-gnu.so /usr/local/lib/python3.10/

git clone https://github.com/freqtrade/freqtrade.git
cd freqtrade/
git checkout stable
./setup.sh -i
source .env/bin/activate
freqtrade create-userdir --userdir user_data
freqtrade new-config -c config.json
deactivate

Enjoy, DsiKorp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment