Use this tutorial to start using Cloudflare’s Web3 Gateways to the IPFS and Ethereum networks.
Before you begin
Before you start, make sure the you have set up an account and added your website to Cloudflare.
Step 1 - Subscribe to a gateway
To get access to Web3 gateways for your account, you need to first subscribe to a gateway.
Step 2 - Create a gateway
After purchasing a gateway subscription, create a gateway.
Create via dashboard
To create a gateway using the dashboard:
- Log in to the Cloudflare dashboard.
- Select your account and website.
- Go to Web3.
- Click Create Web3 Gateway.
- Enter the following information:
- Hostname: Enter a hostname to use as your gateway, which has to be a subdomain of the current Cloudflare zone.
- Gateway Description: Enter a description to help distinguish between different gateways.
- Gateway Type: Select a gateway target of IPFS DNSLink or Ethereum.
- DNSLink: Only applicable to IPFS gateways, more details at DNSLink.
- Click Deploy.
Create via API
For a full list of gateway properties, refer to Create Web3 Hostname. If you need help with API authentication, refer to Cloudflare API Quickstart.
curl -X POST \
-H "X-Auth-Email: [email protected]" \
-H "X-Auth-Key: REDACTED" \
-H "Content-Type: application/json" \
"description":"This is my IPFS gateway.",
The response contains the complete definition of the new gateway.
"description": "This is my IPFS gateway.",
When you create a gateway, Cloudflare automatically:
- Creates and adds records to your Cloudflare DNS so your gateway can receive and route traffic appropriately.
- Proxies traffic to that hostname.
- Issues an SSL/TLS certificate to cover the specified hostname.
Step 3 - Customize Cloudflare settings
Once your gateway becomes active, you can customize the Cloudflare settings associated with your hostname.
Since your traffic is automatically proxied through Cloudflare, you customize your website settings to take advantage of various security, performance, and reliability benefits.
Step 4 - Restrict gateway access (optional)
If you are using your gateway for backend services, you may want to use Cloudflare Zero Trust to restrict gateway access.
Step 5 - Use the gateway
Once you have created a gateway and updated your Cloudflare settings, you can start using your IPFS or Ethereum gateway.