# Simple Configuration Guide

Ocean Node is configured primarily through **Environment Variables**. These can be set in a `.env` file or exported in your shell.

### Essential Configuration

| Variable      | Description                                         | Required | Example                                     |
| ------------- | --------------------------------------------------- | -------- | ------------------------------------------- |
| `PRIVATE_KEY` | Your wallet's private key.                          | **Yes**  | `0x123...abc`                               |
| `RPCS`        | JSON object defining RPC URLs for supported chains. | No       | `{"1": "https://rpc.eth...", "137": "..."}` |
| `DB_URL`      | URL for the internal database (Typesense/Elastic).  | No       | `http://localhost:8108`                     |
| `HTTP_PORT`   | Port for the HTTP server.                           | No       | `8000`                                      |

### Compute-to-Data (C2D) Configuration

If you want your node to process compute jobs (and earn fees), you need to configure the compute environments.

#### `DOCKER_COMPUTE_ENVIRONMENTS`

This JSON string defines what resources your node offers.

**Example Format:**

```json
{
	"environments": [
		{
			"id": "gpu-env",
			"cpu": 2,
			"ram": "8GB",
			"gpu": 1,
			"disk": "100GB"
		}
	]
}
```

*Note: The quickstart script attempts to auto-detect your GPUs (NVIDIA/PCIe) and populate this for you.*

### Allowed Admins

To control who can manage the node remotely:

| Variable         | Description                                                 |
| ---------------- | ----------------------------------------------------------- |
| `ALLOWED_ADMINS` | List of wallet addresses allowed to access admin endpoints. |

### Updating Configuration

If you used the **Docker** setup:

1. Edit the `.env` file generated in your node directory.
2. Restart the container:

   ```bash
   docker-compose down
   docker-compose up -d
   ```

If you used **NPM**:

1. Export the new variables.
2. Restart the process (`pm2 restart ocean-node` or `npm run start`).

Beautiful documentation starts with the content you create — and GitBook makes it easy to get started with any pre-existing content.


---

# 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://docs.oncompute.ai/ocean-node/quickstart.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.
