Skip to main content

How to run TON Sites

Introduction

TON Sites work similarly to regular websites but require additional steps to set up. This guide walks you through the setup process.

Running a TON Site

Install the Tonutils Reverse Proxy to use TON Proxy for your website.

Installation on Linux

Download

wget https://github.com/tonutils/reverse-proxy/releases/latest/download/tonutils-reverse-proxy-linux-amd64
chmod +x tonutils-reverse-proxy-linux-amd64

Run

Run with your TON DNS domain:

./tonutils-reverse-proxy-linux-amd64 --domain <your-domain.ton>

Scan the QR code shown in your terminal using Tonkeeper, Tonhub, or any other wallet. Confirm the transaction to link your domain to the site.

Run without domain

Alternatively, you can run the proxy in simple mode with an ADNL address (suffix .adnl) if you do not have a .ton or .t.me domain:

./tonutils-reverse-proxy-linux-amd64
Usage

Your TON Site is now accessible via the ADNL address or the domain.

To change settings such as the proxy pass URL, edit the config.json file and restart the proxy. The default proxy pass URL is: http://127.0.0.1:80/.

The proxy also adds the following headers:

  • X-Adnl-Ip – the client's IP address.
  • X-Adnl-Id – the client's ADNL ID.

Installation on any other OS

Build it from sources and run it using the same command shown for Linux. A Go environment is required to build.

git clone https://github.com/tonutils/reverse-proxy.git
cd reverse-proxy
make build

To build for other operating systems, run make all.

Further steps

Checking site availability

After completing the setup, the TON proxy should be running. If the setup is successful, your site will be available at the ADNL address generated during the configuration.

You can check availability by opening the address with the .adnl suffix. Ensure that a TON Proxy is active in your browser, such as via the MyTonWallet browser extension.

References

See also

Was this article useful?