AshMiq Digital
← All posts

Build your own remote private blockchain with AWS and Ganache

Running your own private Ethereum network on a free-tier EC2 instance, locked to your IP.

I was fiddling with blockchain in 2021, trying to understand how one actually works by building one. There wasn't a single guide that took you from nothing to a running private network, so I wrote the one I wished I had.

The idea: run Ganache, a personal Ethereum blockchain, on a cheap AWS instance, locked down so only your own IP can reach it. Good for testing app code or smart contracts before they go anywhere near a mainnet.

The setup was an EC2 free-tier Ubuntu box, a security group with SSH and custom TCP/UDP rules limited to your IP, then Node via nvm and Ganache CLI listening on the instance's private IP:

sudo apt-get update && sudo apt install curl
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile && nvm install --lts
sudo npm install -g ganache-cli
ganache-cli --host <PRIVATE_IP> --port 8545 --networkId 5777

To prove it worked, I wrote a tiny Web3.js app that connects, lists the ten default accounts, and reads the first balance: github.com/nazmifeeroz/node-test-blockchain. Seeing a real balance come back from a blockchain running on your own $0 EC2 box made the whole concept click.

2026 note: I'd write this differently now — the guidance still stands, but Ganache itself is retired (use Hardhat's network or Anvil), and everything here would be Terraform and a container. The lesson that stuck wasn't the tooling, though. It's that the best way to understand a system is to build a small version of it yourself.