The main container contains two tasks:
- Storage daemon.
- Storage gateway.
Additionaly, you cat run TON proxy container for your gateway.
- First time configuration:
./init.sh mainnetor./init.sh testnet.- If you want setup TON proxy:
TON_PROXY_ENABLED=1 ./init.sh <network>. - If you already have ADNL address, then put user-friendly form to
private/adnl, hex-form toprivate/adnl-hexand private key toprivate/adnl-private. - (WARNING) Make a backup of 3 files with ADNL:
private/adnl,private/adnl-hexandprivate/adnl-private.
- If you want setup TON proxy:
- Check
.envfile and change settings. - Build:
docker-compose build. - Run:
docker-compose up -d.
- Place necessary files to
exchangefolder. - Connect to docker container:
docker exec -it ton-storage-docker-gateway-1 bash. - Run storage-daemon-cli:
storage-daemon-cli -I 127.0.0.1:5555 -k /data/ton-storage/cli-keys/client -p /data/ton-storage/cli-keys/server.pub. - Then follow instructions.
Most part of settings are located in .env.
TON_STORAGE_ADNL_PORT=3333: a port for ADNL queries.TON_STORAGE_CONTROL_PORT=5555: a control port.TON_STORAGE_VERBOSITY_LEVEL=1: verbosity level (3 is recommended for debug, 4 is full debug).TON_STORAGE_PUBLIC_IP=116.202.116.162: your public IP (should be detected automatically).TON_STORAGE_GLOBAL_CONFIG: global config (set byinit.shstript).TON_STORAGE_DATABASE_NAME=ton-storage: database name (recommended to use default value).
TON_STORAGE_GATEWAY_PORT=3000: requi.TON_STORAGE_GATEWAY_DOMAIN=domain.ton: WIP.
TON_PROXY_ENABLED=0: enables rldp-http-proxy.TON_PROXY_PORT=8080: port to http connections to proxy.TON_PROXY_ADNL_PORT=3334: port to adnl queries (must differs with adnl-port of Storage).TON_PROXY_VERBOSITY_LEVEL=1: verbosity level.TON_PROXY_GLOBAL_CONFIG=private/mainnet.json: global config path.
- How to check if TON proxy is working:
- Get your public IP.
- In terminal:
curl -v -x <yout-ip>:8080 http://<adnl-userfrienly-form>.adnl/.- If you get HTML code, then it works with your proxy.
- In terminal:
curl -v -x in1.ton.org:8080 http://<adnl-userfrienly-form>.adnl/.- If not works, then try
in2.ton.org:8080andin3.ton.org:8080. - If you get HTML code, then it works with public proxies.
- If not works, then try