Introduction
Running a Binance Smart Chain (BSC) full node via Docker simplifies deployment while maintaining blockchain integrity. This guide covers setup, configuration, and monitoring for Mac OS X, Linux, and Windows.
Prerequisites
- Docker: Install from official Docker documentation.
- Disk Space: Minimum 2TB SSD recommended for mainnet.
- RAM: 16GB+ for optimal performance.
Step 1: Install Docker
For Desktop Users
Download Docker Desktop for your OS:
For Ubuntu Linux
Run these commands:
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io Post-Install Configuration
Enable Docker on startup:
sudo systemctl enable docker.service
sudo systemctl enable containerd.service Grant user permissions:
sudo usermod -aG docker $USER Step 2: Pull BSC Docker Image
Fetch the latest BSC image:
docker pull ghcr.io/bnb-chain/bsc:latest 👉 Explore BSC Docker Hub for version details.
Step 3: Download Configuration Files
Mainnet
wget $(curl -s https://api.github.com/repos/bnb-chain/bsc/releases/latest | grep browser_ | grep mainnet | cut -d\" -f4)
unzip mainnet.zip Testnet
wget $(curl -s https://api.github.com/repos/bnb-chain/bsc/releases/latest | grep browser_ | grep testnet | cut -d\" -f4)
unzip testnet.zip Step 4: Run Docker Container
Directory Structure
| Local Path | Docker Path | Purpose |
|------------------|------------------|-----------------------|
| ./config | /bsc/config | Config files |
| ./data/node | /bsc/node | Blockchain data |
Start Container
docker run -v $(pwd)/config:/bsc/config -v $(pwd)/data/node:/bsc/node -p 8545:8545 --name bsc-node -it ghcr.io/bnb-chain/bsc:latest --http.addr 0.0.0.0 Flags Explained:
-p 8545:8545: Maps RPC port (8545 for mainnet, 8575 for testnet).--http.addr 0.0.0.0: Allows external RPC access.
👉 Troubleshooting Tips for common issues.
Step 5: Monitor Node Status
Check Sync Status
Attach Geth console:
geth attach http://localhost:8545 Run:
eth.syncing View Logs
docker logs bsc-node --tail 100 FAQ
1. How long does initial sync take?
~48 hours with a fast SSD and stable internet.
2. Can I run a node on Windows?
Yes, but Linux is preferred for performance.
3. What’s the default RPC port?
- Mainnet: 8545
- Testnet: 8575
4. How to update the BSC image?
Stop the container and re-run docker pull ghcr.io/bnb-chain/bsc:latest.
Conclusion
Deploying a BSC node with Docker ensures scalability and ease of maintenance. Follow best practices for security, like restricting RPC access.
For advanced configurations, visit BSC official docs.