Simplifying TON Network Site Deployment with TON Proxy Docker

Introduction

Deploying sites on the TON (Telegram Open Network) blockchain is made significantly easier with the TON Proxy Docker. This tool streamlines the process of running the rldp-http-proxy in a Docker container, enabling users to deploy their sites on the TON network efficiently. This document outlines the hardware requirements, setup instructions, and configuration options for using TON Proxy Docker.

Hardware Requirements

The table below outlines the minimum hardware requirements for building TON binaries and running the TON Proxy Docker:

Requirement Specification
RAM At least 2 GB

Running the Proxy

Deploying your site on the TON network involves several straightforward steps:

  1. Configuration in Docker-Compose: Set the TON repository branch in the docker-compose.yml file under the rldp-proxy.build.args section.
  2. Building the Image: Build the Docker image with the command docker-compose build.
  3. Initializing Proxy Configuration:
    • Run ./init.sh to generate a new ADNL ID, download the mainnet configuration, and create a .env file with settings.
    • If an ADNL ID already exists, place it in private/adnl and private/adnl-hex, and copy the contents of your keyring file into adnl-private.
  4. Launching the Proxy: Start the proxy using docker-compose up -d. This assumes the site is already operational on port 80 on the same machine.
  5. ADNL Address: The private/adnl file contains the user-friendly ADNL form. Use this address to access your site.

Proxy Settings

Configuration settings for the TON Proxy are managed in the .env file located at the repository’s root. The table below details these settings and their purposes:

Setting Description
TON_PROXY_PORT=8080 Specifies the HTTP listening port.
TON_PROXY_SERVER_IP Your server’s public IP. Use curl https://ipinfo.io/ip to retrieve your IP.
TON_PROXY_ADNL_PORT=3333 Defines the port for ADNL queries.
TON_PROXY_REMOTE_ADDR The address where HTTP requests are proxied. Change to direct requests to a different machine.
TON_PROXY_VERBOSITY=3 Sets the verbosity level. A value of 0 is recommended for production environments.
TON_PROXY_PROXY_ALL=NO Determines whether to proxy all HTTP requests. By default, only *.ton and *.adnl requests are proxied.

Conclusion

The TON Proxy Docker offers a simplified solution for deploying sites on the TON blockchain, eliminating the complexity associated with manual proxy configuration and deployment. By following the provided setup instructions and adjusting the proxy settings as needed, users can efficiently establish their presence on the TON network, leveraging its decentralized architecture for enhanced security and accessibility.