extrange / ibkr-docker

Run IBKR Gateway/TWS in a Docker container
157 stars 34 forks source link

Everything works fine on localhost, but not on my server #105

Closed AliMoeen closed 1 month ago

AliMoeen commented 1 month ago

I use the following docker file to run the image locally and it is working fine:


version: '3.8'

services:
  ibkr:
    image: ghcr.io/extrange/ibkr:latest
    ports:
      - "127.0.0.1:6080:6080"
      - "127.0.0.1:8888:8888"
    ulimits:
      nofile: 10000
    environment:
      USERNAME: ${USERNAME_1}
      PASSWORD: ${PASSWORD}
      GATEWAY_OR_TWS: gateway
      IBC_TradingMode: paper
      IBC_ReadOnlyApi: no
      IBC_AcceptNonBrokerageAccountWarning: yes

However, when I run the same setup on my home server, I can't access anything.

I did deploy a few test docker compose web apps to the same server and they are accessible in the home network, however, above docker compose ports are not accessible.

Do i need and special setup when I run the image on a servers other than local host?

extrange commented 1 month ago

Currently you are binding the ports only to localhost and they will not be accessible over the network.

You need to change the ports section to:

    ports:
      - "6080:6080"
      - "8888:8888"