Back to list
Guide: Creating Your Own Fibercoin Blockchain
Creating Your Own Fibercoin Blockchain
A Fibercoin is a blockchain forked from Skycoin — same consensus mechanism, same wallet tooling, your own coin. The process has been simplified to the point where you can launch a new blockchain in about 30 seconds with 4 commands and a configuration file.
Everything you need is included in the Skywire binary, the standalone Skycoin release binary, or can be run directly from source with go run.
How are you running Skycoin?
All commands in this guide use skycoin as the command. Choose how you’re running it and the guide will update automatically:
Prerequisites
| Method | Requires |
|---|---|
skycoin (release binary) | Nothing (pre-compiled) |
skywire skycoin (Skywire binary) | Nothing (pre-compiled) |
go run . (from source) | Git and Go 1.23+ |
go run github.com/skycoin/skycoin@develop | Go 1.23+ |
go run github.com/skycoin/skywire@develop skycoin | Go 1.23+ |
Quick Start — Runtime Configuration (Recommended)
Step 1: Generate Genesis Wallet
skycoin cli addressGen > genesis.json
This creates a deterministic wallet with the genesis address, blockchain public key, and secret key.
$ skycoin cli addressGen --help
Usage:
skywire skycoin cli addressGen [flags]
Flags:
-c, --coin string Coin type. Must be skycoin or bitcoin. (default "skycoin")
-e, --entropy int Entropy of the autogenerated bip39 seed (128 or 256) (default 128)
--hex Use hex(sha256sum(rand(1024))) (CSPRNG-generated) as the seed
-l, --label string Wallet label
-m, --mode string Output mode: wallet, addresses, secrets (default "wallet")
-n, --num int Number of addresses to generate (default 1)
-s, --seed string Seed for deterministic key generation
-t, --strict-seed Seed should be a valid bip39 mnemonic seed.
Step 2: Create Configuration
First, print the embedded default config to see what you’re working with:
skycoin newcoin config
This prints the full default fiber.toml — which contains Skycoin mainnet values (Skycoin’s genesis address, Skycoin’s peers, Skycoin’s blockchain public key, etc.). You need to override all of these for your own coin.
Redirect it to a file and edit it:
skycoin newcoin config > mycoin.toml
Important: Every field you don’t explicitly change keeps Skycoin’s default value. Commenting a line out does not blank it — it falls through to the hardcoded Skycoin default. You must set fields to empty values to clear them.
Here is a complete working mycoin.toml ready to copy and paste. It overrides branding, ports, and blanks out genesis fields (which get auto-populated on first run) and Skycoin’s peer list (which you’ll fill in later when you have other nodes):
[node]
# Branding
display_name = "MyCoin"
ticker = "MYC"
coin_hours_display_name = "MyCoin Hours"
coin_hours_display_name_singular = "MyCoin Hour"
coin_hours_ticker = "MCH"
qr_uri_prefix = "mycoin"
bip44_coin = 9000
# Network — use different ports than Skycoin (6000/6420)
port = 7000
web_interface_port = 7420
data_directory = "$HOME/.mycoin"
# Genesis — leave blank, auto-populated on first run by GENESIS env var
genesis_signature_str = ""
genesis_address_str = ""
blockchain_pubkey_str = ""
blockchain_seckey_str = ""
genesis_timestamp = 0
# Supply — 100 trillion droplets = 100 million coins at 6 decimal places
# genesis_coin_volume = 100000000000000
# Peers — blank for now, add your node IPs after deployment
default_connections = []
peer_list_url = ""
# URLs — blank for now, set up after you have infrastructure
explorer_url = ""
version_url = ""
[params]
# Distribution addresses — auto-populated by fiberAddressGen in Step 3
distribution_addresses = []
For initial chain creation and localhost testing, the daemon flags --download-peerlist=false and --disable-default-peers handle the fact that there are no peers yet. Once you have other machines running your coin, come back and update mycoin.toml:
# Update these after deploying to other machines:
default_connections = ["node1.mycoin.com:7000", "node2.mycoin.com:7000"]
peer_list_url = "https://downloads.mycoin.com/blockchain/peers.txt"
explorer_url = "https://explorer.mycoin.com"
version_url = "https://version.mycoin.com/mycoin/version.txt"
$ skycoin newcoin --help
┌┐┌┌─┐┬ ┬┌─┐┌─┐┬┌┐┌
│││├┤ ││││ │ │││││
┘└┘└─┘└┴┘└─┘└─┘┴┘└┘
newcoin is a helper tool for creating new fiber coins
Usage:
skywire skycoin newcoin
Available Commands:
config Print fiber.toml config
createcoin Create a new coin from a template file
Step 3: Generate Distribution Addresses
FIBER_TOML=mycoin.toml skycoin cli fiberAddressGen -n 10
This generates 10 distribution addresses and automatically updates mycoin.toml with them. It also creates addresses.txt and seeds.csv — keep seeds.csv secure, it contains the wallet seeds for accessing distributed coins.
$ skycoin cli fiberAddressGen --help
Addresses are written in a format that can be copied into fiber.toml
for configuring distribution addresses.
Usage:
skywire skycoin cli fiberAddressGen [flags]
Flags:
-a, --addrs-file string Output file for generated addresses (default "addresses.txt")
-e, --entropy int Entropy of autogenerated bip39 seeds (128 or 256) (default 128)
-n, --num int Number of addresses to generate (default 100)
-o, --overwrite Allow overwriting existing files
-s, --seeds-file string Output file for addresses and seeds CSV (default "seeds.csv")
Step 4: Initialize Blockchain
GENESIS=genesis.json FIBER_TOML=mycoin.toml skycoin daemon \
--block-publisher \
--download-peerlist=false \
--disable-default-peers
This automatically:
- Loads credentials from
genesis.json - Loads configuration from
mycoin.toml - Creates the genesis block and signature
- Writes the genesis credentials back to
mycoin.toml
$ skycoin daemon --help
┌─┐┬┌─┬ ┬┌─┐┌─┐┬┌┐┌
└─┐├┴┐└┬┘│ │ │││││
└─┘┴ ┴ ┴ └─┘└─┘┴┘└┘
skycoin wallet
Environment variables:
FIBER_TOML Path to a fiber.toml file to load custom fibercoin configuration.
GENESIS Path to a genesis wallet JSON file (address, pubkey, seckey).
USER_BURN_FACTOR Coinhour burn factor for user-created transactions.
USER_MAX_TXN_SIZE Maximum transaction size in bytes for user-created transactions.
USER_MAX_DECIMALS Maximum decimal places for droplet precision (max 6).
Usage:
skywire skycoin daemon [flags]
Step 5: Distribute Genesis Coins
In a separate terminal, while the daemon is running:
RPC_ADDR="http://127.0.0.1:7420" COIN="mycoin" \
skycoin cli distributeGenesis \
$(jq -r '.entries[0].secret_key' genesis.json)
This creates block #1, distributing coins equally to all distribution addresses configured in your mycoin.toml.
$ skycoin cli distributeGenesis --help
Distributes the genesis block coins into the configured distribution addresses.
The genesis block contains a single transaction with a single output that creates
all coins in existence. Skycoin expects the second block to be a "distribution"
transaction, where the genesis coins are split into N distribution addresses,
each holding an equal amount.
RPC_ADDR must be set, to communicate with a running Skycoin node.
Usage:
skywire skycoin cli distributeGenesis [genesis address secret key] [flags]
Flags:
-s, --genesis-seckey string Genesis address secret key
Subsequent Runs
After the first run, mycoin.toml is fully populated with genesis credentials. You no longer need the GENESIS environment variable:
FIBER_TOML=mycoin.toml skycoin daemon \
--block-publisher \
--blockchain-secret-key=$(jq -r '.entries[0].secret_key' genesis.json)
Run a peer node on a different port:
FIBER_TOML=mycoin.toml skycoin daemon \
--port=7998 \
--data-dir=$HOME/.mycoin-peer \
--web-interface-port=7418
Import distribution wallets using seeds from seeds.csv:
skycoin cli walletCreate -s "seed phrase from seeds.csv" -l "Distribution 1"
Configuration Precedence
| Priority | Source |
|---|---|
| 1 (highest) | CLI flags |
| 2 | GENESIS environment variable |
| 3 | FIBER_TOML environment variable |
| 4 (lowest) | Hardcoded defaults |
Web Wallet and Explorer
Run the web wallet pointed at your Fibercoin node:
FIBER_TOML=mycoin.toml skycoin web \
--node-url http://localhost:7420 \
--wallet-dir ~/.mycoin/wallets
$ skycoin web --help
┌─┐┬┌─┬ ┬┌─┐┌─┐┬┌┐┌ ┬ ┬┌─┐┌┐
└─┐├┴┐└┬┘│ │ │││││───│││├┤ ├┴┐
└─┘┴ ┴ ┴ └─┘└─┘┴┘└┘ └┴┘└─┘└─┘
Thin client web wallet for Skycoin and fibercoins.
Usage:
skywire skycoin web [flags]
Flags:
-H, --host string Host to bind to (default "127.0.0.1")
-n, --node-url stringArray Node URL (can be specified multiple times)
-p, --port int Port to serve on (default 8001)
-w, --wallet-dir stringArray Local wallet directory
The web wallet auto-discovers your coin’s name, ticker, and coin hours from the node’s health endpoint. You can manage multiple fibercoins from a single wallet interface by passing multiple --node-url flags.
Run the blockchain explorer:
skycoin explorer --node-addr http://localhost:7420
$ skycoin explorer --help
┌─┐─┐ ┬┌─┐┬ ┌─┐┬─┐┌─┐┬─┐
├┤ ┌┴┬┘├─┘│ │ │├┬┘├┤ ├┬┘
└─┘┴ └─┴ ┴─┘└─┘┴└─└─┘┴└─
Flags:
-a, --api-only Only run the API, don't serve static content
-f, --files-folder string Path for precompiled front-end files
-n, --node-addr string Skycoin node address (default "http://127.0.0.1:6420")
-s, --server-host string Explorer bind address (default "127.0.0.1:8001")
Dedicated Binary with Hardcoded Defaults
The Quick Start workflow above is the recommended approach — you run any fibercoin directly from the existing skycoin or skywire binary with a fiber.toml config file. No compilation required.
However, if you want to compile a standalone binary for your fibercoin with all chain parameters, genesis credentials, peer lists, and network defaults hardcoded into the binary itself, you can generate Go source code and compile it. The reason to do this is for simpler deployment — you distribute a single binary with no config file dependency. Users of your coin just run ./mycoin daemon instead of needing to know about FIBER_TOML or carry a config file.
The code generation templates are embedded in the binary, so this works from any directory. Follow steps 1-3 from the Quick Start to create genesis.json, mycoin.toml, and distribution addresses, then generate source code:
skycoin newcoin createcoin --coin mycoin --config-file mycoin.toml
This creates cmd/mycoin/ with Go source that can be compiled into a standalone mycoin binary. All configuration from mycoin.toml is baked into the generated code — genesis credentials, peer list, ports, branding, distribution addresses. Changes require re-running createcoin and recompiling.
To compile:
cd cmd/mycoin && go build -o mycoin .
| Feature | Runtime Config (recommended) | Dedicated Binary |
|---|---|---|
| Distribution addresses | Loaded at runtime from fiber.toml | Compiled into binary |
| Changes | Edit fiber.toml, restart | Re-run createcoin, recompile |
| Multiple coins | One binary with different configs | Separate binary per coin |
| Deployment | Binary + fiber.toml | Binary only |
| Requires Go | Only if using go run | Yes (to compile) |
Security
| Classification | Files |
|---|---|
| Public (safe to share) | mycoin.toml (after genesis credentials populated), compiled binary, peers.txt, addresses.txt |
| Private (keep secure) | genesis.json (blockchain secret key), seeds.csv (wallet seeds), publisher node private keys |
The genesis secret key is never written to mycoin.toml — it only exists in genesis.json and must be provided separately for block publishing.
Production Deployment
Public API node (for mobile wallets):
FIBER_TOML=mycoin.toml skycoin daemon \
--enable-all-api-sets=true \
--disable-csrf \
--host-whitelist node.mycoin.com \
--port=6000 \
--web-interface-port=6419
Block publisher (internal):
FIBER_TOML=mycoin.toml skycoin daemon \
--block-publisher=true \
--blockchain-secret-key=$(cat /secure/publisher-key.txt) \
--port=6001 \
--web-interface-port=6418 \
--data-dir=$HOME/.mycoin-publisher
Reverse proxy (Caddy):
node.mycoin.com {
reverse_proxy 127.0.0.1:6419
}
explorer.mycoin.com {
reverse_proxy 127.0.0.1:8003
}
Typical infrastructure:
| Hostname | Purpose |
|---|---|
node.mycoin.com | Public API for wallets |
explorer.mycoin.com | Blockchain explorer |
downloads.mycoin.com/blockchain/peers.txt | Peer list |
version.mycoin.com/mycoin/version.txt | Version check |
Troubleshooting
Reset blockchain:
pkill -f "mycoin\|skycoin daemon"
rm -rf ~/.mycoin/data.db ~/.mycoin/history.db ~/.mycoin/*.log
sed -i 's/^genesis_address_str.*/genesis_address_str = ""/' mycoin.toml
sed -i 's/^blockchain_pubkey_str.*/blockchain_pubkey_str = ""/' mycoin.toml
sed -i 's/^genesis_signature_str.*/genesis_signature_str = ""/' mycoin.toml
GENESIS=genesis.json FIBER_TOML=mycoin.toml skycoin daemon --block-publisher
“Could not connect to any trusted peer” — normal for new coins with no network. Set up peers using default_connections in mycoin.toml.
Genesis signature not in fiber.toml after first run — check logs for Updated fiber.toml with genesis credentials, verify mycoin.toml is writable, and ensure FIBER_TOML env var is set.
One binary. One config file. Your own blockchain.
See also: Simplified Fibercoin Creation | Skycoin: One Binary, Every Tool | Skywire: One Binary, Everything You Need