Bitcoin Forum
July 14, 2024, 08:48:56 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: file location after bitcoin-core installation  (Read 197 times)
22bits (OP)
Member
**
Offline Offline

Activity: 85
Merit: 25


View Profile
May 15, 2024, 09:22:59 AM
Merited by LoyceV (4), ABCbits (2)
 #1

I have installed bitcoin-core on with the following environment:
Bitcoin Client Software and Version Number:  bitcoin-25.0-x86_64-linux-gnu
Operating System: Ubuntu 22.04.4 LTS
System Hardware Specs: Intel(R) Core(TM) i5-3470T CPU @ 2.90GHz 1 physical processor; 2 cores; 4 threads, RAM 7909288 KiB

What I am wondering is about file locations.  There is documentation on running the core as a systemd job in the background which I will be able to set up.  There is also information on various paths assumed in the documentation, such as:



Code:
Binary:              /usr/bin/bitcoind
Configuration file:  /etc/bitcoin/bitcoin.conf
Data directory:      /var/lib/bitcoind
PID file:            /var/run/bitcoind/bitcoind.pid (OpenRC and Upstart) or
                     /run/bitcoind/bitcoind.pid (systemd)

Am I correct in thinking after the install I should manually move the specified files from the current location:
Code:
~/snap/bitcoin-core/common/.bitcoin

to the specified directories?  Or is there a problem with the install that the files were not created there?

ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
May 15, 2024, 09:26:56 AM
Merited by ABCbits (1), promise444c5 (1)
 #2

You don't have to. During the initialization, if Bitcoin Core doesn't detect a data directory then it would prompt the user to specify a data directory. Else, it would automatically create a data directory for you in the default data directory path.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
22bits (OP)
Member
**
Offline Offline

Activity: 85
Merit: 25


View Profile
May 15, 2024, 09:39:42 AM
 #3


Quote
You don't have to. During the initialization, if Bitcoin Core doesn't detect a data directory then it would prompt the user to specify a data directory. Else, it would automatically create a data directory for you in the default data directory path.
That makes sense, but what about the bitcoin-core executable, wouldn't that need to be there or how would it know what to run?
22bits (OP)
Member
**
Offline Offline

Activity: 85
Merit: 25


View Profile
May 15, 2024, 02:49:01 PM
 #4

There is this line in the bitcoind.service systemd file:

Code:
ExecStart=/usr/bin/bitcoind

As far as I understand it the bitcoind mentioned above is a script, not an executable, correct?   Or should it be an executable?  I tried moving an executable to /usr/bin/bitcoind but get an error 203 when starting the service.

What should end up in /usr/bin/bitcoind and is there on in the install instructions somewhere?

reference:  https://github.com/bitcoin/bitcoin/blob/master/contrib/init/bitcoind.service
22bits (OP)
Member
**
Offline Offline

Activity: 85
Merit: 25


View Profile
May 15, 2024, 03:10:41 PM
Last edit: May 15, 2024, 03:21:28 PM by 22bits
 #5

I also found this: https://www.reddit.com/r/Bitcoin/comments/wfhuyy/how_to_setup_bitcoincore_snap_on_ubuntu_2204/ -- the significant quote is:
Quote
I think I may have worked this out. In /snap/bin there is a symlink called bitcoin-core.daemon.

When I run this it creates a directory structure ~/snap/bitcoin-core in the current user account.

Is this something necessary to do during the install to set up the data directories needed for the systemd?:
Code:
Binary:              /usr/bin/bitcoind
Configuration file:  /etc/bitcoin/bitcoin.conf
Data directory:      /var/lib/bitcoind
PID file:            /var/run/bitcoind/bitcoind.pid (OpenRC and Upstart) or
                     /run/bitcoind/bitcoind.pid (systemd)

I did find the reference symlink in /snap/bin

Also from the documentation as referenced the specified directories automatically get created. 
Quote
NOTE: When using the systemd .service file, the creation of the aforementioned directories and the setting of their permissions is automatically handled by systemd. Directories are given a permission of 710, giving the bitcoin group access to files under it if the files themselves give permission to the bitcoin group to do so. This does not allow for the listing of files under the directory.
So to get the systemd service running, I believe I need to know if I can just copy the executable over to /usr/bin/bitcoind or does this need to be a script?
Sorry for question not being too clear, just really beating head against wall on this one Smiley
22bits (OP)
Member
**
Offline Offline

Activity: 85
Merit: 25


View Profile
May 15, 2024, 03:32:44 PM
 #6

