Run a Sei Node
Node Configuration

Node Configuration

Node types

There are a few node types that can be run on Sei network which serve a variety of purposes. These include:

  • rpc / full nodes: these nodes are generally used for querying data or interacting with the chain. They maintain some state but not since genesis. The default settings will run rpc / full nodes.
  • archive nodes: maintain full state of the blockchain from genesis. Generally requires large disks. To enable this type of node, set min-retain-blocks=0 and pruning="nothing" in your app.toml
  • state sync nodes: provide snapshot data for other nodes to use to bootstrap onto the chain. To enable this type of node, set enable=true under the [statesync] section in config.toml
  • validator nodes: provide security to the chain by proposing and signing blocks. To enable this type of node, set mode=validator in config.toml. Note that because Sei is proof-of-stake, you must have enough delegation to join the active set

Commonly Used Ports

Seid uses the following TCP ports. Toggle their settings to match your environment.

  • 26656: The default port for the P2P protocol. This port is used to communicate with other nodes and must be open to join a network.
  • 1317: The default port for interacting with the Seid API server for HTTP RESTful requests. This allows applications and services to interact with the seid instance through RPC.
  • 26660: The default port for interacting with the Prometheus database, which can be used to monitor the environment. In the default configuration, this port is not open.
  • 26657: The default port for the RPC protocol. Because this port is used for querying and sending transactions, it must be open for serving queries from seid.

These ports are all customizable in $HOME/.sei/config/config.toml and $HOME/.sei/config/app/toml discussed in the later sections along with other fields.

Systemd File Template

[Unit]
Description=Sei Node
After=network.target
 
[Service]
User=<USER>
Type=simple
ExecStart=<PATH_TO_SEID>/seid start --chain-id <Network>
Restart=always
# wait 30 seconds before restarting the service after it has failed.
RestartSec=30
#  wait up to 30 seconds for the service to stop gracefully when it is being stopped.
TimeoutStopSec=30
# send the SIGINT signal (equivalent to pressing Ctrl-C) to the service process when it is being stopped
# giving it a chance to shut down gracefully.
KillSignal=SIGINT
LimitNOFILE=65535
 
[Install]
WantedBy=multi-user.target