Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Overview

- `any-sync-bundle` wraps the Anytype coordinator, consensus, filenode, and sync services into one binary (`lightnode/anynodes.go`).
- All services share the coordinators network stack: TCP 33010, QUIC/UDP 33020, one PeerID, one DRPC mux.
- All services share the coordinator's network stack: port 33010 (TCP and QUIC/UDP), one PeerID, one DRPC mux.
- The filenode uses `lightcmp/lightfilenodestore` (BadgerDB) instead of the upstream S3 implementation.
- External dependencies: MongoDB for coordinator/consensus, Redis for filenode. Sync node persists to AnyStore on disk.

Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ RUN --mount=type=cache,target=/go/pkg/mod/ \
#
FROM gcr.io/distroless/static-debian12 AS stage-release-minimal

# Bundle network ports
EXPOSE 33010
EXPOSE 33020/udp
# Bundle network ports (TCP and UDP on same port number)
EXPOSE 33010/tcp
EXPOSE 33010/udp

VOLUME /data

Expand All @@ -53,9 +53,9 @@ CMD ["start-bundle"]
#
FROM docker.io/redis/redis-stack-server:7.4.0-v7 AS stage-release-all-in-one

# Bundle network ports
EXPOSE 33010
EXPOSE 33020/udp
# Bundle network ports (TCP and UDP on same port number)
EXPOSE 33010/tcp
EXPOSE 33010/udp

VOLUME /data

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ Replace the external address (e.g., `192.168.100.9`) with an address or hostname
```sh
docker run \
-e ANY_SYNC_BUNDLE_INIT_EXTERNAL_ADDRS="192.168.100.9" \
-p 33010:33010 \
-p 33020:33020/udp \
-p 33010:33010/tcp \
-p 33010:33010/udp \
-v $(pwd)/data:/data \
ghcr.io/grishy/any-sync-bundle:1.0.0-2025-09-08
```
Expand All @@ -60,7 +60,7 @@ After the first run, point Anytype desktop/mobile apps at the generated client c
- **Easy to start**: A single command to launch the server
- **All-in-one option**: All services in a single container or in separate binaries
- **Lightweight**: No MinIO, and no duplicate logical services
- **Only 2 open ports**: TCP 33010 and UDP 33020 (configurable)
- **Only 1 port number**: 33010 (TCP and UDP, configurable)

## Who is this for?

Expand Down Expand Up @@ -313,7 +313,7 @@ Backup tips:
- Embedded MongoDB/Redis in AIO does not start:
- Check logs for "starting embedded MongoDB/Redis". If the data directories are corrupted, stop the container and **if you no need data**, remove `/data/mongo` or `/data/redis` before restarting.
- QUIC/UDP blocked:
- Open UDP 33020 on firewalls/NAT. Some environments block UDP by default.
- Open UDP 33010 on firewalls/NAT. Some environments block UDP by default.
- Advertise both hostname and IP in `ANY_SYNC_BUNDLE_INIT_EXTERNAL_ADDRS` for clients behind NAT. Anytype will select one of the addresses to connect to that works.
- Wrong external address after first run:
- Edit `./data/bundle-config.yml` → `externalAddr:` list, then restart the server. The new `client-config.yml` will be regenerated.
Expand Down
4 changes: 2 additions & 2 deletions compose.aio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ services:
container_name: any-sync-bundle-aio
restart: unless-stopped
ports:
- "33010:33010"
- "33020:33020/udp"
- "33010:33010/tcp"
- "33010:33010/udp"
volumes:
- ./data:/data
environment:
Expand Down
4 changes: 2 additions & 2 deletions compose.external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ services:
redis:
condition: service_healthy
ports:
- "33010:33010"
- "33020:33020/udp"
- "33010:33010/tcp"
- "33010:33010/udp"
volumes:
- ./data/bundle:/data
environment:
Expand Down
2 changes: 1 addition & 1 deletion config/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func newBundleConfig(cfg *CreateOptions) *Config {
Account: newAcc(netKey),
Network: NetworkConfig{
ListenTCPAddr: "0.0.0.0:33010",
ListenUDPAddr: "0.0.0.0:33020",
ListenUDPAddr: "0.0.0.0:33010",
},
Coordinator: CoordinatorConfig{
MongoConnect: cfg.MongoURI,
Expand Down
10 changes: 5 additions & 5 deletions config/bundle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ account:
signingKey: "test-signing-key"
network:
listenTCPAddr: "0.0.0.0:33010"
listenUDPAddr: "0.0.0.0:33020"
listenUDPAddr: "0.0.0.0:33010"
coordinator:
mongoConnect: "mongodb://localhost:27017/"
mongoDatabase: "coordinator"
Expand Down Expand Up @@ -65,7 +65,7 @@ account:
signingKey: "test-signing-key"
network:
listenTCPAddr: "0.0.0.0:33010"
listenUDPAddr: "0.0.0.0:33020"
listenUDPAddr: "0.0.0.0:33010"
coordinator:
mongoConnect: "mongodb://localhost:27017/"
mongoDatabase: "coordinator"
Expand Down Expand Up @@ -103,7 +103,7 @@ account:
signingKey: "test-signing-key"
network:
listenTCPAddr: "0.0.0.0:33010"
listenUDPAddr: "0.0.0.0:33020"
listenUDPAddr: "0.0.0.0:33010"
coordinator:
mongoConnect: "mongodb://localhost:27017/"
mongoDatabase: "coordinator"
Expand Down Expand Up @@ -141,7 +141,7 @@ account:
signingKey: "test-signing-key"
network:
listenTCPAddr: "0.0.0.0:33010"
listenUDPAddr: "0.0.0.0:33020"
listenUDPAddr: "0.0.0.0:33010"
coordinator:
mongoConnect: "mongodb://localhost:27017/"
mongoDatabase: "coordinator"
Expand Down Expand Up @@ -179,7 +179,7 @@ account:
signingKey: "test-signing-key"
network:
listenTCPAddr: "0.0.0.0:33010"
listenUDPAddr: "0.0.0.0:33020"
listenUDPAddr: "0.0.0.0:33010"
coordinator:
mongoConnect: "mongodb://localhost:27017/"
mongoDatabase: "coordinator"
Expand Down
2 changes: 1 addition & 1 deletion lightnode/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// Bundle holds all any-sync service applications with shared network infrastructure.
//
// Architecture:
// - Coordinator creates the network stack (TCP 33010, UDP 33020, DRPC mux, connection pool, etc.)
// - Coordinator creates the network stack (port 33010 TCP and UDP, DRPC mux, connection pool, etc.)
// - Other services (Consensus, FileNode, Sync) reuse coordinator's components.
type Bundle struct {
Coordinator *app.App
Expand Down
Loading