ibkr-docker icon indicating copy to clipboard operation
ibkr-docker copied to clipboard

TWS Gateway Config UI does not show restrat

Open AliMoeen opened this issue 10 months ago • 1 comments

Hello,

I am planning to config TWS Gateway such that it asks for MFA only once a week.

I deploy the ibkr container with the following docker compose file:

services:
  ibkr:
    container_name: ibkr_live
    image: ghcr.io/extrange/ibkr:10.30.1t
    ports:
      - "6070:6080" # noVNC browser access
      - "7888:8888" # API access
    ulimits:
      nofile: 10000
    environment:
      USERNAME: ${USERNAME_1}
      PASSWORD: ${PASSWORD}
      TZ: America/New_York
      GATEWAY_OR_TWS: gateway
      IBC_TradingMode: live
      IBC_ReadOnlyApi: 'yes'
      IBC_AcceptNonBrokerageAccountWarning: 'yes'
      TWOFA_TIMEOUT_ACTION: restart
    restart: unless-stopped  # Options: no, always, on-failure, unless-stopped


Please note the TWOFA_TIMEOUT_ACTION: restart env variable

However, in the UI when I go to Auto Logoff timer, I see Auto Restart is not selected:

Image

I wonder if I missed anything or this is how it should be.

AliMoeen avatar Feb 09 '25 19:02 AliMoeen

I happened to see this while searching for other issues.

Use IBC_TWOFA_TIMEOUT_ACTION to replace TWOFA_TIMEOUT_ACTION as it'll pass the variables to TWS and Gateway.

mikelhsia avatar Mar 12 '25 03:03 mikelhsia

Just to addon - @AliMoeen I think the parameter you are looking for is AutoRestartTime (docs):

services:
  ibkr:
    # ...omitted
    environment:
      # ...omitted
      GATEWAY_OR_TWS: tws
      IBC_TradingMode: paper
      IBC_ReadOnlyApi: "no"
      IBC_ReloginAfterSecondFactorAuthenticationTimeout: yes
      IBC_AutoRestartTime: 07:00 AM
      TWOFA_TIMEOUT_ACTION: restart

Image

extrange avatar May 23 '25 02:05 extrange