Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
2d0d9fc
BCE-8698: Added ton docker
lipika-pal Feb 27, 2026
4fc4b2f
BCE-8698: ports updated to ton docker
lipika-pal Feb 27, 2026
b30d67f
BCE-8698: config updated for ton docker
lipika-pal Feb 27, 2026
05a2739
BCE-8698: config updated for ton docker
lipika-pal Mar 2, 2026
0f9f63d
BCE-8698: config updated for ton docker
lipika-pal Mar 2, 2026
622a799
BCE-8698: config updated for ton docker
lipika-pal Mar 2, 2026
d4b7dbf
BCE-8698: config updated for ton docker
lipika-pal Mar 2, 2026
fef4b46
BCE-8698: config updated for ton docker
lipika-pal Mar 2, 2026
ef6168b
BCE-8698: config updated for ton docker
lipika-pal Mar 2, 2026
df0e105
Remove .idea from repo and add to gitignore
lipika-pal Mar 2, 2026
6502afa
BCE-8698: config updated for ton docker
lipika-pal Mar 2, 2026
6303f2e
BCE-8698: config updated for ton docker
lipika-pal Mar 2, 2026
4c8e2a3
BCE-8698: config updated for ton docker
lipika-pal Mar 2, 2026
6e34083
BCE-8698: config updated for ton docker
lipika-pal Mar 2, 2026
4f11052
BCE-8698: config updated for ton docker
lipika-pal Mar 3, 2026
a77c094
BCE-8698: added ton http api and refactored ton node
lipika-pal Mar 4, 2026
f0a3613
BCE-8698: lint fixes
lipika-pal Mar 4, 2026
84a593d
BCE-8698: lint fixes
lipika-pal Mar 4, 2026
8c2a525
BCE-8698: lint fixes
lipika-pal Mar 4, 2026
28a5f01
BCE-8698: traefik labels added
lipika-pal Mar 5, 2026
f9392c8
BCE-8698: fix public ip detection
lipika-pal Mar 5, 2026
6a65b14
BCE-8698: fix snapshot
lipika-pal Mar 5, 2026
c60d138
BCE-8698: auto generate liteserver config for ton-http-api
lipika-pal Mar 5, 2026
8d224ef
BCE-8698: lint fixes
lipika-pal Mar 5, 2026
8a0f88f
BCE-8698: fixing ton-http-api liteserver config generation
lipika-pal Mar 5, 2026
29150e5
BCE-8698: fix ton http api
lipika-pal Mar 5, 2026
59c77c9
BCE-8698: added ethd check-sync command
lipika-pal Mar 5, 2026
85e9102
BCE-8698: updated ton-http-api checking ton node sync
lipika-pal Mar 5, 2026
990866b
BCE-8698: fixed sync check
lipika-pal Mar 5, 2026
68bc88a
BCE-8698: refactor
lipika-pal Mar 5, 2026
368fcf4
BCE-8698:fixed ton-http-api
lipika-pal Mar 6, 2026
0e10ef3
BCE-8698: refactored
lipika-pal Mar 6, 2026
279edfb
BCE-8698: check sync updated
lipika-pal Mar 6, 2026
bdc4899
BCE-8698: ton node and http-api updated
lipika-pal Mar 8, 2026
c417e4c
add screen to ethd start due to snapshot
galaxy-ggatheca Mar 10, 2026
5c113cc
BCE:8698: refactor ton http api to use volume based config sharing
lipika-pal Mar 10, 2026
3578646
BCE:8698: lint fix
lipika-pal Mar 10, 2026
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
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@
*.bak
*.original
custom.yml
.idea/
*.iml
*.ipr
*.iws
.vscode/
.DS_Store
*.log
*.tmp
tmp/
temp/
12 changes: 1 addition & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ repos:
- id: check-shebang-scripts-are-executable
- id: check-executables-have-shebangs
- id: detect-private-key
- id: check-ast
- id: debug-statements
- id: check-merge-conflict
- id: check-added-large-files
- id: mixed-line-ending
- id: check-case-conflict
- id: requirements-txt-fixer
- id: check-toml

- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
Expand All @@ -33,13 +29,7 @@ repos:
rev: v2.4.1
hooks:
- id: codespell

# Dockerfiles
# Disabled bcs macOS Docker might not be installed
# - repo: https://github.com/hadolint/hadolint
# rev: v2.13.1
# hooks:
# - id: hadolint-docker
args: ['-L', 'pyton']

# YAML style (beyond syntax)
- repo: https://github.com/adrienverge/yamllint
Expand Down
114 changes: 114 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Overview

Docker Compose for TON (The Open Network) liteserver nodes.

