Setup
Selecting a Version
Linux / MacOS (Docker)
The Docker build of Naxbot is the preferred way to run the application, as it is fully developed and extensively tested on x86-64 Linux. If you’re new to Docker, start by following the official install instructions for your chosen distribution.
Though you can install Docker Desktop on Windows under WSL and run Naxbot that way, it is recommended to instead use the native Windows build if you plan to use Naxbot only for experimentation and/or strategy development on your machine. If you then decide you want to run Naxbot full-time 24/7, you can easily migrate to a cheap Linux server.
Once you have Docker installed, you can load the Naxbot image by downloading it into a directory, and then running the following command:
docker load -i naxbot.x86_64-linux.tar.gzThis will then allow you to spin up a container using the following command:
docker run naxbot:latestHowever, if you plan to use Naxbot for more than just experimentation, you’ll likely want it to be running in a more
persistent manner. For this, docker compose is the recommended way to go. Begin by creating an empty folder, and
create a single file named docker-compose.yml in it. Inside, paste the following:
services:
naxbot:
image: 'naxbot:latest'
restart: always # this will restart naxbot even if your system restarts
ports:
- '9080:9080' # change the first number to whatever port you want to use on your machine
volumes:
- './data:/data' # this will create a directory named `data` next to your `docker-compose.yml` where naxbot will store its dataSave the file, and run the following command:
docker compose upNaxbot should start, generate a blueprint config file, then exit. Edit the config file to your liking using:
nano ./data/config.toml # or use vim, or any other terminal editorOnce you’ve done so and saved the file, run Naxbot again, this time in detached mode so it will start as a background process:
docker compose up -dNaxbot should now be starting up. You can verify this by running:
docker psIf you copy the container ID that docker ps shows you, and run the following:
docker logs -f [id]You will start tailing the logs Naxbot outputs. Run the command without the -f to just get access to the logs up until
that point.
Windows
Note that the Windows build is not recommended for production use, that is to say 24/7 bot activity, as it is not as extensively tested as the Linux build. However, it is perfectly fine for experimentation and strategy development.
Ensure you have the latest
Visual C++ Redistributable
installed on your machine. Then download Naxbot and simply run the included start.bat file.
You can also run the .exe directly, however the start.bat has a pause appended to it, ensuring that Naxbot’s
window will stay open even if the application exits, so you can look at the logs without having to open the log file.
Troubleshooting
Exchange is not defined
During startup, Naxbot queries all supported exchanges to ensure they are available and functional. If this query fails, affected exchanges will be left “undefined”. The query could fail for a number of reasons:
- exchange took too long to respond
- exchange has rate limited you
- exchange is not reachable / down for maintenance
- exchange has changed their API and is no longer compatible
- exchange requires authentication
- exchange is not accessible from your current location (geo-locked)
In the case of the exchange being slow, or temporarily unavailable / spotty due to maintenance, restarting the bot might fix the issue. In the case of the exchange having performed an update to their API, Naxbot will need to be updated in order to be able to continue communicating with the exchange.
Either way, if this doesn’t affect any of the exchanges you plan on using, you can safely ignore this error.
Cannot access the web interface (Windows)
On Windows PCs, Naxbot may fail to detect that a port is already being used by another application. The port 9080 may
be used by other applications already without you knowing, in which case you can simply change the port that Naxbot
listens on within the config.toml file (see below) and see if this fixes the issue.
Configuration
Naxbot is mainly configured via the config.toml file that resides within the data directory.
Upon first launch of the bot, the file will be generated for you automatically with some default options. This page serves to elaborate further on the individual options.
General Settings
These are the settings that you can adjust within the general category.
-
listen_portThe port that the bot will listen on for incoming web connections.
-
backend_passwordThe password that will be required to access the bot’s web interface (clear text). Set this to something secure!
-
backend_secretAn autogenerated secret that is used to secure communications between your browser and the bot. You should not need to modify this manually.
-
trade_update_interval_secsThe interval at which the bot will update existing trades. If you notice that you’re getting rate limited by exchanges, you may have to increase this value.
-
max_klines_to_considerThe maximum number of klines (candles) to consider when fetching or evaluating data, regardless of time frame. Note that some exchanges may impose their own limitations on this number.
Exchange Settings
When generating a new config.toml file, it will be pre-filled with options for every exchange supported by Naxbot in
your region. An exchange can take in two possible parameters:
-
api_keyYour account’s API key on the exchange.
-
secret_keyYour account’s secret key on the exchange.
-
use_testnetWhether to (attempt to) use a testnet / sandbox connection for this exchange. Note that not all exchanges support sandbox mode, and enabling this for an exchange that does not support it will result in the exchange to fail loading.
Naxbot does not send your API or secret key to any third party. Your keys are stored locally on your machine and are solely used to authenticate with the exchange.
First Start
Upon starting the bot for the first time after amending the config.toml file to your needs, you will be able to access
the bot’s web interface. If you’ve left listen_port unchanged, you can access it at http://localhost:9080, otherwise
it will be available at http://localhost:[listen_port].
If you’re planning to run the bot on a server that is accessible from the web, feel free to consult the relevant guide in the advanced topics category.
That’s it! Next, it’s time to familiarize yourself with the bot interface and its capabilities.