> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fortytwo.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment Setup

<Badge color="gray">P2P</Badge>
<Badge color="gray">Fortytwo P2P Relay</Badge>

Before the Relay can be launched, the `.env` file has to be set up first.

*It is located in the folder cloned from [<Icon icon="github" /> Fortytwo P2P Relay Setup <Icon icon="arrow-up-right" />](https://github.com/Fortytwo-Network/fortytwo-p2p-relay-docker).*<br />
*If you haven't set it up during the '[Installing the P2P Relay Node](/docs/relay-quick-start#1-installing-the-p2p-relay-node)' stage, copy and rename the `.env.example` reference file.*

<Accordion title="Unwrap for `.env` file placeholder content">
  ```bash theme={null}
  FT_ACCOUNT_PRIVATE_KEY=
  FT_RPC_SERVICE_PORT=42420
  FT_NODE_LISTENER_PORT=42042

  IPFS_SWARM_PORT=4001
  IPFS_DATA_PATH=/data/ipfs
  IPFS_MOUNT_PATH=/data/ipfs_ipns
  HOST_PUBLIC_IP=
  ```
</Accordion>

## Environment Parameters

### `FT_ACCOUNT_PRIVATE_KEY`

Paste in the private key of an **EVM-compatible Web3 account**. You can get it from any Web3 wallet that supports EVM networks.

* Your Web3 account **should be different from your P2P Inference Node account**. This applies if you participate in both Inference and Relay activities at the same time.
* **Keep your Private Key secure.** Never share it publicly or commit it to version control systems.

<Note>
  **Early participation note:**

  If the private key you wish to use is not tied to the public wallet address you applied with:

  Either

  **A.** Contact us at [support@fortytwo.network](mailto:support@fortytwo.network)

  1. Title your letter <b>"Relay Program Participation"</b>.
  2. Specify the <b>public wallet address that you registered with</b>.
  3. Specify the <b>new public wallet address</b> that you will be using for participation.

  or

  **B.** Contact our <Icon icon="discord" /> Discord support agent **MJ** with a message containing the information listed above.
</Note>

### `FT_RPC_SERVICE_PORT`

Default port is `42420`. Change it if necessary.

* If another process in the system is using this port, for example, an **Inference Node is running on the same machine**, then change this port for the Relay Node.
* It must be different from the `FT_NODE_LISTENER_PORT`.

### `FT_NODE_LISTENER_PORT`

Default port is `42042`. Change it if necessary.

* Your device's IP should be **static and public**.
* The port defined for `FT_NODE_LISTENER_PORT` should be publicly accessible over both **TCP** and **UDP**.
* If another process in the system is using this port, for example, an **Inference Node is running on the same machine**, then change this port for the Relay Node.
* It must be different from the `FT_RPC_SERVICE_PORT`.

'[Ports Availablity Verification](/docs/ports)' can help you check if the network will be able to see your node.

### `IPFS_SWARM_PORT`

Default port is `4001`. Change it if necessary.

* Your device's IP should be **static and public**.
* The port defined for `IPFS_SWARM_PORT` should be publicly accessible over both **TCP** and **UDP**.

*See the [IPFS official documentation <Icon icon="arrow-up-right" />](https://docs.ipfs.tech/how-to/nat-configuration/#enable-manual-port-forwarding) if want to learn more on IPFS. Note that no other setup than defined in our documentation is required.*

'[Ports Availablity Verification](/docs/ports)' can help you check if the network will be able to see your node.

### `IPFS_DATA_PATH`

Default path is `/data/ipfs`.

* Make sure that this **folder exists** before running the node.

### `IPFS_MOUNT_PATH`

Default path is `/data/ipfs_ipns`.

* Make sure that this **folder exists** before running the node.

### `HOST_PUBLIC_IP`

Paste in your IP/your server IP address.

* Your IP should be **static and public**.
