# What ports does \`gaiad\` use?

**URL:** <https://forum.cosmos.network/t/what-ports-does-gaiad-use/444>\
**Category:** Validation\
**Created:** [July 10, 2018, 6:02pm UTC](https://forum.cosmos.network/t/what-ports-does-gaiad-use/444 "2018-07-10T18:02:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris-chainflow](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/chris-chainflow/32/1530_2.png) [@chris-chainflow](https://forum.cosmos.network/u/chris-chainflow)\
**Post date:** [July 10, 2018, 6:02pm UTC](https://forum.cosmos.network/t/what-ports-does-gaiad-use/444/1 "2018-07-10T18:02:48Z")

</div>

By default `gaiad` uses the following ports:

- `26656`
  - p2p networking port to connect to the tendermint network
  - On a validator this port needs to be exposed to sentry nodes
  - On a [sentry node](https://forum.cosmos.network/t/sentry-nodes-what-they-are-how-they-work-why-they-exist/379) this port needs to be exposed to the open internet

- `26657`
  - Tendermint RPC port
  - This should be shielded from the open internet

- `26658`
  - Out of process ABCI app
  - This should be shielded from the open internet

Some optional ports that might be used by `gaiad` are as follows:

- `26660`
  - [Prometheus](https://prometheus.io/) stats server
  - Stats about the `gaiad` process
  - Needs to be [enabled in the config file](https://github.com/tendermint/tendermint/blob/master/docs/tendermint-core/metrics.md).
  - This should be shielded from the open internet

- `1317`
  - Light Client Daemon
  - For automated management of anything you can do with the CLI
  - This should be shielded from the open internet

---

<div class="post-metadata">

**Author:** ![kwunyeung](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/kwunyeung/32/68_2.png) [@kwunyeung](https://forum.cosmos.network/u/kwunyeung)\
**Post date:** [July 11, 2018, 2:50am UTC](https://forum.cosmos.network/t/what-ports-does-gaiad-use/444/2 "2018-07-11T02:50:36Z")

</div>

Continue with proxy discussion on Riot chat. For those ports you may want to use to as RESTful endpoint, e.g. 26657 and 1317, you may consider proxy them to an external interface via an http proxy like Nginx or Caddy. The idea is to treat them like a web service which the RESTful requests to the RPC ports will be done over https. Then you can have control over the RPC ports of the node. You may configure rate limiting on the http proxy or make requests with user authentication using a web app. In this sense, the ports will not expose to external directly and you node is protecting from receiving too many requests suddenly.

---

<div class="post-metadata">

**Author:** ![chris-chainflow](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/chris-chainflow/32/1530_2.png) [@chris-chainflow](https://forum.cosmos.network/u/chris-chainflow)\
**Post date:** [July 16, 2018, 6:11am UTC](https://forum.cosmos.network/t/what-ports-does-gaiad-use/444/3 "2018-07-16T06:11:08Z")

</div>

@jack Can you confirm all references to port 46656 should be changed to 26656 in the config.toml file?

---

<div class="post-metadata">

**Author:** ![chris-chainflow](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/chris-chainflow/32/1530_2.png) [@chris-chainflow](https://forum.cosmos.network/u/chris-chainflow)\
**Post date:** [July 16, 2018, 6:25am UTC](https://forum.cosmos.network/t/what-ports-does-gaiad-use/444/4 "2018-07-16T06:25:14Z")

</div>

Could you please point me to a few ref links to research how to do this?

---

<div class="post-metadata">

**Author:** ![kwunyeung](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/kwunyeung/32/68_2.png) [@kwunyeung](https://forum.cosmos.network/u/kwunyeung)\
**Post date:** [July 16, 2018, 7:28am UTC](https://forum.cosmos.network/t/what-ports-does-gaiad-use/444/5 "2018-07-16T07:28:30Z")

</div>

You can see the default port has been changed in the config.toml and you can read the change log.

> <https://github.com/cosmos/cosmos-sdk/blob/bb1f1a21bf540dad6b1d39d2c013b5cef59559c0/CHANGELOG.md#0200>

---

<div class="post-metadata">

**Author:** ![kwunyeung](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/kwunyeung/32/68_2.png) [@kwunyeung](https://forum.cosmos.network/u/kwunyeung)\
**Post date:** [July 16, 2018, 7:59am UTC](https://forum.cosmos.network/t/what-ports-does-gaiad-use/444/6 "2018-07-16T07:59:16Z")

</div>

You may start with the documentation of [Nginx](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) and [Caddy](https://caddyserver.com/docs/proxy).
