Warning
Deprecated. Sure now has a native Redbark integration built in (since v0.7.3-alpha.6): paste your Redbark API key into Settings > Providers in Sure and it syncs your accounts directly, no container needed. See the setup guide.
This container still works and existing setups can keep running, but it won't get new features. If you migrate, stop this container's schedule before linking the same accounts natively, since the two use different dedup markers.
Automatically sync bank transactions from Redbark to your self-hosted Sure instance.
Ships as a single Docker image. Pull, configure, schedule, done.
- Fetches transactions from your Redbark account via API key
- Maps them to your Sure accounts
- Creates transactions in Sure via REST API with deduplication
- Safe to run repeatedly — duplicate transactions are never created
Note: Sure Sync runs independently of the Redbark web app. It pulls data via your API key and pushes directly to Sure. It won't appear as a destination or integration in the Redbark dashboard since it operates outside of Redbark's sync pipeline.
Supports all Redbark banking providers: Fiskil (AU), Akahu (NZ), SnapTrade (global).
- Log into Redbark
- Go to Settings > API Keys
- Create a key and copy it (shown once)
- Log into your Sure instance
- Go to Settings > Security > API Keys
- Create an API key with
read_writescope - Copy the key
# List your Redbark accounts
docker run --rm \
-e REDBARK_API_KEY=rbk_live_... \
ghcr.io/redbark-co/sure-sync:latest \
--list-redbark-accounts
# List your Sure accounts
docker run --rm \
-e SURE_URL=http://localhost:3000 \
-e SURE_API_KEY=your-sure-api-key \
ghcr.io/redbark-co/sure-sync:latest \
--list-sure-accountsREDBARK_API_KEY=rbk_live_a1b2c3d4e5f6...
SURE_URL=http://localhost:3000
SURE_API_KEY=your-sure-api-key
ACCOUNT_MAPPING=acc_abc123:d5e6f7g8-1234-5678-abcd-ef1234567890,acc_def456:a1b2c3d4-5678-9012-cdef-345678901234
TAG_NAME=Redbark# Preview first (no changes written)
docker run --rm --env-file .env ghcr.io/redbark-co/sure-sync:latest --dry-run
# Run for real
docker run --rm --env-file .env ghcr.io/redbark-co/sure-sync:latest# Cron: sync every 6 hours
0 */6 * * * docker run --rm --env-file /home/user/.redbark-sure-sync.env ghcr.io/redbark-co/sure-sync:latest >> /var/log/redbark-sure-sync.log 2>&1| Variable | Required | Default | Description |
|---|---|---|---|
REDBARK_API_KEY |
Yes | — | Your Redbark API key (rbk_live_...) |
SURE_URL |
Yes | — | URL of your Sure instance |
SURE_API_KEY |
Yes | — | Sure API key (read_write scope) |
ACCOUNT_MAPPING |
Yes | — | Account mapping (see below) |
REDBARK_API_URL |
No | https://api.redbark.com |
Redbark API base URL |
SYNC_DAYS |
No | 30 |
Number of days of history to sync |
CATEGORY_MAPPING |
No | — | Category mapping (see below) |
TAG_NAME |
No | — | Tag name to apply to synced transactions |
LOG_LEVEL |
No | info |
debug, info, warn, or error |
DRY_RUN |
No | false |
Set to true to preview without creating |
BATCH_SIZE |
No | 25 |
Transactions per batch (max 100) |
CURRENCY |
No | — | Override currency for all transactions (e.g. AUD) |
SYNC_INTERVAL |
No | — | Keep running and re-sync every N hours (e.g. 6) |
TIMEZONE |
No | system tz | IANA timezone for computing the sync window (e.g. Australia/Sydney) |
Maps Redbark account IDs to Sure account IDs (UUIDs), comma-separated:
ACCOUNT_MAPPING=<redbark_id>:<sure_id>,<redbark_id>:<sure_id>
Finding IDs:
- Redbark: Run
--list-redbark-accountsor check the Redbark dashboard - Sure: Run
--list-sure-accountsor check the account URL in Sure's web UI
Map Redbark categories to Sure category UUIDs:
CATEGORY_MAPPING=groceries:uuid1,transport:uuid2,dining:uuid3
Run --list-sure-categories to find your Sure category IDs.
| Flag | Description |
|---|---|
--list-redbark-accounts |
List Redbark accounts and their IDs |
--list-sure-accounts |
List Sure accounts and their IDs |
--list-sure-categories |
List Sure categories and their IDs |
--dry-run |
Preview what would be created without writing |
--days <n> |
Override number of days to sync |
--help |
Show help message |
docker run --rm \
--env-file .env \
ghcr.io/redbark-co/sure-sync:latestNo volume is needed — Sure sync is stateless (no local cache).
See docker-compose.example.yml for a ready-to-use setup that includes both this tool and a Sure instance with Postgres and Redis.
The container runs the sync once and exits. For recurring sync, either set SYNC_INTERVAL=6 in the environment (continuous mode, syncs every N hours) or schedule via cron:
0 */6 * * * docker compose run --rm redbark-sure-sync >> /var/log/redbark-sure-sync.log 2>&1apiVersion: batch/v1
kind: CronJob
metadata:
name: redbark-sure-sync
spec:
schedule: "0 */6 * * *"
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: sync
image: ghcr.io/redbark-co/sure-sync:latest
envFrom:
- secretRef:
name: redbark-sure-sync-secretsEach synced transaction is tagged with a machine-readable marker in the notes field:
[redbark:txn_abc123] | Category: groceries | MCC: 5411
On subsequent runs, the tool checks for duplicates using two methods:
- Exact match: Searches existing Sure transactions for
[redbark:<id>]in the notes field - Fingerprint match: Compares date + amount + name to catch manually imported transactions
This dual-layer approach means you can safely run the sync as often as you want.
| Code | Meaning |
|---|---|
| 0 | Sync completed successfully |
| 1 | Sync completed with errors (some transactions failed) |
| 2 | Configuration error (missing env vars, invalid mapping) |
| 3 | Connection error (cannot reach Redbark or Sure) |
- API keys: Your Redbark key is only sent over HTTPS. Your Sure key is sent to your own infrastructure. Never bake secrets into Docker images.
- Stateless: No local data storage. Transaction data exists only in memory during the run.
- Secrets: Use
--env-fileor orchestrator secrets (Kubernetes Secrets, Docker Secrets). Avoid-eflags which may persist in shell history.
# Install dependencies
pnpm install
# Run locally
pnpm dev -- --dry-run
# Type check
pnpm lint
# Run tests
pnpm test
# Build
pnpm buildMIT