Gateway Apex Domain Content Resolution
Overview
Prior to gateway Release 28, the apex domain of a gateway would only display information about the Arweave network. Release 28 introduced two new environment variables that allow a gateway to serve custom content from the apex domain:
APEX_TX_ID
: Set to serve content from a specific transaction IDAPEX_ARNS_NAME
: Set to serve content from an ArNS name
These variables enable gateway operators to customize their gateway's apex domain with useful information, details about the operator or associated projects, or any other content they wish to share.
Quick Start
If you want to serve your project's dApp from the apex domain of your gateway:
- Upload your dApp to Arweave
- Assign your dApp's transaction Id to an ArNS name
- Set the environment variable:
APEX_ARNS_NAME=your-ArNS-name
- Restart your gateway
- Your dApp will now be served from your gateway's apex domain
Configuration
Environment Variables
You can configure your gateway to serve content from the apex domain by setting one of two environment variables:
# Option 1: Serve content from a transaction ID
APEX_TX_ID=your-transaction-id
# Option 2: Serve content from an ArNS name
APEX_ARNS_NAME=your-arns-name
You cannot set both variables simultaneously. Providing both variables will result in an error.
Restart Requirements
- The gateway must be restarted after initially setting these environment variables
- If using
APEX_ARNS_NAME
, no restart is needed when the ArNS name points to a new transaction - If using
APEX_TX_ID
, the gateway must be restarted when updating the transaction ID
Use Cases
Gateway operators can use this feature to:
- Display information about their gateway service
- Share details about the operator or organization
- Showcase associated projects and services
- Share educational content about Arweave and the permaweb
- Display any other content they wish to make available at their gateway's root domain
Community Examples
Several gateway operators have already implemented this feature to serve custom content from their apex domains:
- arnode.asia - Serves a custom landing page with information about their gateway service
- arlink.xyz - Serves the permaDapp for the Arlink project
- frostor.xyz / love4src.com - Serves information about the Memetic Block Software Guild and their projects
- vilenarios.com - Serves personalized portfolio/link tree information about the operator
- permagate.io - Serves personalized link tree information about the operator
These examples demonstrate how gateway operators can leverage the apex domain feature to create a more personalized and informative experience for their users.