Skip to content

Node Configuration ​

This guide covers all available configuration options for your Cloud Service node, helping you optimize performance, security, and functionality.

Configuration File Location ​

OSPath
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=26125

# 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=16181

Performance 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=0

Index Settings ​

ini
# Maintain full transaction index
txindex=1

# Enable address index
addressindex=1

# Enable timestamp index
timestampindex=1

# Enable spent index
spentindex=1

Pruning ​

ini
# Reduce storage requirements by pruning old blocks
# Value is in MB, minimum 550
prune=0

# Example: Limit to 10GB
# prune=10000

Logging ​

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=1

Mining Settings ​

ini
# Generate coins (mine)
gen=0

# Number of mining threads
# genproclimit=4

# Mining reward address
# miningaddress=<address>

# Block template size
# blockmintxfee=0.00001

Wallet 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=1

Node Management ​

ini
# Add specific nodes
# addnode=192.168.1.100:26125
# addnode=seed.cscloudservice.com

# 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=86400

Testnet/Regtest ​

ini
# Use testnet
testnet=0

# Use regression test mode
regtest=0

# Testnet port
# port=26128

Sample Configurations ​

Basic Full Node ​

ini
# Basic Full Node Configuration
server=1
listen=1
port=26125
maxconnections=128
rpcuser=cscoinrpc
rpcpassword=changeme123
rpcport=16180
rpcallowip=127.0.0.1
dbcache=2048
txindex=1
debug=1

Mining Node ​

ini
# Mining Node Configuration
server=1
listen=1
port=26125
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_here

API Node ​

ini
# API Node Configuration
server=1
listen=1
port=26125
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=1

Pruned Node ​

ini
# Pruned Node Configuration
server=1
listen=1
port=26125
maxconnections=64
rpcuser=prunedrpc
rpcpassword=prunedpassword123
rpcport=16180
rpcallowip=127.0.0.1
dbcache=512
prune=10000

Command 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/data

Environment 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 -daemon

Configuration Best Practices ​

Security ​

  1. Use strong passwords for RPC access
  2. Restrict RPC access to localhost or trusted IPs
  3. Don't expose RPC to the public internet
  4. Use firewall rules to limit access
  5. Keep software updated

Performance ​

  1. Set appropriate dbcache based on available RAM
  2. Use SSD storage for better I/O performance
  3. Limit maxconnections to prevent bandwidth saturation
  4. Enable pruning if disk space is limited
  5. Monitor resource usage regularly

Reliability ​

  1. Use systemd for automatic restart
  2. Set up monitoring and alerts
  3. Regular backups of wallet and config
  4. Log rotation for debug files
  5. Test configuration changes on testnet first

Next Steps ​

Released under the MIT License.