-
Notifications
You must be signed in to change notification settings - Fork 129
Configuration
Copy .env.example to .env and edit it directly:
cp .env.example .envAll customizations go into .env. The file is well-commented — each section explains the available variables.
By default, .env.example contains pinned versions tested together. To fetch the latest compatible set automatically:
./update-versions.shThis updates the ANY_SYNC_*_VERSION variables in .env from the Anytype API. Re-run it whenever you want to upgrade.
By default, services bind to 127.0.0.1 (local-only). To expose them to external clients, set EXTERNAL_LISTEN_HOSTS in .env:
EXTERNAL_LISTEN_HOSTS="<yourExternalIp1> <yourExternalIp2>"
Multiple IPs are space-separated. Restart after changes:
make restartecho 'STORAGE_DIR=/path/to/your/directory' >> .env
make startmake stop
# transfer existing data
mv ./storage /path/to/your/directory
# update .env
sed -i 's|^STORAGE_DIR=.*|STORAGE_DIR=/path/to/your/directory|' .env
make startRetrieve the list of listening ports from .env:
grep 'ANY_SYNC_.*_PORT=' .envExample output:
ANY_SYNC_NODE_1_PORT=1001
ANY_SYNC_NODE_1_QUIC_PORT=1011
ANY_SYNC_NODE_2_PORT=1002
ANY_SYNC_NODE_2_QUIC_PORT=1012
ANY_SYNC_NODE_3_PORT=1003
ANY_SYNC_NODE_3_QUIC_PORT=1013
ANY_SYNC_COORDINATOR_PORT=1004
ANY_SYNC_COORDINATOR_QUIC_PORT=1014
ANY_SYNC_FILENODE_PORT=1005
ANY_SYNC_FILENODE_QUIC_PORT=1015
ANY_SYNC_CONSENSUSNODE_PORT=1006
ANY_SYNC_CONSENSUSNODE_QUIC_PORT=1016
- QUIC ports (ending in
_QUIC_PORT) use UDP. - Standard ports use TCP.
# TCP (YAMUX)
iptables -A INPUT -p tcp --dport 1001 -j ACCEPT
iptables -A INPUT -p tcp --dport 1002 -j ACCEPT
iptables -A INPUT -p tcp --dport 1003 -j ACCEPT
iptables -A INPUT -p tcp --dport 1004 -j ACCEPT
iptables -A INPUT -p tcp --dport 1005 -j ACCEPT
iptables -A INPUT -p tcp --dport 1006 -j ACCEPT
# UDP (QUIC)
iptables -A INPUT -p udp --dport 1011 -j ACCEPT
iptables -A INPUT -p udp --dport 1012 -j ACCEPT
iptables -A INPUT -p udp --dport 1013 -j ACCEPT
iptables -A INPUT -p udp --dport 1014 -j ACCEPT
iptables -A INPUT -p udp --dport 1015 -j ACCEPT
iptables -A INPUT -p udp --dport 1016 -j ACCEPTVerify with iptables -L. Adjust port numbers if you changed defaults in .env.
make down- Delete the lines "endpoint" and "forcePathStyle" from the any-sync-filenode config file.
- Specify your current AWS S3 region here.
- Set
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY, andMINIO_BUCKET(use your S3 bucket name) in.env. - Remove minio and create-bucket services from docker-compose.yml. Remove the dependency within any-sync-filenode service.
make start
Files uploaded to Anytype spaces will be stored in the bucket in encrypted form.
git clone https://github.com/anyproto/any-sync-dockercompose.git
cd any-sync-dockercompose/
mkdir -p storage/anyStorage/any-sync-node-{1..3} storage/any-sync-node-{1..3} storage/{minio,mongo-1,redis} storage/networkStore/{any-sync-consensusnode,any-sync-coordinator,any-sync-filenode,any-sync-node-1,any-sync-node-2,any-sync-node-3}make stop
chown -R $(id -u):$(id -g) storage/
# Append UID/GID to .env
cat <<EOF >> .env
UID=$(id -u)
GID=$(id -g)
EOF
# !!! WARNING !!! This will overwrite your docker-compose.override.yml file !!!
# If you're already using docker-compose.override.yml, merge the changes manually.
cat <<EOF > docker-compose.override.yml
x-defaults: &defaults
user: "\${UID}:\${GID}"
services:
generateconfig-anyconf:
<<: *defaults
generateconfig-processing:
<<: *defaults
mongo-1:
<<: *defaults
redis:
<<: *defaults
minio:
<<: *defaults
create-bucket:
<<: *defaults
any-sync-coordinator_bootstrap:
<<: *defaults
any-sync-coordinator:
<<: *defaults
any-sync-filenode:
<<: *defaults
any-sync-node-1:
<<: *defaults
any-sync-node-2:
<<: *defaults
any-sync-node-3:
<<: *defaults
any-sync-consensusnode:
<<: *defaults
netcheck:
<<: *defaults
EOF
make startThank you for your desire to develop Anytype together!
❤️ This project and everyone involved in it is governed by the Code of Conduct.
🧑<200d>💻 Check out our contributing guide to learn about asking questions, creating issues, or submitting pull requests.
🫢 For security findings, please email security@anytype.io and refer to our security guide for more information.
🤝 Follow us on Github and join the Contributors Community.
Made by Any — a Swiss association 🇨🇭
Licensed under MIT.