Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/hummingbot/hummingbot/llms.txt

Use this file to discover all available pages before exploring further.

Gateway runs as a separate service alongside Hummingbot. The easiest way to install both is using Docker Compose.

Prerequisites

Before installing Gateway, ensure you have:
  • Docker installed and running
  • Docker Compose installed
  • At least 4GB of available RAM
  • A wallet with private keys for the chains you want to trade on
Gateway requires access to blockchain nodes via RPC endpoints. Ensure you have reliable RPC access for your target chains, either through public endpoints or your own node infrastructure.

Installation with Hummingbot

The simplest way to install Gateway is during the Hummingbot setup process.

Step 1: Clone the Repository

Clone the Hummingbot repository:
git clone https://github.com/hummingbot/hummingbot.git
cd hummingbot

Step 2: Run Setup with Gateway

Run the setup script and answer y when prompted to include Gateway:
make setup
You’ll see the following prompt:
Include Gateway? [y/N]
Type y and press Enter to include Gateway in your deployment.
The setup script will automatically configure the docker-compose.yml file to include both Hummingbot and Gateway services.

Step 3: Deploy the Containers

Start both Hummingbot and Gateway:
make deploy
This command will:
  • Pull the latest Hummingbot and Gateway Docker images
  • Create necessary configuration directories
  • Start both containers
  • Set up networking between Hummingbot and Gateway

Step 4: Attach to Hummingbot

Once the containers are running, attach to the Hummingbot client:
docker attach hummingbot

Verifying the Installation

After installation, verify that Gateway is running correctly:
1

Check Gateway Status

In the Hummingbot client, run:
gateway status
You should see output indicating Gateway is online and connected.
2

List Available Connectors

Check which Gateway connectors are available:
gateway list
This displays all supported chains and DEX protocols.
3

Test Connection

Test connectivity to a specific chain:
gateway test-connection ethereum

Development vs Production Modes

Gateway can run in two different modes:

Development Mode

By default, Gateway starts in development mode with these characteristics:
  • Protocol: Unencrypted HTTP
  • Port: 15888
  • Authentication: None
  • Certificates: Not required
Development mode is not secure and should only be used for testing on local networks. Your wallet private keys are accessible via unencrypted HTTP requests.
When to use:
  • Local development and testing
  • Learning how Gateway works
  • Running on trusted local networks

Switching to Production Mode

To enable production mode with HTTPS:
1

Generate Certificates

From within Hummingbot, generate SSL certificates:
gateway generate-certs
This creates the necessary certificate files in the certs/ directory.
2

Set Environment Variable

Stop the containers and set the DEV flag to false:
docker-compose down
export DEV=false
docker-compose up -d
3

Verify HTTPS Mode

Restart Hummingbot and verify Gateway is using HTTPS:
gateway status
The status should indicate HTTPS connectivity.
The generate-certs command creates:
  • ca_cert.pem - Certificate Authority certificate
  • client_cert.pem - Client certificate
  • client_key.pem - Client private key
These files are automatically used when Gateway runs in production mode.

Manual Installation

If you need to install Gateway separately or from source:

Install from Source

# Clone the Gateway repository
git clone https://github.com/hummingbot/gateway.git
cd gateway

# Install dependencies
yarn install

# Build the project
yarn build

# Start Gateway
yarn start

Docker Standalone

Run Gateway as a standalone Docker container:
docker run -d \
  --name gateway \
  -p 15888:15888 \
  -v $(pwd)/conf:/home/gateway/conf \
  -v $(pwd)/certs:/home/gateway/certs \
  hummingbot/gateway:latest

Directory Structure

After installation, Gateway uses the following directory structure:
hummingbot/
├── conf/
│   └── connectors/          # Connector configurations
├── certs/                   # SSL certificates (production mode)
│   ├── ca_cert.pem
│   ├── client_cert.pem
│   └── client_key.pem
├── logs/
│   └── gateway_logs/        # Gateway log files
└── docker-compose.yml       # Docker configuration

Updating Gateway

To update to the latest Gateway version:
# Stop containers
docker-compose down

# Pull latest images
docker-compose pull

# Restart containers
docker-compose up -d

Troubleshooting

Check that the Gateway container is running:
docker ps | grep gateway
View Gateway logs:
docker logs gateway
Verify network connectivity between containers:
docker network inspect hummingbot_default
This usually indicates:
  • Gateway container is not running
  • Port 15888 is blocked or already in use
  • Firewall rules blocking communication
Verify the port is accessible:
curl http://localhost:15888
Ensure certificates were generated correctly:
ls -la certs/
You should see ca_cert.pem, client_cert.pem, and client_key.pem.If missing, regenerate:
gateway generate-certs
Gateway requires adequate resources. Increase Docker memory allocation:
  • Docker Desktop: Settings → Resources → Memory (minimum 4GB)
  • Linux: Modify Docker daemon settings
Monitor resource usage:
docker stats gateway

Next Steps

Configuration

Configure wallets, chains, and connectors

Supported Chains

View all available blockchains and DEXs

CLI Commands

Learn Gateway-related CLI commands

AMM Arbitrage Strategy

Start trading on DEXs