# Configuration file

Create the following configuration file with the name `env` and save it into the `pool-scripts` folder:

```bash
#!/bin/bash


NODE_HOME=~/stake-pool-files
CARDANO_NODE_SOCKET_PATH=/run/cardano-node.socket

KES_PERIOD=1

PLEDGE=1000000000  # 1000 ADA
COST=340000000     #  340 ADA
MARGIN=0.01        #    1 %

NET="--testnet-magic 2"  # the preview network has the magic 2
RELAY1_HOST=relay1.stakepool.url
RELAY1_PORT=port1
RELAY2_HOST=relay2.stakepool.url
RELAY2_PORT=port2
METADATA_URL=https://stakepool.url/metadata.json
METADATA_HASH=$(cat ${NODE_HOME}/metadata/poolmetadata.hash)
```

Edit all the values to match your data. The usual values for port are 3001 or 6000, but any valid port can be used.

It is also possible to use IP Addresses instead of hostnames, but in this case the stake pool registration certificate command will be slightly different. It is recommended to use hostnames, because if the IP Address changes, it can be changed in DNS, without being required to submit a new stake pool registration certificate with the new IP Address (as it would be required when using IP Addresses for the registered relays).


---

# 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://apexpool.gitbook.io/stake-pool-scripts/stake-pool-registration/configuration-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.
