Node Configuration
This guide covers all available configuration options for your Cloud Service node, helping you optimize performance, security, and functionality.
Configuration File Location
| OS | Path |
|---|---|
| Linux | ~/.cs/cs.conf |
| macOS | ~/Library/Application Support/Cloud Service/cs.conf |
| Windows | %APPDATA%\Cloud Service\cs.conf |
Configuration Options
Network Settings
ini
# Listen for incoming connections
listen=1
# Network port
port=16178
# Maximum number of inbound+outbound connections
maxconnections=128
# Maximum number of automatic connections
maxuploadtarget=0
# Peer timeout in milliseconds
peertimeout=30
# Enable NAT traversal (UPnP)
upnp=0
# Discover own IP address
discover=1
# Bind to specific address
# bind=<addr>[:<port>]
# External IP address (if behind NAT)
# externalip=<ip>[:<port>]RPC Settings
ini
# Enable JSON-RPC server
server=1
# RPC username
rpcuser=your_username
# RPC password
rpcpassword=your_secure_password
# RPC port
rpcport=16180
# Allow RPC connections from specific IP
rpcallowip=127.0.0.1
rpcallowip=192.168.1.0/24
# Bind RPC to specific address
rpcbind=127.0.0.1
# Enable REST API
rest=1
# Enable WebSocket
wsport=16181Performance Settings
ini
# Database cache size in MB
dbcache=2048
# Maximum orphan transactions in memory
maxorphantx=100
# Maximum memory pool size in MB
maxmempool=300
# Minimum relay fee rate (CS per KB)
minrelaytxfee=0.00001
# Maximum block size (bytes)
# blockmaxsize=750000
# Block priority size (bytes)
# blockprioritysize=0Index Settings
ini
# Maintain full transaction index
txindex=1
# Enable address index
addressindex=1
# Enable timestamp index
timestampindex=1
# Enable spent index
spentindex=1Pruning
ini
# Reduce storage requirements by pruning old blocks
# Value is in MB, minimum 550
prune=0
# Example: Limit to 10GB
# prune=10000Logging
ini
# Log to debug.log
debug=1
# Log specific categories
# debug=net
# debug=mempool
# debug=consensus
# debug=rpc
# debug=wallet
# Log timestamps
logtimestamps=1
# Log IP addresses
logips=0
# Shrink debug file on startup
shrinkdebugfile=1Mining Settings
ini
# Generate coins (mine)
gen=0
# Number of mining threads
# genproclimit=4
# Mining reward address
# miningaddress=<address>
# Block template size
# blockmintxfee=0.00001Wallet Settings
ini
# Enable wallet
disablewallet=0
# Transaction fee setting
paytxfee=0.0001
# Minimum confirmations for balance
minconf=1
# Key pool size
keypool=100
# Rescan blockchain on startup
rescan=0
# Zap wallet txes on startup
# zapwallettxes=1Node Management
ini
# Add specific nodes
# addnode=192.168.1.100:16178
# addnode=node.cs.network
# Connect only to specified nodes
# connect=192.168.1.100
# Whitelist peers (banscore exemption)
# whitelist=127.0.0.1
# whitelist=192.168.1.0/24
# Ban score threshold
banscore=100
# Ban threshold
bantime=86400Testnet/Regtest
ini
# Use testnet
testnet=0
# Use regression test mode
regtest=0
# Testnet port
# port=16179Sample Configurations
Basic Full Node
ini
# Basic Full Node Configuration
server=1
listen=1
port=16178
maxconnections=128
rpcuser=cscoinrpc
rpcpassword=changeme123
rpcport=16180
rpcallowip=127.0.0.1
dbcache=2048
txindex=1
debug=1Mining Node
ini
# Mining Node Configuration
server=1
listen=1
port=16178
maxconnections=64
rpcuser=miningrpc
rpcpassword=securepassword123
rpcport=16180
rpcallowip=127.0.0.1
rpcallowip=192.168.1.0/24
dbcache=1024
txindex=1
gen=1
miningaddress=your_cs_address_hereAPI Node
ini
# API Node Configuration
server=1
listen=1
port=16178
maxconnections=256
rpcuser=apirpc
rpcpassword=apipassword123
rpcport=16180
rpcallowip=127.0.0.1
rpcallowip=192.168.1.0/24
rest=1
wsport=16181
dbcache=4096
txindex=1
addressindex=1
timestampindex=1
spentindex=1Pruned Node
ini
# Pruned Node Configuration
server=1
listen=1
port=16178
maxconnections=64
rpcuser=prunedrpc
rpcpassword=prunedpassword123
rpcport=16180
rpcallowip=127.0.0.1
dbcache=512
prune=10000Command Line Options
All configuration options can also be passed via command line:
bash
# Start with custom config
csd -conf=/path/to/custom.conf
# Override config values
csd -dbcache=4096 -maxconnections=256
# Start in foreground for debugging
csd -printtoconsole
# Start with testnet
csd -testnet
# Specify data directory
csd -datadir=/path/to/dataEnvironment Variables
You can also use environment variables:
bash
export CSCOIN_RPC_USER=your_user
export CSCOIN_RPC_PASSWORD=your_password
export CSCOIN_DATA_DIR=/path/to/data
csd -daemonConfiguration Best Practices
Security
- Use strong passwords for RPC access
- Restrict RPC access to localhost or trusted IPs
- Don't expose RPC to the public internet
- Use firewall rules to limit access
- Keep software updated
Performance
- Set appropriate dbcache based on available RAM
- Use SSD storage for better I/O performance
- Limit maxconnections to prevent bandwidth saturation
- Enable pruning if disk space is limited
- Monitor resource usage regularly
Reliability
- Use systemd for automatic restart
- Set up monitoring and alerts
- Regular backups of wallet and config
- Log rotation for debug files
- Test configuration changes on testnet first
Next Steps
- Set up Monitoring & Maintenance
- Learn about Mining Overview
- Configure your Wallet