Skip to content

Commit

Permalink
Added systemd service howto
Browse files Browse the repository at this point in the history
systemd support has been added in bisq-network/bisq#2501
  • Loading branch information
freimair committed Jul 20, 2019
1 parent dc6d213 commit 01b1cc1
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions exchange/howto/run-seednode.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ A seed node operator has the right to:
. Uptime of > 99.9%

=== Setup instructions
You can run your seed node in two ways:

== Setup instructions
- Option A: use the systemd service file provided
- Option B: create and use a shell script to run your seednode

==== Step 1. Install latest JDK

Expand All @@ -71,16 +73,39 @@ You need to have the latest JDK installed according to the link:https://github.c

We recommend cloning the Bisq Git repository and compiling the code on your server. This way, you have precise control over what version you want to deploy. Starting with "master" is a good place to start.

Furthermore, we recommend creating a user `bisq` in group `bisq` for service hardening reasons and using the `bisq`-users home directory to:

- install git
- `git clone [email protected]:bisq-network/bisq.git`
- `cd bisq`
- `git checkout <insert your release tag here>` (optional)
- `./gradlew build`

==== Step 3. Start your seed node for the first time
==== Step 3. Start your seed node

==== Option A: Use systemd to run your service
===== 1. Register your service

Copy the file `bisq-seednode.service` to your systemd service directory.

`cp seednode/bisq-seednode.service /usr/lib/systemd/system/`

and adapt it to your needs.

===== 2. Enable and start the seed node

You need to know the onion address of your seed node. But at the first start you don't know it. To solve that chicken and egg problem you start your seed node and later replace the placeholder with the real address.
Enable and start the seed node by

`systemctl enable bisq-seednode.service` +
`systemctl start bisq-seednode.service`

===== 3. Observe the logs

Keep an eye on the logs and see if anything works as expected:

`journalctl --unit bisq-seednode --follow`

==== Option B: Use a shell script
===== 1. Create two shell scripts:

start_btc_ONION_ADDRESS.sh: +
Expand Down Expand Up @@ -112,8 +137,6 @@ Go to `~/.local/share` and replace ONION_ADDRESS in the directory name with the

Once all the renaming is done you can finally start the seed node and it will be available to the network. Check if all is running as expected.



=== Step 3. Backup private key for onion address

Go to `~/.local/share/seed_BTC_MAINNET_ONION_ADDRESS/btc_mainnet/tor/hiddenservice/` and backup the private key and the hostname file in a safe location. If your server would crash you can re-install the same seed node with the private key. All other data like the `db` or the `keys` directory are not relevant for the seed node.
Expand Down

0 comments on commit 01b1cc1

Please sign in to comment.