Setting db and indexer paths when running CKB

Is it possible to set these paths using the CLI or in the .toml file when launching CKB from CLI?

Yes, use the -C <path> switch on the command line. This will change the directory that is used for the TOML files and data directories.

Usage example:

wget https://github.com/nervosnetwork/ckb/releases/download/v0.110.0/ckb_v0.110.0_x86_64-unknown-linux-gnu.tar.gz
tar xzf ckb_v0.110.0_x86_64-unknown-linux-gnu.tar.gz
cd ckb_v0.110.0_x86_64-unknown-linux-gnu/
mkdir config-set-1
./ckb init -C config-set-1 --chain dev
./ckb -C config-set-1 run
./ckb -C config-set-1 miner

thanks for checking on this Jordan. What I’m trying to do specifically is set the db path to be on one drive and the indexer on another.

I’m trying to sync a low spec machine and right now I have both the db and indexer on a microSD. Because the indexer is more hot I was thinking it might improve performance if I had the indexer on the hard drive instead of the card.

I know with Neuron we had the ability to configure them separately for a period but they’re merged now.

In ckb.toml you can configure the indexer_v2 section as follows.

[indexer_v2]
index_tx_pool = false
store = "/tmp/indexer/store-path"
secondary_path = "/tmp/indexer/sp-path"

Another solution: creating a symbolic link at data/indexer to the target directory.

Awesome, thank you guys.

Sync has crashed twice now (750k blocks synced), hoping this might make it more stable.