Your Interactive Brokers portfolio, kept current in self-hosted Ghostfolio.
Preview imports. Add new activities. Review corrections or enable a bounded profile.
Quick start · What it does · Safety · Configuration · Troubleshooting · Releases
Import IBKR trades, dividends, withholding tax and base-currency cash into self-hosted Ghostfolio. Run once or on a Docker schedule. Use one Ghostfolio target per IBKR account.
- Preview imports before you enable writes.
- Check identities, duplicates and holdings.
- Run on amd64 or arm64. Receive optional Apprise notifications.
- Review qualified one-to-one corrections, or enable a bounded reconciliation profile.
Options and FX trades are excluded. Handle corporate actions and older history manually. Unsafe BUY/SELL stay blocked. See limitations.
Read Flex reports and Ghostfolio activities. Map securities and check imports. Simulation shows the proposed result. Live mode imports activities and updates cash separately. A cash update does not prove that all activities were imported.
Follow First installation:
- Configure IBKR, Ghostfolio and mapping.
- Set the network and persistent state.
- Run simulation and review the result.
- Back up Ghostfolio. Enable imports, then scheduling.
You need Docker Compose, Git, Ghostfolio 2.248.0+, IBKR Flex credentials,
a Ghostfolio Security Token and a valid IANA TZ. Use one Flex query per account.
compose.yaml runs one account. For two accounts, use compose.multi-account.yaml. Existing two-service installs must switch files before updating. Follow the migration steps. Keep the project name, ENV and state paths. Do not remove orphans without review.
Use ghcr.io/flowcool/ghostfolio-ibkr-sync:latest for the stable image.
Pin @sha256:... for controlled upgrades. RC tags use vX.Y.Z-rc.N.
They never replace :latest.
Startup reports ghostfolio-ibkr-sync version X.Y.Z — commit <12-character SHA>.
The build sets this metadata. An RC can report the target version before release.
See GitHub Releases.
- Back up before the first import and significant upgrades. Image rollback does not undo writes.
DRY_RUNdefaults to simulation. Writes need an explicit false value and validTZ. Account, currency, mapping and evidence checks still apply.- Simulation reads services and maintains local evidence. It sends no financial writes.
- Keep
CORPORATE_ACTION_STATE_FILEin a private persistent directory. Initialize it in simulation. Review the inventory before live mode. Missing state, bad permissions or active holds can cause exit 1 in simulation. - Imports never delete activities. Corrections need exact-image qualification and explicit
yes. - Follow recovery after an uncertain write. Do not resend or delete state to clear a hold.
- Keep logs and tokens private. Keep credentials outside Git.
Use
docker compose config --quietto avoid printing secrets.
For blocked trades, read corporate-action safety. For corrections, read activity review.
- IBKR Flex fields
- Authentication and ENV
- Mapping
- Troubleshooting
- 3.0 upgrade and rollback
- 2.2 upgrade and rollback
- Maintenance · Older cleanup links
Use .env.example for Compose. See the ENV reference for all settings. Standalone Docker uses a separate ENV file.
Cycle result reports success, required action or failure.
Configured notifications repeat required actions after each completed run, including simulation.
Clean success sends no heartbeat.
Check imports, cash, holds and delivery separately.
sent confirms transport success, not device receipt.
See required actions,
delivery and
cycle results.
Include Corporate Actions in Flex, even when empty. The guide covers holds, state loss and evidence retention. Ordinary reports rotate after 30 days. Required safety evidence stays retained. Report windows cannot prove lifetime history. Manual acknowledgment cannot release a hold.
Follow the dated-evidence procedure. A date supplies evidence. It does not approve a financial write.
See native evidence and recovery. Native split evidence needs qualified Ghostfolio 3.91.0+. This does not authorize split writes or historical conversion.
- Flex covers at most 365 days. Reports update daily. Add older positions before newer sells need them.
- No options, FX trades or automatic corporate-action treatment.
- Account currencies must match. Cash is not converted.
- Holdings checks use net quantities, not chronological balances. A successful buy can remain after a later failure.
- No concurrent runs against one target account.
- Yahoo prices and metadata can be delayed or incomplete.
Read the full limits before recovery.
GitHub Releases contains release history and artifacts. Changelog links there too.
See Contributing for development, architecture and releases. Docker is the supported runtime. Local development requires Python 3.14+ with the pinned packages (CI and the container use Python 3.14).
Forked from obol89/ghostfolio-ibkr-sync. See LICENSE for the MIT NON-AI License and restrictions.