any-sync-bundlewraps the Anytype coordinator, consensus, filenode, and sync services into one binary (lightnode/anynodes.go).- All services share the coordinator's network stack: TCP 33010, QUIC/UDP 33020, one PeerID, one DRPC mux.
- The filenode supports two storage backends (auto-selected based on configuration):
- BadgerDB (default): Local embedded storage via
lightcmp/lightfilenodestore - S3 (optional): Cloud storage via upstream
s3storeimplementation
- BadgerDB (default): Local embedded storage via
- External dependencies: MongoDB for coordinator/consensus, Redis for filenode cache. Sync node persists to AnyStore on disk.
Config bootstrap (cmd/start.go):
- Load existing bundle YAML if present.
- Otherwise create one via
config.CreateWrite, injecting values from env/flags. - Always write the client config (
YamlClientConfig) to the target path.
- Coordinator starts first, then consensus, filenode, sync (
runBundleServices). extractSharedNetworkcopies network components from the coordinator into other apps.- DRPC routes by method prefix (
/CoordinatorService,/ConsensusService,/FileService,/SpaceSyncService). - Data layout (default
./data):bundle-config.yml– persisted configuration (credentials, keys)client-config.yml– generated client config (regenerated on start)storage/– local storage directory:network-store/– network configurationstorage-sync/– sync node persistence (AnyStore)storage-file/– filenode data (BadgerDB, when not using S3)
compose.dev.yml– development dependencies (MongoDB replica set + Redis Stack).compose.aio.yml– bundle image with embedded MongoDB/Redis.compose.external.yml– bundle image plus external MongoDB and Redis containers.compose.s3.yml– bundle with MinIO for S3 storage testing.compose.traefik.yml– Traefik reverse proxy example.
go build -o any-sync-bundle .
golangci-lint run --fix
go test -race -shuffle=on -vet=all -failfast ./...
go test -tags=integration ./integration/... # requires DockerUses testcontainers-go to spin up MongoDB, Redis, and MinIO containers.
Test files:
integration/containers.go– container lifecycle helpersintegration/bundle.go– bundle process managerintegration/integration_test.go– test cases