Running Locally

This guide covers running Botmarley on your local machine for day-to-day use.

Prerequisites

ToolPurpose
DockerRuns PostgreSQL in a container
Botmarley binaryDownloaded from GitHub Releases

See Installation for detailed setup instructions.

Starting Up

1. Start PostgreSQL

docker compose up -d postgres

This starts PostgreSQL on localhost:5433 with:

  • Database: botmarley
  • User: botmarley
  • Password: botmarley_dev

2. Start Botmarley

./server

The server will be available at http://localhost:3000.

The database schema is initialized automatically on first run. Tables are created if they do not already exist.

3. Stop Botmarley

Press Ctrl+C in the terminal to stop the server.

Configuration

Botmarley can be configured through environment variables or a settings.toml file. Environment variables take precedence.

Common Options

# Change the server port
PORT=8080 ./server

# Use a custom database
DATABASE_URL=postgresql://user:pass@localhost:5432/mydb ./server

# Increase log verbosity
RUST_LOG=debug ./server

See Environment Variables for the full list of options.

Database Management

To reset the database and start fresh:

docker compose down -v
docker compose up -d postgres

Warning

This destroys all data including accounts, trading sessions, and backtest results. Use with caution.

To stop PostgreSQL without deleting data:

docker compose down

Your data persists in data/postgres/ on disk and will be available when you start the container again.