Automatically sync your Traefik routes to Linkding bookmarks.
- Syncs all enabled Traefik HTTP routers to Linkding as bookmarks
- Automatic tagging of synced bookmarks
- Skip filter to ignore hosts matching a regex pattern
- Uses container labels (
homepage.name) for bookmark titles when available - Dry run mode for testing without making changes
- Health check endpoint for container orchestration
- Graceful shutdown handling
- Configurable sync interval
services:
linkding-traefik-sync:
image: ghcr.io/klowdo/linkding-traefik-sync:latest
environment:
LINKDING_URL: https://linkding.example.com
LINKDING_TOKEN: your_api_token
TRAEFIK_API_URL: http://traefik:8080
SYNC_INTERVAL: 300
BOOKMARK_TAGS: traefik,home-lab
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped| Variable | Required | Default | Description |
|---|---|---|---|
LINKDING_URL |
Yes | - | URL to your Linkding instance |
LINKDING_TOKEN |
Yes | - | Linkding API token |
TRAEFIK_API_URL |
Yes | - | URL to Traefik API (usually port 8080) |
SYNC_INTERVAL |
No | 300 |
Seconds between sync runs |
BOOKMARK_TAGS |
No | traefik,home-lab |
Comma-separated tags applied to bookmarks |
SKIP_PATTERN |
No | - | Regex pattern for hosts to skip |
SYNC_DRY_RUN |
No | false |
Log actions without making changes |
HEALTH_FILE |
No | /tmp/healthy |
Path to health check file |
- Log in to your Linkding instance
- Go to Settings > Integrations
- Generate a new API token
- Copy the token to your configuration
Add the following to your Traefik configuration:
api:
dashboard: true
insecure: trueOr via command line:
command:
- --api.dashboard=true
- --api.insecure=trueThe API will be available on port 8080 by default.
[2024-01-15T10:30:00+00:00] Linkding-Traefik Sync starting...
[2024-01-15T10:30:00+00:00] Traefik API: http://traefik:8080
[2024-01-15T10:30:00+00:00] Linkding URL: https://linkding.example.com
[2024-01-15T10:30:00+00:00] Sync interval: 300s
[2024-01-15T10:30:00+00:00] Bookmark tags: traefik,home-lab
[2024-01-15T10:30:00+00:00] Starting sync...
[2024-01-15T10:30:01+00:00] Added bookmark: https://app.example.com (title: My App)
[2024-01-15T10:30:01+00:00] Added bookmark: https://api.example.com (title: api.example.com)
[2024-01-15T10:30:01+00:00] Sync complete: 2 added, 0 skipped
To use container labels for bookmark titles, mount the Docker socket:
volumes:
- /var/run/docker.sock:/var/run/docker.sock:roThe sync will look for these labels in order:
homepage.name- Homepage dashboard integration label- Container name as fallback
MIT