`cp default.env .env`, then `nano .env` and adjust values for the right network (mainnet/testnet), particularly `GLOBAL_CONFIG_URL` and `SNAPSHOT`.

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.

`./ethd install` brings in docker-ce, if you don't have Docker installed already.

`cp default.env .env`

`nano .env` and adjust variables, particularly `GLOBAL_CONFIG_URL` and `SNAPSHOT`

`./ethd up`

To update the software, run `./ethd update` and then `./ethd up`

Initial sync: ~10 hours (~4-5 hours with snapshot).

# Configuration

## Mainnet

Basic setup:
```properties
TON_BRANCH=mainnet
GLOBAL_CONFIG_URL=https://ton.org/global.config.json
SNAPSHOT=latest
```

With HTTP API (Traefik):
```properties
COMPOSE_FILE=ton.yml:ton-http-api.yml
```

With HTTP API (direct port):
```properties
COMPOSE_FILE=ton.yml:ton-http-api.yml:ton-http-api-shared.yml
TON_API_HTTP_PORT=8081
```

With local RPC access:
```properties
COMPOSE_FILE=ton.yml:ton-shared.yml
```

## Testnet

```properties
TON_BRANCH=testnet
GLOBAL_CONFIG_URL=https://ton.org/testnet-global.config.json
SNAPSHOT=latest_testnet
```

## HTTP API

Test endpoints:
```bash
# masterchain info
curl -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"getMasterchainInfo","params":[]}' \
http://localhost:8081

# health check
curl http://localhost:8081/healthcheck
```

# Operations

## Check Sync Status
```bash
./scripts/check-sync.sh
```
Exit codes: 0=synced, 1=syncing, 2=error

## Monitor Logs
```bash
./ethd logs -f ton
```

## Node Status
```bash
docker compose exec ton mytonctrl
MyTonCtrl> status
```

# Hardware Requirements

**Mainnet:**
- 16 cores, 64GB RAM
- 1TB SSD/NVMe (~250GB used, grows over time)
- 1 Gbps, 10TB+ monthly traffic

**Testnet:** Similar, ~100GB storage

# Ports

Default ports (customizable in `.env`):
- `VALIDATOR_PORT` (30001/udp) - P2P networking
- `LITESERVER_PORT` (30003/tcp) - Liteserver connections
- `VALIDATOR_CONSOLE_PORT` (30002/tcp) - Console access

Public IP auto-detected on startup. Override with `PUBLIC_IP` in `.env` if needed.

# Customization

Use `custom.yml` to override any settings (not tracked by git). Add to `COMPOSE_FILE` in `.env`.

See `default.env` for all options.

## Version

This is TON Docker v1.0.0
35 changes: 0 additions & 35 deletions README.md.example

This file was deleted.

52 changes: 52 additions & 0 deletions default.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# copy to .env and adjust
COMPOSE_FILE=ton.yml

# uncomment to override public ip (kubernetes/special networks)
#PUBLIC_IP=

TON_BRANCH=mainnet

# testnet: https://ton.org/testnet-global.config.json
GLOBAL_CONFIG_URL=https://ton.org/global.config.json

MYTONCTRL_VERSION=master
TELEMETRY=true
IGNORE_MINIMAL_REQS=true
MODE=liteserver

ARCHIVE_TTL=2592000
STATE_TTL=86400
VERBOSITY=1

LITESERVER_PORT=30003
VALIDATOR_PORT=30001
VALIDATOR_CONSOLE_PORT=30002

TON_HOST=ton
TON_API_HOST=ton-api
DOMAIN=example.com

# faster sync (~200GB): latest | latest_testnet | https://dump.ton.org/dumps/latest.tar.lz
SNAPSHOT=

TON_DOCKERFILE=Dockerfile.binary
TON_DOCKER_TAG=latest
TON_DOCKER_REPO=ghcr.io/ton-blockchain/ton-docker-ctrl

# add ton-http-api.yml to COMPOSE_FILE to enable
TON_API_HTTP_PORT=8081
TON_API_LOGS_LEVEL=INFO
TON_API_GET_METHODS_ENABLED=1
TON_API_JSON_RPC_ENABLED=1
TON_API_WEBSERVERS_WORKERS=1
TON_API_CACHE_ENABLED=0
TON_API_ROOT_PATH=/
TON_API_TONLIB_PARALLEL_REQUESTS_PER_LITESERVER=50
TON_API_TONLIB_REQUEST_TIMEOUT=10
TON_API_LOGS_JSONIFY=0
TON_API_GUNICORN_FLAGS=

SCRIPT_TAG=

# do not adjust
ENV_VERSION=1
25 changes: 0 additions & 25 deletions default.env.example

This file was deleted.

Loading