> For the complete documentation index, see [llms.txt](https://docs.tellor.io/tellor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tellor.io/tellor/running-tellor/node-setup/example-.service-files.md).

# Example .service Files

Tellor requires two separate services that use two different binaries: `layerd` and `reporterd`.

For running the layer node client (`layerd`):

```sh
[Unit]
Description=Layer Node Client
After=network-online.target

[Service]
User=USERNAME
Group=USERNAME
WorkingDirectory=/home/USERNAME/path/to/layer
ExecStart=/home/USERNAME/path/to/layerd start --home /home/USERNAME/.layer --keyring-backend="test" --key-name=ACCOUNT_NAME  --api.enable --api.swagger
Restart=always
RestartSec=10
Environment="TOKEN_BRIDGE_V2_ADDRESS=0x6ec401744008f4B018Ed9A36f76e6629799Ee50E"

[Install]
WantedBy=multi-user.target
```

For running the reporter daemon (`reporterd`):

```sh
[Unit]
Description=Layer Reporter
After=network-online.target

[Service]
User=USERNAME
Group=USERNAME
WorkingDirectory=/home/USERNAME/layer/binaries/reporter
ExecStart=/home/USERNAME/layer/binaries/reporter/reporterd
Restart=always
RestartSec=10
# Reporter identity
Environment="LAYER_HOME=/home/USERNAME/.layer"
Environment="FROM=ACCOUNT_NAME"
Environment="KEYRING_BACKEND=test"
# Environment="KEYRING_PASSWORD_FILE=/etc/layer-daemons/reporter-keyring-password"  # required when KEYRING_BACKEND=file
Environment="RPC_NODES=tcp://127.0.0.1:26657"
Environment="GRPC_NODES=127.0.0.1:9090"
Environment="BRIDGE_CHAIN_RPC_NODES=https://sepolia.infura.io/v3/YOUR_INFURA_API_KEY,https://sepolia.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"
Environment="ETHEREUM_RPC_NODES=https://mainnet.infura.io/v3/YOUR_INFURA_API_KEY,https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"
Environment="REPORTERS_VALIDATOR_ADDRESS=tellorvaloper1_your_address"
Environment="WITHDRAW_FREQUENCY=43200"
Environment="CMC_PRO_API_KEY=YOUR_COINMARKETCAP_API_KEY"
Environment="CGPRO_API_KEY=YOUR_COINGECKO_PRO_API_KEY"
Environment="SUBGRAPH_API_KEY=YOUR_GRAPH_API_KEY"
Environment="INFURA_API_KEY=YOUR_INFURA_API_KEY"
Environment="ALCHEMY_API_KEY=YOUR_ALCHEMY_API_KEY"

[Install]
WantedBy=multi-user.target
```

When using `KEYRING_BACKEND=file`, also set `KEYRING_PASSWORD_FILE` to a password file readable only by the service user. See the [layer-daemons README](https://github.com/tellor-io/layer-daemons/blob/v0.2.5/README.md#keyring-password-file) for setup details.

Alternatively, you can load all reporter settings from a file:

```sh
EnvironmentFile=/home/USERNAME/layer/binaries/reporter/.env
```

For running a layer validator with cosmovisor:

{% code overflow="wrap" %}

```shell
[Unit]
Description=Cosmovisor Validator Start
After=network-online.target

[Service]
User=USERNAME
Group=USERNAME
WorkingDirectory=/home/USERNAME/layer
ExecStart=/home/USERNAME/cosmovisor run start --home /home/USERNAME/.layer --keyring-backend="test" --key-name="ACCOUNT_NAME" --api.enable --api.swagger
Restart=always
RestartSec=10
MemoryMax=25G
Environment="DAEMON_NAME=layerd"
Environment="DAEMON_HOME=/home/USERNAME/.layer"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_POLL_INTERVAL=300ms"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="DAEMON_PREUPGRADE_MAX_RETRIES=0"
Environment="TOKEN_BRIDGE_V2_ADDRESS=0x6ec401744008f4B018Ed9A36f76e6629799Ee50E"


[Install]
WantedBy=multi-user.target
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.tellor.io/tellor/running-tellor/node-setup/example-.service-files.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
