Deploy a Linea subdomain
This guide is for developers who want to manage subdomains on Linea for domains they own on L1 ENS.
For example, if you own the domain example.eth on L1, you can create and manage subdomains like
sub.example.eth on Linea that resolves to the L1 domain, ensuring seamless integration and resolution
across both layers.
Requirements
-
L2 contracts: These Linea contracts handle all operations on your subdomains, including registrations and setting records.
-
L1 contracts: These contracts enable subdomains created on Linea to resolve on L1. You can reuse the existing Linea contracts, unless you require customizations.
-
User interface (UI): The UI for managing subdomains; you can adapt the Linea Names app in the Linea Names GitHub repository. If you decide to deploy this UI, you will also need to deploy the Linea Names Subgraph, and include your own values into the
env.tsfile.tipFollow the quickstart guide to test it locally. Replace the environment variables
BASE_DOMAIN,BASE_NODE,BASE_LABEL, andBASE_LABEL_HASHin the.envfiles (.env.exampleandenv.ts) with the values matching your ENS domain.
Available deployment methods
Use one of the following deployment methods to deploy your subdomain.