Create new fiber coins from a fiber.toml config file.
Two workflows:
- Quick Start (Recommended): Run with
skycoinbinary using environment variables (no compilation) - Standalone Binary: Generate coin-specific source code and compile a dedicated binary
Throughout this documentation, skycoin refers to any of the following interchangeable methods:
# From within cloned source directory
go run .
# From outside source (after PR #2740 merge)
go run github.com/skycoin/skycoin@develop
# With release binary (>v0.28.0)
skycoin
# From skywire release binary (>v1.3.31)
skywire skycoin
# Using skywire from outside source
go run github.com/skycoin/skywire@develop skycoinAll commands produce the same help menu:
$ skycoin
┌─┐┬┌─┬ ┬┌─┐┌─┐┬┌┐┌
└─┐├┴┐└┬┘│ │ │││││
└─┘┴ ┴ ┴ └─┘└─┘┴┘└┘
Available Commands:
cli skycoin command line interface
daemon skycoin wallet
explorer skycoin blockchain explorer
newcoin newcoin is a helper tool for creating new fiber coins
web skycoin thin client web wallet
Flags:
-b, --bv print runtime/debug.BuildInfo.Main.Version
-d, --info print runtime/debug.BuildInfo
-v, --version version for skycoin
For brevity, this documentation uses skycoin - substitute any method above.
Depends on your chosen method:
| Method | Requires |
|---|---|
| Release binary | Nothing (pre-compiled) |
go run github.com/skycoin/skycoin@develop |
go 1.23+ only |
go run . (from source) |
git and go 1.23+ |
Optional - Clone the source:
mkdir -p $HOME/go/src/github.com/skycoin
cd $HOME/go/src/github.com/skycoin
git clone https://github.com/skycoin/skycoin
cd skycoinTime: ~30 seconds | No compilation | Auto-configuration
skycoin cli addressGen > genesis.jsonCreates deterministic wallet with genesis address, blockchain public/secret keys.
skycoin newcoin config > mycoin.tomlEdit these fields:
display_name: "MyCoin" *ticker: "MYC" *genesis_coin_volume: 100000000000000port: 6000 *web_interface_port: 6420 *default_connections: ["your.server.ip:6000"] *initial_unlocked_count: Number of distribution addresses to unlock initially
* Required changes
Leave blank (auto-populated):
genesis_address_str,blockchain_pubkey_str,genesis_signature_str,distribution_addresses
FIBER_TOML=mycoin.toml skycoin cli fiberAddressGen -n 10Generates addresses and automatically updates mycoin.toml. Creates addresses.txt and seeds.csv (keep secure!).
GENESIS=genesis.json FIBER_TOML=mycoin.toml skycoin daemon --block-publisher --download-peerlist=false --disable-default-peersAutomatically:
- Loads credentials from genesis.json
- Loads config from mycoin.toml
- Creates genesis block and signature
- Writes genesis credentials back to mycoin.toml
In a separate terminal:
RPC_ADDR="http://127.0.0.1:7420" COIN="mycoin" skycoin cli distributeGenesis $(jq -r '.entries[0].secret_key' genesis.json)Creates block #1, distributing coins equally to all distribution addresses.
After first run, mycoin.toml is fully populated:
# Without GENESIS (using saved credentials)
FIBER_TOML=mycoin.toml skycoin daemon --block-publisher --blockchain-secret-key=$(jq -r '.entries[0].secret_key' genesis.json)
# Peer node (different port/directory)
FIBER_TOML=mycoin.toml skycoin daemon --port=7998 --data-dir=$HOME/.mycoin-peer --web-interface-port=7418Import distribution wallets using seeds from seeds.csv:
skycoin cli walletCreate -s "seed phrase from seeds.csv" -l "Distribution 1"For a standalone binary with compiled-in defaults:
Follow Quick Start steps 1-3 to create genesis.json, configure mycoin.toml, and generate distribution addresses.
skycoin newcoin createcoin --coin mycoin --config-file mycoin.tomlCreates:
cmd/mycoin/mycoin.go- Standalone executablecmd/mycoin/commands/root.go- CLI commandssrc/params/params.go- Parameters with compiled-in distribution addresses
Note: Distribution address changes require re-running createcoin.
go build ./cmd/mycoin
# Initialize
go run cmd/mycoin/mycoin.go --block-publisher --blockchain-secret-key=$(jq -r '.entries[0].secret_key' genesis.json)
# Distribute genesis
RPC_ADDR="http://127.0.0.1:7420" COIN="mycoin" skycoin cli distributeGenesis $(jq -r '.entries[0].secret_key' genesis.json)| Feature | Quick Start | Traditional |
|---|---|---|
| Distribution addresses | Loaded at runtime from fiber.toml | Compiled into binary |
| Changes | Edit fiber.toml (no recompile) | Requires recompilation |
| Multiple coins | One binary with different configs | Separate binary per coin |
| Deployment | Requires fiber.toml | Binary only |
Points to genesis wallet JSON (from cli addressGen). Takes precedence over fiber.toml for credentials. Secret key never written to fiber.toml.
GENESIS=/path/to/genesis.json skycoin daemon --block-publisherPoints to coin configuration file. Auto-updated with genesis credentials on first run.
FIBER_TOML=/path/to/mycoin.toml skycoin daemon- CLI flags (
--genesis-address,--blockchain-secret-key) GENESISenvironment variableFIBER_TOMLenvironment variable- Template defaults
skycoin cli fiberAddressGen [flags]Flags:
-n, --num int- Number of addresses (default 1)-a, --addr-file string- Output file (default "addresses.txt")-s, --seed-file string- Seed file (default "seeds.csv")--overwrite- Overwrite existing files
With FIBER_TOML set, automatically updates fiber.toml with distribution_addresses.
Security: seeds.csv contains wallet seeds - store offline, encrypt for production, never commit to version control.
skycoin cli distributeGenesis [genesis_secret_key] [flags]Prerequisites:
- Daemon running with
--block-publisher - Distribution addresses configured
- Blockchain at block 0 (genesis only)
Environment:
RPC_ADDR- RPC address (default: http://127.0.0.1:6420)COIN- Coin name for data directory
Queries daemon for distribution addresses, creates transaction splitting genesis coins equally, signs with genesis secret key, injects into blockchain.
skycoin newcoin createcoin --coin <name> --config-file <path> [flags]Generates coin-specific Go source files from fiber.toml templates. Use --template-dir to specify a custom template directory instead of the embedded templates. See skycoin newcoin createcoin --help for all flags.
# Print all templates to stdout
skycoin newcoin templates
# Export templates to a directory for customization
skycoin newcoin templates ./my-templatesExports the embedded newcoin templates to a directory so they can be customized. After editing, use them with createcoin:
skycoin newcoin createcoin --coin mycoin --template-dir ./my-templatesskycoin newcoin config > mycoin.tomlPrints the embedded default fiber.toml configuration to stdout.
Auto-populated:
genesis_address_str,blockchain_pubkey_str,genesis_signature_str(from GENESIS on first run)distribution_addresses(fromfiberAddressGen)
Customize before first run:
display_name,ticker- Coin brandinggenesis_coin_volume,max_coin_supply- Supply parametersport,web_interface_port- Network portsdefault_connections- Trusted peersinitial_unlocked_count,unlock_address_rate,unlock_time_interval- Distribution scheduleuser_burn_factor- Coinhour burn rate
See fiber.toml or skycoin newcoin config for all options.
Extremely sensitive - allows block publishing. Empty genesis wallet after distribution, but protect the key.
Development:
GENESIS=genesis.json FIBER_TOML=mycoin.toml skycoin daemon --block-publisherProduction:
echo "your-secret-key" > /secure/path/publisher-key.txt
chmod 600 /secure/path/publisher-key.txt
FIBER_TOML=mycoin.toml skycoin daemon \
--block-publisher \
--blockchain-secret-key=$(cat /secure/path/publisher-key.txt)
history -cPublic:
fiber.toml(after genesis credentials populated)- Compiled binary
peers.txt, blockchain dataaddresses.txt
Private:
genesis.json(blockchain secret key)seeds.csv(wallet seeds)- Publisher node private keys
Mobile Wallet Node:
FIBER_TOML=mycoin.toml skycoin daemon \
--enable-all-api-sets=true \
--disable-csrf \
--host-whitelist node.mycoin.com \
--port=6000 \
--web-interface-port=6419Block 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-publisherReverse Proxy (Caddy):
node.mycoin.com {
reverse_proxy 127.0.0.1:6419
}
explorer.mycoin.com {
reverse_proxy 127.0.0.1:8003
}
Typical Infrastructure:
node.mycoin.com- Public API for mobile walletsexplorer.mycoin.com- Blockchain explorerdownloads.mycoin.com/blockchain/peers.txt- Peer listversion.mycoin.com/mycoin/version.txt- Version check
# Stop instances
pkill -f "mycoin\|skycoin daemon"
# Remove blockchain data (keeps wallets)
rm -rf ~/.mycoin/data.db ~/.mycoin/history.db ~/.mycoin/*.log
# Clear genesis fields in fiber.toml
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
# Re-run
GENESIS=genesis.json FIBER_TOML=mycoin.toml skycoin daemon --block-publisher"Failed to load GENESIS wallet"
- Verify path and JSON validity:
jq . genesis.json - Check permissions:
chmod 600 genesis.json
"Failed to load FIBER_TOML config"
- Verify path and TOML syntax
- Ensure required fields are present
Help menu doesn't show custom values
- Set environment variables before
--help:GENESIS=genesis.json FIBER_TOML=mycoin.toml skycoin --help
"Could not connect to any trusted peer"
- Normal for new coins with no network
- Set up peer network using
default_connectionsin fiber.toml
Genesis signature not in fiber.toml after first run
- Check logs for "Updated fiber.toml with genesis credentials"
- Verify fiber.toml is writable
- Ensure FIBER_TOML env is set
❌ 8+ manual copy-paste steps
❌ Parse genesis signature from logs
❌ Multiple restarts and re-runs
❌ 10+ minutes, error-prone
✅ 4 commands total
✅ Auto-populates fiber.toml
✅ Zero manual copy-paste
✅ ~30 seconds, reliable
Benefits:
- ⚡ Fast: 30 seconds vs. 10+ minutes
- 🎯 Reliable: No manual copy-paste
- 🔒 Secure: Secret key never written to fiber.toml
- 📦 Portable: Single binary, multiple coins
- 🔄 Flexible: Change config without recompiling
- 💰 Working distributeGenesis: Auto-reads daemon config
- Troubleshooting section above
- GitHub Issues
- Telegram: @skycoin or @skywire