βœ‹-Dockerless Setup
This page contains instructions how to natively install opendexd and its minimal dependencies lnd (BTC) & connext (ETH & ERC20) on linux. It is mainly geared towards developers and administrators which prefer a native installation over docker.

Requirements

Make sure to have the following installed:

opendexd

Option 1: Installing latest release via npm

This is the easiest and fastest way to install opendexd on a amd64 machine:
1
sudo npm install opendexd -g --unsafe-perm
Copied!

Option 2: Cloning from GitHub

Testers and developers are encouraged to clone the repository from GitHub and install from source:
1
git clone https://github.com/opendexnetwork/opendexd
2
cd opendexd
3
npm install
4
npm run compile
5
npm run compile:seedutil
Copied!
If you are on an architecture that is not amd64, you'll have to remove grpc-tools and potentially others from the devDependencies section of package.json.

Daemonize opendexd

If you want to daemonize opendexd, so that it starts on boot without needing its own terminal, you can do this using systemd:
1
[Unit]
2
Description=opendexd
3
​
4
[Service]
5
User=opendexd
6
Group=opendexd
7
Type=simple
8
Environment=NODE_ENV=production
9
ExecStart=/home/opendexd/opendexd/bin/opendexd --mainnet
10
KillMode=process
11
KillSignal=SIGINT
Copied!

LND (BTC)

Daemonize lnd

If you want to daemonize lnd, so that it starts on boot without needing its own terminal, you can do this using systemd:
1
[Unit]
2
Description=LND
3
​
4
[Service]
5
User=opendexd
6
Group=opendexd
7
Type=simple
8
ExecStart=/home/opendexd/lnd/bin/lnd --bitcoin.mainnet
9
KillMode=process
10
KillSignal=SIGINT
Copied!

Connext

Follow the docs, you want the node: vector node + database stack.

Daemonize connext

If you want to daemonize connext, so that it starts on boot without needing its own terminal, you can do this using systemd:
1
[Unit]
2
Description=Connext
3
​
4
[Service]
5
User=opendexd
6
Group=opendexd
7
Type=simple
8
Environment="NODE_ENV=production"
9
Environment="CONNEXT_NODE_URL=https://connext.boltz.exchange"
10
Environment="CONNEXT_ETH_PROVIDER_URL=http://eth.kilrau.com:41007"
11
Environment="LEGACY_MODE=true"
12
WorkingDirectory=/home/opendexd/connext/
13
ExecStart=node /home/opendexd/connext/build/src/index.js
14
KillMode=process
15
KillSignal=SIGINT
Copied!

Tor

You can install tor via sudo apt install tor on most linux distros nowadays, just make sure the version is fairly recent. If not, consult the tor installation guides. Run systemctl status tor or ps aux | grep tor to verify the tor process is running.

Putting it all together

Create the following opendexd.conf in /home/opendexd/.opendexd:
1
mainnet = true
2
​
3
[p2p]
4
tor = true
5
torport = 9050
6
​
7
[connext]
8
disable = false
9
host = "localhost"
10
port = 8000
11
webhookhost = "localhost"
12
webhookport = 8887
13
​
14
[lnd.BTC]
15
disable = false
16
host = "localhost"
17
certpath = "/home/opendexd/.lnd/tls.cert"
18
macaroonpath = "/home/opendexd/.lnd/admin.macaroon"
19
​
20
[lnd.LTC]
21
disable = true
Copied!
For convenience, consider adding alias opendex-cli='/home/opendexd/opendexd/bin/opendex-cli -p 8886' to the opendexd user's .bashrc and source it. Then restart opendexd once (e.g. with systemctl restart opendexd) and try running opendex-cli getinfo, which should return with an overview of opendexd's, as well as lnd's and connext status.
Ping us in the help channel of our Discord server for support.

Tips 'n Tricks

  • When installing on a Raspberry Pi you might see Unexpected error during initialization. Here is the solution.
  • If you see an install error when installing via npm install, try npm install --production & npm install typescript.
Last modified 1mo ago