> For the complete documentation index, see [llms.txt](https://docs.triton.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.triton.one/pyth-publishers/nginx-proxy.md).

# NGINX proxy

For your pythd to communicate with our servers over an encrypted channel, it is recommended that you set up an NGINX proxy. This also allows for token authentication, meaning we do not need to manually maintain IP whitelists for your nodes. Sample NGINX configurations have been provided by the Pyth team:

```nginx
# replace YOUR_NODE and YOUR_AUTH_TOKEN_HERE
# docker run -v /path/to/nginx-triton1.conf:/etc/nginx/nginx.conf:ro -p 7899:7899 -p 7900:7900 -d docker.io/nginx

worker_processes 1;

events {}

http {
  include /etc/nginx/mime.types;

  rewrite_log on;

  keepalive_requests 2147483647; # int32 max

  client_max_body_size 0;

  # Pythnet, listening on ports 7799:7800
  upstream pythnet_backend {
    server YOUR_PYTHNET_NODE.rpcpool.com:443;
    keepalive 4;
  }
  server {
    listen 7800;
    location / {
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "Upgrade";
      proxy_pass https://pythnet_backend/YOUR_PYTHNET_AUTH_TOKEN_HERE/;
      proxy_set_header Host YOUR_PYTHNET_NODE.rpcpool.com;
    }
  }
  server {
    listen 7799;
    location / {
      proxy_http_version 1.1;
      proxy_set_header Connection "";
      proxy_pass https://pythnet_backend/YOUR_PYTHNET_AUTH_TOKEN_HERE/;
      proxy_set_header Host YOUR_PYTHNET_NODE.rpcpool.com;
    }
  }

  # Solana Mainnet, listening on ports 7899:7900
  upstream mainnet_backend {
    server YOUR_MAINNET_NODE.rpcpool.com:443;
    keepalive 4;
  }
  server {
    listen 7900;
    location / {
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "Upgrade";
      proxy_pass https://mainnet_backend/YOUR_MAINNET_AUTH_TOKEN_HERE/;
      proxy_set_header Host YOUR_MAINNET_NODE.rpcpool.com;
    }
  }
  server {
    listen 7899;
    location / {
      proxy_http_version 1.1;
      proxy_set_header Connection "";
      proxy_pass https://mainnet_backend/YOUR_MAINNET_AUTH_TOKEN_HERE/;
      proxy_set_header Host YOUR_MAINNET_NODE.rpcpool.com;
    }
  }
}

```

Source: \
<https://github.com/pyth-network/pyth-client/blob/main/doc/example-nginx-triton1.conf>


---

# 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.triton.one/pyth-publishers/nginx-proxy.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.