Another note:  I think it is a problem with the original snap installation.  I just went to the Ubuntu Software and clicked on the bitcoin-core.  The process is a bit different from the more manual one specified here:
https://blockgeeks.com/install-bitcoin-core/
which includes this:
Quote
We’ll now use the install command to install the necessary components into the /usr/local/bin directory like so:

sudo install -m 0755 -o root -g root -t /usr/local/bin *

Think this is what I am missing, with check this tomorrow.
22bits (OP)
Member
**
Offline Offline

Activity: 85
Merit: 25


View Profile
May 16, 2024, 05:09:54 AM
 #7

Makes more sense now.  The snap installation and the installation here:
https://bitcoin.org/en/full-node#linux-instructions
do not have the same result. 
I re-did following the above and using the daemon, works fine. 
Cricktor
Legendary
*
Offline Offline

Activity: 826
Merit: 1204


Crypto Swap Exchange


View Profile
May 20, 2024, 07:45:23 PM
 #8

I had various issues with the Snap package of Bitcoin Core in my Ubuntu LTS 22.04.x, particularly it didn't work properly with Tor installed and running. I think it was when Bitcoin Core 23 or 24 was the current version. I could pinpoint the issue that the snap package wasn't configured properly but I lacked the knowledge to fix this Snap quirk.

Maybe the current Snap package is fine, but back then I simply installed Bitcoin Core from the tarball and all was fine and working smoothly.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
May 21, 2024, 03:30:47 AM
 #9

I had various issues with the Snap package of Bitcoin Core in my Ubuntu LTS 22.04.x, particularly it didn't work properly with Tor installed and running. I think it was when Bitcoin Core 23 or 24 was the current version. I could pinpoint the issue that the snap package wasn't configured properly but I lacked the knowledge to fix this Snap quirk.

Maybe the current Snap package is fine, but back then I simply installed Bitcoin Core from the tarball and all was fine and working smoothly.
Was it a connection issue, or a data directory issue? I just started running a few nodes on Ubuntu via Snap and all was okay. Did the logs say anything?


@OP


Snap configures everything for you and you just need to run the app. If not, then you just have to navigate to the snap/bin folder and execute it. A default data dir will be in ~/snap/bitcoin-core/common/.bitcoin

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Cricktor
Legendary
*
Offline Offline

Activity: 826
Merit: 1204


Crypto Swap Exchange


View Profile
May 21, 2024, 09:29:03 PM
Merited by ranochigo (1)
 #10

Was it a connection issue, or a data directory issue? I just started running a few nodes on Ubuntu via Snap and all was okay. Did the logs say anything?

No, the issue was that Bitcoin Core v23 in my case couldn't read Tor's cookie file as the Snap's system file interface for the Snap package of Core v23 was apparently broken or incomplete. Back then I opened this packaging issue on Github snap: tor's cookie file not visible for Bitcoin Core #159. It might have been fixed, not sure though, as I abandoned to use the snap package of Core.

Unfortunately I didn't find the time to dig deeper into Snap and fix the issue myself and provide a patch.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
NotATether
Legendary
*
Offline Offline

Activity: 1666
Merit: 7017


In memory of o_e_l_e_o


View Profile WWW
May 23, 2024, 07:59:59 AM
 #11

Was it a connection issue, or a data directory issue? I just started running a few nodes on Ubuntu via Snap and all was okay. Did the logs say anything?

No, the issue was that Bitcoin Core v23 in my case couldn't read Tor's cookie file as the Snap's system file interface for the Snap package of Core v23 was apparently broken or incomplete. Back then I opened this packaging issue on Github snap: tor's cookie file not visible for Bitcoin Core #159. It might have been fixed, not sure though, as I abandoned to use the snap package of Core.

Unfortunately I didn't find the time to dig deeper into Snap and fix the issue myself and provide a patch.

I don't like using snap packages in general as they tend to have all sorts of random permissions issues if the distributor is not careful packaging it.

Generally I would just stick to using the standalone binaries of Bitcoin Core, or if you *really* have to partition the binaries somewhere else, then by installing it on a custom path. Like /opt/bitcoin or something like that.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Cricktor
Legendary
*
Offline Offline

Activity: 826
Merit: 1204


Crypto Swap Exchange


View Profile
May 23, 2024, 11:00:58 PM
 #12

I'm not yet decided if I'm going to like or hate snap. When you run into such a weird trouble like I did with Core v23 installed via snap, it's a pain in the ass for sure. I used Ubuntu for a long time but know I'm somewhat torn apart as Ubuntu really focusses on Snap a lot. Still trying to figure out what exactly Snap tries to make better than other packaging variants.

Snap packagers/distributors should know what they're doing.  Grin      Yes, I know, I'm dreaming of unicorns puking rainbows. Roll Eyes

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!