Skip to content

Commit 9f4e270

Browse files
authored
Merge pull request #189 from anyproto/update-readme
upd README.md
2 parents c3071b3 + 3a78fcf commit 9f4e270

1 file changed

Lines changed: 97 additions & 33 deletions

File tree

README.md

Lines changed: 97 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,109 @@
1-
# Docker-compose for any-sync
2-
Self-host for any-sync, designed for personal usage or for review and testing purposes.
1+
# Docker Compose for any-sync
2+
3+
A self-hosted any-sync network, designed for personal use, review, or testing purposes.
34

45
> [!IMPORTANT]
5-
> This image is suitable for running your personal self-hosted any-sync network for home use.
6-
> If you plan to self-host a heavily used any-sync network, please consider using other options, such as a [Puppet](https://github.com/anyproto/puppet-anysync) or [Ansible](https://github.com/anyproto/ansible-anysync) module.
6+
> This setup is suitable for personal self-hosted any-sync networks.
7+
> For high-load production deployments, consider using the [Puppet](https://github.com/anyproto/puppet-anysync) or [Ansible](https://github.com/anyproto/ansible-anysync) modules.
78
89
> [!WARNING]
9-
> Before upgrading please read [Upgrade-Guide](../../wiki/Upgrade-Guide)
10+
> Before upgrading, read the [Upgrade Guide](../../wiki/Upgrade-Guide).
1011
11-
## Documentation
12-
All of the documentation for this repository is located in the [Wiki](../../wiki).
13-
Please visit the Wiki for comprehensive guides, installation instructions and more.
12+
## Requirements
13+
14+
- [Docker](https://docs.docker.com/compose/install/) with Compose plugin v2+
15+
- ~1 GB RAM available
16+
17+
## Architecture
18+
19+
The stack runs the following services:
20+
21+
| Service | Role | Depends on |
22+
|---|---|---|
23+
| `any-sync-coordinator` | Network coordinator, manages spaces and members | MongoDB |
24+
| `any-sync-node` ×3 | Document sync nodes | coordinator |
25+
| `any-sync-filenode` | File storage node | coordinator, MinIO, Redis |
26+
| `any-sync-consensusnode` | Consensus for conflict resolution | coordinator |
27+
| `netcheck` | Periodic connectivity health monitor | all nodes |
28+
| MongoDB | Coordinator state ||
29+
| Redis | Filenode index ||
30+
| MinIO | S3-compatible object storage for files ||
31+
32+
Optional service: `anytype-cli` (commented out in `docker-compose.yml`) — HTTP/gRPC API server for automation.
1433

1534
## Getting Started
16-
To get started, follow these steps:
17-
18-
1. **Install the necessary dependencies:**
19-
You need to install Docker and Docker Compose https://docs.docker.com/compose/install/
20-
2. **Clone the repository:**
21-
```bash
22-
git clone https://github.com/anyproto/any-sync-dockercompose.git
23-
```
24-
3. **Navigate to the project directory:**
25-
```bash
26-
cd any-sync-dockercompose
27-
```
28-
4. **Configuration:**
29-
For configuration, use the `.env.override` file.
30-
For example, setting an external IP for listening:
31-
```bash
32-
echo 'EXTERNAL_LISTEN_HOSTS="<yourExternalIp1> <yourExternalIp2>"' >> .env.override
33-
```
34-
More information can be found [here](../../wiki/Configuration).
35-
5. **Run the project:**
36-
```bash
37-
make start
38-
```
39-
40-
For detailed instructions, please refer to the [Usage Guide](../../wiki/Usage) in the Wiki.
35+
36+
1. **Clone the repository:**
37+
```bash
38+
git clone https://github.com/anyproto/any-sync-dockercompose.git
39+
cd any-sync-dockercompose
40+
```
41+
42+
2. **Configure** (optional — skip for local-only use):
43+
```bash
44+
# Expose to an external IP:
45+
echo 'EXTERNAL_LISTEN_HOSTS="<yourExternalIp>"' >> .env.override
46+
```
47+
See [Configuration](../../wiki/Configuration) for all options.
48+
49+
3. **Start:**
50+
```bash
51+
make start
52+
```
53+
On first run this generates configs in `./etc/` and starts all services.
54+
55+
4. **Connect Anytype client:**
56+
Upload `./etc/client.yml` to the Anytype app as your self-hosted network config.
57+
See [Anytype docs](https://doc.anytype.io/anytype-docs/data-and-security/self-hosting#switching-between-networks).
58+
59+
## Configuration
60+
61+
| File | Purpose |
62+
|---|---|
63+
| `.env.default` | Default values — **do not edit** |
64+
| `.env` | Generated file — **do not edit** |
65+
| `.env.override` | Your customizations — edit this |
66+
67+
Common overrides:
68+
69+
```bash
70+
# External IP(s) for clients outside localhost
71+
EXTERNAL_LISTEN_HOSTS="1.2.3.4"
72+
73+
# Custom storage path (default: ./storage)
74+
STORAGE_DIR="/mnt/data/any-sync"
75+
76+
# Per-daemon memory limit (default: 500M)
77+
ANY_SYNC_DAEMONS_MEMORY_LIMIT=1G
78+
```
79+
80+
Full reference: [Configuration Wiki](../../wiki/Configuration).
81+
82+
## Quick Reference
83+
84+
```bash
85+
make start # Generate config and start all services
86+
make stop # Stop services (data preserved)
87+
make restart # Stop and start again
88+
make logs # Follow logs from all services
89+
make pull # Pull latest Docker images
90+
make update # pull + restart (rolling update)
91+
make upgrade # ⚠️ Full reset: removes containers and volumes, then starts fresh
92+
make down # Stop and remove containers (data preserved)
93+
make clean # ⚠️ docker system prune --all --volumes (removes all Docker data)
94+
make cleanEtcStorage # Remove generated ./etc/ configs and ./storage/
95+
```
96+
97+
## Documentation
98+
99+
Full guides are in the [Wiki](../../wiki):
100+
- [Usage Guide](../../wiki/Usage)
101+
- [Configuration](../../wiki/Configuration)
102+
- [Upgrade Guide](../../wiki/Upgrade-Guide)
103+
- [Anytype CLI](../../wiki/Anytype-cli)
41104

42105
## Contribution
106+
43107
Thank you for your desire to develop Anytype together!
44108

45109
❤️ This project and everyone involved in it is governed by the [Code of Conduct](https://github.com/anyproto/.github/blob/main/docs/CODE_OF_CONDUCT.md).

0 commit comments

Comments
 (0)