<!-- Canonical: https://docs.linea.build/network/how-to/deploy-smart-contract/remix -->

> For the complete Linea documentation index, see [llms.txt](/llms.txt).
> Agents can fetch this page as Markdown at [https://docs.linea.build/network/how-to/deploy-smart-contract/remix.md](https://docs.linea.build/network/how-to/deploy-smart-contract/remix.md).

# Remix

In this tutorial, we'll walk through creating a basic Remix project and deploying a sample contract.

## Explore the Remix workspace

To start using Remix, navigate to their [website](https://remix.ethereum.org/). The default project includes a code sample with a configured smart contract.

![Remix configured smart contract code](/img/get_started/how_to/deploy_smart_contract/remix/Linea_deploy_smart_contract_Remix_1.png)

## Compile a Remix contract

Navigate to the **Solidity compiler** tab on the left navigation and click **Compile contract**.

![Remix compile contract](/img/get_started/how_to/deploy_smart_contract/remix/Linea_deploy_smart_contract_Remix_2.png)

## Deploy the contract

You can deploy a smart contract using the injected provider, meaning Remix can auto-detect the network you're on and your account information. To do this, navigate to the **Deploy & run transactions** tab.

Public endpoints are rate limited and not meant for production systems

We recommend using a node provider such as Infura. [Sign up for an Infura account](https://docs.metamask.io/developer-tools/dashboard/) to generate an API key. In the dashboard, enable the Linea endpoints you want to use with that key.

Then, [manually add a network to your MetaMask wallet](https://support.metamask.io/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC#h_01G63GGJ83DGDRCS2ZWXM37CV5) using the [network information](/network/build/connect).

Switch to the Linea network (mainnet or testnets) in your MetaMask wallet, and from the **ENVIRONMENT** drop down, select **Injected provider - MetaMask**.

![Remix deploy contract](/img/get_started/how_to/deploy_smart_contract/remix/Linea_deploy_smart_contract_Remix_3.png)

Then, select **Deploy** and confirm the transaction. This deploys the contract to the network selected in MetaMask.

## Customize and deploy with Linea integration

With the latest update, you can now easily integrate the Linea network into Remix using the **Customize this list...** feature. This simplifies the deployment process by allowing you to enable Linea as an environment directly within Remix.

### Enable Linea in the environment list

1.  Navigate to the **Deploy & run transactions** tab.
2.  Under the **ENVIRONMENT** dropdown menu, click on **Customize this list...**.
3.  In the **Deploy using a Browser Extension** section, check the **L2 - Linea - MetaMask** option.

![Enable Linea in Remix environment](/img/get_started/how_to/deploy_smart_contract/remix/Linea_deploy_smart_contract_Remix_4.png)

4.  The **L2 - Linea - MetaMask** option will now appear in the **ENVIRONMENT** dropdown.

### Deploy a contract on Linea

1.  From the **ENVIRONMENT** dropdown, select **L2 - Linea - MetaMask**.
2.  Connect your MetaMask wallet, ensuring it is set to the Linea mainnet or testnet.
3.  Compile your smart contract as described earlier in this tutorial.
4.  Click **Deploy** and confirm the transaction in MetaMask.
