Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ cd ~
$ wget https://github.com/monacoinproject/monacoin/releases/download/monacoin-0.17.1/monacoin-0.17.1-x86_64-linux-gnu.tar.gz
$ tar -zxvf monacoin-0.17.1-x86_64-linux-gnu.tar.gz
$ sudo cp monacoin-0.17.1/bin/monacoind /usr/bin/
$ sudo cp monacoin-0.17.1/bin/monacoin-cli /usr/bin/
$ mkdir .monacoin
$ vi .monacoin/monacoin.conf
=====monacoin.conf=====
server=1
txindex=0
cookie="rpcuser:rpcpass"
=====monacoin.conf=====
$ monacoind -daemon
$ sudo apt install git clang cmake cargo curl
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ source ~/.cargo/env
$ git clone https://github.com/romanz/electrs.git
$ cd electrs
$ cargo build --release
$ mkdir ~/electrs_data
cargo run --release -- -vvv --timestamp --network mainnet --jsonrpc-import --daemon-dir /home/<yourhomedirectory>/.monacoin --daemon-rpc-addr ::1:9402 --db-dir /home/<yourhomedirectory>/electrs_data
Ctrl+c
$ sudo vi /etc/systemd/system/electrs.service
=====electrs.service=====
[Unit]
Description=Electrs
[Service]
WorkingDirectory=/home/<yourhomedirectory>/electrs
ExecStart=/home/<yourhomedirectory>/electrs/target/release/electrs --jsonrpc-import --daemon-dir /home/<yourhomedirectory>/.monacoin --daemon-rpc-addr ::1:9402 --db-dir /home/<yourhomedirectory>/electrs_data
User=<yourhomedirectory>
Type=simple
KillMode=process
TimeoutSec=60
Restart=always
RestartSec=60
[Install]
WantedBy=multi-user.target
=====electrs.service=====
$ sudo systemctl daemon-reload
$ sudo systemctl start electrs
# If you want to use SSL, see it.
https://github.com/romanz/electrs/blob/master/doc/usage.md#ssl-connection
# and attach option ``--electrum-rpc-addr "0.0.0.0:50001"``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment