# Creating the .env file

`.env` are a way to make certain values accessible to an application running in a container. We'll use the `.env` file to configure the node with the information that is specific to your node (like private key, seed key, and server name).

{% hint style="info" %}
If you haven't created your private key and seed information yet, please see the step-by-step instructions on [GeordieR's guide](https://cotidocs.geordier.co.uk/wallet-and-kyc/generating-your-seed).
{% endhint %}

## Creating the .env file

From within the `coti-node` directory, create a new file called `.env`. To do this in `vim`, for example, one could run

```bash
vim .env
```

After creating the `.env` file, copy the following contents into the file, replacing everything in the angle brackets (<>), including the angle brackets themselves, with the information for your node.

<pre class="language-bash" data-title=".env" data-line-numbers><code class="lang-bash"><strong>ACTION="&#x3C;mainnet or testnet>"
</strong>SERVERNAME="&#x3C;Your desired mainnet or testnet URL>"
PKEY="&#x3C;Your private key>"
SEED="&#x3C;Your seed key>"
EMAIL="&#x3C;Your email address>"
</code></pre>

### Example .env file

Here is an example `.env` file for a fictional testnet node called "my-coti-node.xyz", with a private key of 1234567890, and a seed key of ABCDEFGHIJ.

{% code title=".env (example)" lineNumbers="true" %}

```bash
ACTION="testnet"
SERVERNAME="my-coti-node.xyz"
PKEY="1234567890"
SEED="ABCDEFGHIJ"
EMAIL="info@my-coti-node.xyz"
```

{% endcode %}

## Optional Variables

An optional, but useful environment variable, is `VERSION`. This controls which version of the coti-node software that Docker will run.&#x20;

If you want to run the latest version (which is generally suitable for testnet node operators), then you don't need to specify the `VERSION` environment variable.

On the other hand, if you want to run a particular version of the Coti node, this can be done by adding the following line to your `.env` file

```bash
VERSION="X.Y.Z"
```

where `X.Y.Z` is the release tag of the version you wish to run. A list of the available versions can be found [here](https://hub.docker.com/r/atomnode/coti-node/tags), which correspond to the [official releases](https://github.com/coti-io/coti-node/releases) made available by Coti.

## Summary

At this point, you have done all of the hard work needed to set up your node. The next step shows how to launch the node with Docker.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docker.guides.coticommunity.com/installing-the-coti-node/creating-the-.env-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
