Introduction
The TON Storage Docker facilitates the deployment of decentralized storage solutions on the TON (Telegram Open Network) blockchain, encompassing both a storage daemon and a storage gateway within a singular Docker container. For enhanced functionality, users can optionally deploy a TON proxy container. This document provides a detailed walkthrough for setting up these services, configuring storage parameters, and uploading content to TON storage.
Setup and Configuration
The process to get started with TON Storage Docker involves initial configuration, adjustment of environment settings, building Docker images, and running the services. The table below outlines the critical steps and corresponding commands:
Step | Command | Description |
---|---|---|
Initial Configuration | ./init.sh mainnet or ./init.sh testnet |
Initializes the environment for either the mainnet or testnet. Optionally, enable TON proxy with TON_PROXY_ENABLED=1 . |
ADNL Address Setup | N/A | For existing ADNL addresses, place relevant files in private/ . |
Environment Settings | Check and edit .env |
Customize settings such as ports, IP addresses, and verbosity levels in the .env file. |
Docker Image Building | docker-compose build |
Builds Docker images for the TON storage daemon, gateway, and optionally, the TON proxy. |
Running Services | docker-compose up -d |
Launches the Docker containers for TON storage and proxy services. |
Uploading Content to TON Storage
To upload content to TON Storage, users should place files in the exchange
folder, access the Docker container’s shell, and utilize the storage-daemon-cli
tool following the provided instructions. This process enables the creation of a “bag of files” for storage on the TON blockchain.
Configuration Settings
Settings for the TON Storage Docker are primarily managed within the .env
file. Detailed below are the key configuration options for the storage daemon, storage gateway, and TON proxy:
Storage Daemon Settings
Setting | Description |
---|---|
TON_STORAGE_ADNL_PORT |
Specifies the port for ADNL queries. |
TON_STORAGE_CONTROL_PORT |
Defines the control port for daemon management. |
TON_STORAGE_VERBOSITY_LEVEL |
Sets the verbosity level for logging. |
TON_STORAGE_PUBLIC_IP |
Indicates the public IP address of the storage service. |
Storage Gateway Settings (WIP)
Setting | Description |
---|---|
TON_STORAGE_GATEWAY_PORT |
Port for storage gateway operations. |
TON_STORAGE_GATEWAY_DOMAIN |
Domain name for the storage gateway (work in progress). |
Proxy Settings
Setting | Description |
---|---|
TON_PROXY_ENABLED |
Enables or disables the TON proxy service. |
TON_PROXY_PORT |
HTTP listening port for the proxy. |
TON_PROXY_ADNL_PORT |
Port for ADNL queries through the proxy. |
TON_PROXY_VERBOSITY_LEVEL |
Sets the verbosity level for proxy operations. |
FAQ
Q: How do I verify if the TON proxy is operational?
A: You can verify the proxy’s functionality using curl
commands to send requests through your proxy or public TON proxies. Successful HTML code retrieval indicates an operational proxy.
Conclusion
Deploying TON Storage and Proxy services using Docker streamlines the process of participating in the TON blockchain’s decentralized storage ecosystem. By following the setup instructions, adjusting configuration settings, and utilizing the provided tools for content upload, users can efficiently manage and access decentralized storage solutions on the TON network.