TON Storage FAQ
How to assign a TON domain to a TON Storage bag
- Upload your bag of files to the network and copy the bag ID (
<BagID>
). - Open Google Chrome on your computer.
- Install a wallet browser extension (TON Wallet or MyTonWallet):
- Open the extension, click "Import wallet", and import the wallet that owns the domain using your recovery phrase.
- Go to dns.ton.org, open your domain, and click "Edit".
- Paste the
<BagID>
into the "Storage" field and click "Save".
How to host a static TON Site in TON Storage
- Create a bag from the folder containing your static website.
- The folder must contain an
index.html
file. - Upload the bag to the network and copy the bag ID.
- Open Google Chrome and install a wallet browser extension (TON Wallet or MyTonWallet.
- Import the wallet that owns the domain using your recovery phrase.
- Go to dns.ton.org, open your domain, and click "Edit".
- Paste the
<BagID>
into the "Site" field, select "Host in TON Storage", and click "Save".
How to migrate TON NFT content to TON Storage
If you're using a standard NFT contract, update the content prefix by sending a message to your NFT collection smart contract from the collection owner's wallet.
- Old URL prefix example:
https://mysite/my_collection/
- New URL prefix format:
tonstorage://<BagID>/
(where<BagID>
is a 64-character hex hash; see Adding a bag of files.
How to assign a TON domain to a TON Storage bag (low-level)
You need to assign the following value to the sha256("storage")
DNS record of your TON domain:
dns_storage_address#7473 bag_id:uint256 = DNSRecord;
How to host a static TON Site in TON Storage (low-level)
To host a static site via TON Storage directly:
- Create a bag from your website folder. The folder must include
index.html
. - Assign the following value to the DNS record with key
sha256("site")
:
dns_storage_address#7473 bag_id:uint256 = DNSRecord;
Was this article useful?