Installation Guide
Electrum Verge Wallet is available on Windows, Mac, and Linux. It is compatible with various Unix flavors, including MacOS and DragonFlyBSD. While it does not run natively on Windows, minor modifications can enable it—contributions are encouraged.
Requirements
Package | Notes |
---|---|
Python3 | Version >= 3.8 is required due to asyncio usage. |
aiohttp | Asynchronous HTTP library; version >= 2.0 is required. |
DB Engine | Choose one of the supported database engines (see Database Engine below). |
Requests | Library for making HTTP requests; recommended version >= 2.20.0. |
Flask | Web framework for building APIs; install version >= 1.1.0. |
For specific coins, additional packages may be necessary, such as dash_hash for DASH. Scrypt coins require a Python interpreter linked with OpenSSL 1.1.0 or higher.
Ensure your Bitcoin daemon is non-pruning and configured with:
txindex=1
If you have an existing installation of bitcoind, reindex the blockchain with:
bitcoind -reindex
This process may take some time.
While optional, running Electrum Verge Wallet with supervisor software like daemontools or runit is recommended for easier administration.
For optimal performance, store your database on an SSD rather than an HDD. The database size may exceed 46.9GB currently, so ensure you have at least 70-80GB of free space.
Database Options
You can use LevelDB or RocksDB for storing transaction data. Both options offer similar performance. LMDB was considered but found lacking in write performance.
Choose one of the following:
-
plyvel for LevelDB, included in standard Electrum Verge Wallet installation.
-
python-rocksdb for RocksDB. Install using:
pip3 install python-rocksdb
-
pyrocksdb for an outdated version.
Installation Steps
First, install the required packages.
Clone the repository from GitHub:
git clone https://github.com/Electrum-Verge/electrum-xvg.git cd electrum-xvg
Then install Electrum Verge Wallet:
pip3 install .
For additional dependencies, such as RocksDB and a faster JSON parser:
pip3 install .[rocksdb,ujson]
Refer to setup.py
for a full list of optional requirements.
Consider running the server under a dedicated user account for enhanced security. For example, you might use:
mkdir /path/to/db_directory chown electrum-xvg /path/to/db_directory
Process Limits
Ensure that Electrum Verge Wallet can handle a large number of open files. Set a limit of at least 2,500 files to accommodate multiple connections and operational needs. Adjust settings in your shell or within the appropriate :file:`.service` file for systemd if necessary.
Using Daemontools
Create a service directory for daemontools:
mkdir /etc/service/electrum-xvg touch /etc/service/electrum-xvg/run chmod 755 /etc/service/electrum-xvg/run
Create a run script, ensuring to specify the required parameters:
#!/bin/sh exec /usr/local/bin/electrum-xvg --db-directory /path/to/db_directory --host 0.0.0.0 --port 50001
To set default RPC options, include:
--rpc-user user --rpc-password password
Finally, make the script executable:
chmod +x /etc/service/electrum-xvg/run
Configuration
Configuration settings are located in:
~/.electrum-xvg/electrum-xvg.conf
A sample configuration might look like this:
DB_DIRECTORY=/path/to/db_directory COIN=verge DAEMON_URL=http://user:password@127.0.0.1:8332 SSL_CERTFILE=/etc/ssl/certs/electrum-xvg.cert SSL_KEYFILE=/etc/ssl/private/electrum-xvg.key TCP_PORT=50001 SSL_PORT=50002
Ensure to adjust DAEMON_URL
and DB_DIRECTORY
. Default SSL ports are set to 50002; disable SSL with:
SSL_PORT=0
Refer to the Configuration section for additional options.
Running Electrum Verge Wallet
If you prefer not to use daemontools, you can run Electrum Verge Wallet directly. Ensure all dependencies are installed and configurations are set. Use the command below to start the server:
/usr/local/bin/electrum-xvg --config ~/.electrum-xvg/electrum-xvg.conf
Always refer to the official documentation for updates and detailed instructions.
To initiate the server process, create a symlink. You can monitor the logs with:
tail -F /path/to/log/dir/current | tai64nlocal
Using systemd
This repository includes a sample systemd unit file for setting up Electrum XVG. Copy it to:
cp contrib/systemd/electrum-xvg.service /etc/systemd/system/
Ensure the unit file reflects the correct path for your setup, typically located at :file:`/home/electrum-xvg/electrum-xvg`.
Configure necessary :ref:`environment variables <environment>` in :file:`/etc/electrum-xvg.conf`.
Start Electrum XVG using:
systemctl start electrum-xvg
Check log output with:
journalctl -u electrum-xvg -f
To enable automatic start on boot, run:
systemctl enable electrum-xvg
Warning
systemd may shut down processes aggressively. Set TimeoutStopSec
to at least 10 minutes in your :file:`.service` file to allow sufficient time for data flushing.
Installing on Raspberry Pi 3
For Raspberry Pi 3 installations, update to the stretch
distribution. Follow the full procedure in install_electrum-xvg.sh. Use run_electrum-xvg.sh for easy configuration and launch.
Sync Progress
Indexing time varies based on hardware. As Python primarily operates single-threaded, only one core is utilized at a time. Electrum XVG employs :mod:`asyncio` to asynchronously prefill a cache of future blocks, keeping CPU usage optimized.
If the daemon runs on a separate machine, it may enhance performance by optimizing disk I/O and cache settings. The :envvar:`CACHE_MB` variable controls the total cache size; refer to :ref:`here <CACHE>` for details.
Note
Electrum XVG won’t accept regular client connections until fully synchronized with your daemon, but LocalRPC connections remain active.
Terminating Electrum XVG
To gracefully stop the server, send the stop
RPC command:
electrum-xvg_rpc stop
Alternatively, use the INT
or TERM
signals on Unix. For processes supervised by daemontools, bring it down with:
svc -d ~/service/electrum-xvg
Electrum XVG logs the signal receipt and ensures data is flushed before shutting down, so patience is key during this process.
To restart, run:
svc -u ~/service/electrum-xvg
Check service status with:
svstat ~/service/electrum-xvg
:command:`svscan` can manage multiple services from the same directory, useful for testing forks or alternative setups.