|
| 1 | +# Overview |
| 2 | + |
| 3 | +Docker Compose for TON (The Open Network) liteserver nodes. |
| 4 | + |
| 5 | +`cp default.env .env`, then `nano .env` and adjust values for the right network (mainnet/testnet), particularly `GLOBAL_CONFIG_URL` and `SNAPSHOT`. |
| 6 | + |
| 7 | +Meant to be used with [central-proxy-docker](https://github.com/CryptoManufaktur-io/central-proxy-docker) for traefik and Prometheus remote write; use `:ext-network.yml` in `COMPOSE_FILE` inside `.env` in that case. |
| 8 | + |
| 9 | +`./ethd install` brings in docker-ce, if you don't have Docker installed already. |
| 10 | + |
| 11 | +`cp default.env .env` |
| 12 | + |
| 13 | +`nano .env` and adjust variables, particularly `GLOBAL_CONFIG_URL` and `SNAPSHOT` |
| 14 | + |
| 15 | +`./ethd up` |
| 16 | + |
| 17 | +To update the software, run `./ethd update` and then `./ethd up` |
| 18 | + |
| 19 | +Initial sync: ~10 hours (~4-5 hours with snapshot). |
| 20 | + |
| 21 | +# Configuration |
| 22 | + |
| 23 | +## Mainnet |
| 24 | + |
| 25 | +Basic setup: |
| 26 | +```properties |
| 27 | +TON_BRANCH=mainnet |
| 28 | +GLOBAL_CONFIG_URL=https://ton.org/global.config.json |
| 29 | +SNAPSHOT=latest |
| 30 | +``` |
| 31 | + |
| 32 | +With HTTP API (Traefik): |
| 33 | +```properties |
| 34 | +COMPOSE_FILE=ton.yml:ton-http-api.yml |
| 35 | +``` |
| 36 | + |
| 37 | +With HTTP API (direct port): |
| 38 | +```properties |
| 39 | +COMPOSE_FILE=ton.yml:ton-http-api.yml:ton-http-api-shared.yml |
| 40 | +TON_API_HTTP_PORT=8081 |
| 41 | +``` |
| 42 | + |
| 43 | +With local RPC access: |
| 44 | +```properties |
| 45 | +COMPOSE_FILE=ton.yml:ton-shared.yml |
| 46 | +``` |
| 47 | + |
| 48 | +## Testnet |
| 49 | + |
| 50 | +```properties |
| 51 | +TON_BRANCH=testnet |
| 52 | +GLOBAL_CONFIG_URL=https://ton.org/testnet-global.config.json |
| 53 | +SNAPSHOT=latest_testnet |
| 54 | +``` |
| 55 | + |
| 56 | +## HTTP API |
| 57 | + |
| 58 | +Test endpoints: |
| 59 | +```bash |
| 60 | +# masterchain info |
| 61 | +curl -H 'Content-Type: application/json' \ |
| 62 | + -d '{"jsonrpc":"2.0","id":1,"method":"getMasterchainInfo","params":[]}' \ |
| 63 | + http://localhost:8081 |
| 64 | + |
| 65 | +# health check |
| 66 | +curl http://localhost:8081/healthcheck |
| 67 | +``` |
| 68 | + |
| 69 | +# Operations |
| 70 | + |
| 71 | +## Check Sync Status |
| 72 | +```bash |
| 73 | +./scripts/check-sync.sh |
| 74 | +``` |
| 75 | +Exit codes: 0=synced, 1=syncing, 2=error |
| 76 | + |
| 77 | +## Monitor Logs |
| 78 | +```bash |
| 79 | +./ethd logs -f ton |
| 80 | +``` |
| 81 | + |
| 82 | +## Node Status |
| 83 | +```bash |
| 84 | +docker compose exec ton mytonctrl |
| 85 | +MyTonCtrl> status |
| 86 | +``` |
| 87 | + |
| 88 | +# Hardware Requirements |
| 89 | + |
| 90 | +**Mainnet:** |
| 91 | +- 16 cores, 64GB RAM |
| 92 | +- 1TB SSD/NVMe (~250GB used, grows over time) |
| 93 | +- 1 Gbps, 10TB+ monthly traffic |
| 94 | + |
| 95 | +**Testnet:** Similar, ~100GB storage |
| 96 | + |
| 97 | +# Ports |
| 98 | + |
| 99 | +Default ports (customizable in `.env`): |
| 100 | +- `VALIDATOR_PORT` (30001/udp) - P2P networking |
| 101 | +- `LITESERVER_PORT` (30003/tcp) - Liteserver connections |
| 102 | +- `VALIDATOR_CONSOLE_PORT` (30002/tcp) - Console access |
| 103 | + |
| 104 | +Public IP auto-detected on startup. Override with `PUBLIC_IP` in `.env` if needed. |
| 105 | + |
| 106 | +# Customization |
| 107 | + |
| 108 | +Use `custom.yml` to override any settings (not tracked by git). Add to `COMPOSE_FILE` in `.env`. |
| 109 | + |
| 110 | +See `default.env` for all options. |
| 111 | + |
| 112 | +## Version |
| 113 | + |
| 114 | +This is TON Docker v1.0.0 |
0 commit comments