antequant / ib-gateway-docker

Interactive Brokers Gateway as a Docker image
https://hub.docker.com/repository/docker/antequantmirror/ib-gateway-docker
MIT License
53 stars 35 forks source link
docker-image ib-gateway interactive-brokers tws vnc

ib-gateway-docker

This builds a Docker image with the latest version of Interactive Brokers' IB Gateway, the modern IbcAlpha/IBC for automation, and a VNC server for debugging purposes.

Currently, the API is only enabled in read-only mode, for testing purposes.

Building

docker build . -t ib-gateway-docker

Running

docker run -p 4002:4002 -p 5900:5900 \
    --env TWSUSERID=YOUR_USER_ID \
    --env TWSPASSWORD=YOUR_PASSWORD \
    ib-gateway-docker:latest

This will expose port 4002 for the TWS API (usable with, e.g., ib_insync) and 5900 for VNC (with default password 1358). Neither are secure for public internet access, as the expectation is that private, secure services will sit on top and be the only open interface to the internet.