required envvar DB_DIRECTORY not set
Hi, I'm new to this and I need your help. I've installed electrumx using my WSL Ubuntu 18.04. Once I enter "electrumx_server" on the terminal I get this:
angelo@DESKTOP-5QOEJVC:~/electrumx$ electrumx_server
INFO:electrumx:ElectrumX server starting
ERROR:electrumx:ElectrumX server terminated abnormally
Traceback (most recent call last):
File "/home/angelo/.local/bin/electrumx_server", line 31, in main
env = Env()
File "/home/angelo/.local/lib/python3.7/site-packages/electrumx/server/env.py", line 46, in __init__
self.db_dir = self.required('DB_DIRECTORY')
File "/home/angelo/.local/lib/python3.7/site-packages/electrumx/lib/env_base.py", line 40, in required
raise cls.Error(f'required envvar {envvar} not set')
electrumx.lib.env_base.EnvBase.Error: required envvar DB_DIRECTORY not set
What could it be the fault? Based on the errors, I haven't set DB_DIRECTORY and envvar(?). I've been trying to run my own electrum server in the last couple days, but I've found similar difficulties on my way to achieve it. Although, I don't want to give up, electrum rocks!
Thanks.
You need to configure some environment variables. Also see the HOWTO.
You need to configure some environment variables. Also see the HOWTO.
Hello, thanks.
I have downloaded the Bitcoin testnet block chain on my external hard drive and not anywhere inside the Ubuntu directories. Is this a problem? This is the content I've saved on DB_DIRECTORY of \scripts\electrumx\daemontools\env:
E:\p2p\BTC\AppData\testnet\testnet3.
I've also changed the other required variables, but still get the same error. I guess that it has to do with the fact that the Bitcoin database is located on the external drive, but I'd like you to confirm this.
Messing WSL and Windoze in one program is not good option - use storage on WSL not /mnt/c/data/whatever
Using windows directory from WSL will cause serious slowdowns.
You need to export needed variables before start serer.
You can do it by script, ie:
#!/bin/sh
export COIN=Bitcoin
export DAEMON_URL=http://testuser:[email protected]:11333
export NET=testnet
export DB_DIRECTORY=/home/username/electrumx/test-db
export SSL_CERTFILE=/home/username/electrumx/server.crt
export SSL_KEYFILE=/home/username/electrumx/server.key
export BANNER_FILE=/home/username/electrumx/banner-test
export DONATION_ADDRESS=your-donation-address
export SERVICES=rpc://,SSL://,TCP://
python ./electrumx_server 2>> electrumx-test.log >> electrumx-test.log &