🐳 Docker setup for celestia-app
This page has instructions to run celestia-appd using Docker images.
If you are looking for instructions to run celestia-node using Docker, refer
to the celestia-node Docker page.
Prerequisites
Quick start with persistent storage
Set network and version variables
Mainnet Beta
export NETWORK=celestia
export CHAIN_ID=celestia
export APP_VERSION=v9.0.4
export NODE_VERSION=v0.31.4If you are block syncing Mainnet Beta from genesis, use
export APP_VERSION=v3.0.2 as a temporary workaround for
celestia-app issue #4370 .
After sync completes, upgrade to the latest version.
Create the node home directory
mkdir -p $HOME/celestia-app-dockerBefore mounting this directory, Linux users may need to set permissions:
sudo chown 10001:10001 $HOME/celestia-app-dockerInitialize the node home
docker run --rm \
-v $HOME/celestia-app-docker:/home/celestia/.celestia-app \
ghcr.io/celestiaorg/celestia-app:$APP_VERSION \
init "docker-node" --chain-id $CHAIN_IDDownload the genesis file
docker run --rm \
-v $HOME/celestia-app-docker:/home/celestia/.celestia-app \
ghcr.io/celestiaorg/celestia-app:$APP_VERSION \
download-genesis $CHAIN_IDConfigure seeds
Set seeds in $HOME/celestia-app-docker/config/config.toml:
Mainnet Beta
SEEDS=$(curl -sL https://raw.githubusercontent.com/celestiaorg/networks/master/celestia/seeds.txt | tr '\n' ',' | sed 's/,$//')
echo $SEEDS
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" $HOME/celestia-app-docker/config/config.tomlOptional: Configure persistent peers
If you set persistent peers, your node will always try to connect to these peers. This is useful for a local devnet. In production, setting persistent peers is advised only if you are running a sentry node .
You can get persistent peers from the @cosmos/chain-registry repository (for Mainnet Beta) or @celestiaorg/networks repository (for Mocha and Arabica):
Mainnet Beta
PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/cosmos/chain-registry/master/celestia/chain.json | jq -r '.peers.persistent_peers[].address' | tr '\n' ',' | sed 's/,$//')
echo $PERSISTENT_PEERS
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PERSISTENT_PEERS\"/" $HOME/celestia-app-docker/config/config.tomlStart the container
RPC (26657) and gRPC (9090) are published to localhost only in this
example. Do not publish these ports on all interfaces on a public host unless
you intend to expose them. P2P (26656) is published for peer connectivity.
docker run -d \
--name celestia-app \
--restart unless-stopped \
-v $HOME/celestia-app-docker:/home/celestia/.celestia-app \
-p 26656:26656 \
-p 127.0.0.1:26657:26657 \
-p 127.0.0.1:9090:9090 \
ghcr.io/celestiaorg/celestia-app:$APP_VERSION \
start --home /home/celestia/.celestia-app --rpc.laddr tcp://0.0.0.0:26657Check node status
docker logs -f celestia-app
curl -s http://localhost:26657/status | jq '.result.sync_info'Run celestia-node in Docker against your containerized celestia-app
celestia-node connects to consensus over gRPC (--core.port, default 9090),
not Tendermint RPC.
If you run a bridge node, make sure your consensus node config follows the bridge requirements.
Create a shared Docker network
docker network create celestia-networkRecreate celestia-app on the shared network
RPC and gRPC are not published to the host here. celestia-node reaches
celestia-app over the Docker network on gRPC port 9090. Only P2P
(26656) is published for peer connectivity.
docker stop celestia-app && docker rm celestia-app
docker run -d \
--name celestia-app \
--restart unless-stopped \
--network celestia-network \
--network-alias celestia-app \
-v $HOME/celestia-app-docker:/home/celestia/.celestia-app \
-p 26656:26656 \
ghcr.io/celestiaorg/celestia-app:$APP_VERSION \
start --home /home/celestia/.celestia-app --rpc.laddr tcp://0.0.0.0:26657Start celestia-node in the same Docker network
docker run --rm -it \
--name celestia-node \
--network celestia-network \
-e NODE_TYPE=light \
-e P2P_NETWORK=$NETWORK \
ghcr.io/celestiaorg/celestia-node:$NODE_VERSION \
celestia light start --core.ip celestia-app --core.port 9090 --p2p.network $NETWORK