Networks
Mainnet, testnet, previewnet — and how to add your own
| Network | Mirror REST URL | Use For |
|---|---|---|
mainnet |
https://mainnet-public.mirrornode.hedera.com |
Production. Real HBAR, real fees on any future write operations. |
testnet |
https://testnet.mirrornode.hedera.com |
Default network. Free faucet HBAR available — safe for development and CI. |
previewnet |
https://previewnet.mirrornode.hedera.com |
Early-access features not yet on testnet/mainnet. |
Testnet faucet: Hedera provides a public testnet faucet for free HBAR, so you can
exercise account/token/topic operations end to end without spending real funds. Point
DefaultNetwork at testnet (the default) while developing.
How Network Selection Works
- Each operation call may include a
networkconfig key. - If set, the node resolves that network's
MirrorRestUrlfromHedera:Networksand calls it. - If unset, the node uses whatever
Hedera:DefaultNetworkpoints to. - If the resolved network name has no matching entry under
Hedera:Networks, the node throwsHederaNetworkNotConfiguredExceptionrather than silently falling back.
Adding a Custom Network
Add any additional entry under Hedera:Networks — the key becomes the value workflows
pass in the network field:
"Hedera": {
"DefaultNetwork": "testnet",
"Networks": {
"testnet": { "MirrorRestUrl": "https://testnet.mirrornode.hedera.com" },
"my-local-net": { "MirrorRestUrl": "https://mirror.my-internal-hedera-net.example" }
}
}
No code change or redeploy of the node itself is required — this is a pure configuration addition.
Only Mirror Node URLs are configurable here. This node's current operations are all
Mirror Node REST reads, so the only per-network setting needed is
MirrorRestUrl. Signed
write operations (see Roadmap) will need consensus node endpoints too,
once implemented.