Title: Configuring bitcoin-core Snap package in Ubuntu Server 20.04 Post by: CONFIDENCE_Man on February 27, 2021, 03:13:46 AM In order to take advantage of automatic updates, I've installed the bitcoin-core Snap package under Ubuntu Server 20.04 (no GUI) running on Microsoft Hyper-V Server 2019.
I need to be able to do the following:
I can't find any good guides on how to do this without installing the GUI to specify the data directory. (I've actually tried to install 'ubuntu-desktop' through Apt, but after a reboot of the VM, it just displays a blank cursor on the console. I'd rather not have a GUI on this VM anyhow.) Does anyone else have such a setup that's working? Title: Re: Configuring bitcoin-core Snap package in Ubuntu Server 20.04 Post by: NotATether on March 02, 2021, 04:23:08 PM The first setting can be added into the bitcoin.conf file:
- To change the data directory, create a file called /home/bitcoin/.bitcoin/bitcoin.conf and inside it type the line Code: datadir=/media/bitcoin_data As for starting at boot, there is no such option in bitcoin.conf, however you can make a systemd service that starts bitcoind as the "bitcoin" user at system startup. 1. In your VM create a file called bitcoind.service with the following contents: Code: [Unit] 2. Put this file in /usr/lib/systemd/system 3. Run the following commands: Code: sudo systemctl daemon-reload |