Skip to content

Electrs Setup on Ubuntu

Dan Janosik edited this page Aug 14, 2021 · 6 revisions
  • Install Rust

      curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
  • Install build packages

      apt install clang cmake build-essential
    
  • We're going to dynamically link with rocksdb, so install that

      apt install librocksdb-dev
    
  • Clone...

      git clone https://github.com/romanz/electrs
      cd electrs
    
  • Build...

      ROCKSDB_INCLUDE_DIR=/usr/include ROCKSDB_LIB_DIR=/usr/lib cargo build --locked --no-default-features --release
    
  • Grab a config file and edit as needed

      wget https://raw.githubusercontent.com/janoside/bitcoin-resources/master/files/electrs.toml
    
  • Start

      nohup /path/to/electrs/target/release/electrs > out.log &