<p>Referencing <a href="https://bitcoin.stackexchange.com/a/38133/111738">this</a> solution:</p>
<p><strong>My favorite method:</strong></p>
<ul>
<li>grab out a old/unused pc/mac</li>
<li>install a linux over usb (maybe <a href="https://tails.boum.org/index.de.html" rel="nofollow noreferrer">Talis</a>) (make sure your USB stick is clean!)</li>
<li>download a recent version of bitcoin-core (check hash, verify gitian signatures)</li>
<li>copy bitcoin-core over usb to your offline machine</li>
<li>start <code>./bitcoind</code></li>
<li><code>./bitcoin-cli getnewaddress</code> (gives you a new public key)</li>
<li><code>./bitcoin-cli dumpprivatekey</code> (gives you the corresponding private key)</li>
<li>print or write down both strings (address can be recreated from private key, but print it anyhow)</li>
<li>verify the printed or written down strings</li>
<li>try to delete printers cache (power off, reset)</li>
</ul>
<p><strong>Now you could delete/format the pc/mac.</strong>
But maybe it's worth keeping your new offline computer to generate new addresses or sign transaction in a &quot;cold space/wallet&quot;.</p>
<p>I've installed <code>bitcoin-core</code> using <code>snap</code> on <code>Ubuntu</code> and ready to start a dry-run of this for reference.  However, disk space is limited, and, even then, I have no interest in downloading the blockchain itself.</p>
<p>How do I start <code>bitcoind</code> for generating a wallet?</p>
<p>I have:</p>
<pre><code>nicholas@mordor:~$ 
nicholas@mordor:~$ bitcoin-core.cli status
error: Could not connect to the server 127.0.0.1:8332

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
nicholas@mordor:~$ 
nicholas@mordor:~$ bitcoin-core.cli getblockchaininfo
error: Could not connect to the server 127.0.0.1:8332

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
nicholas@mordor:~$ 
nicholas@mordor:~$ bitcoin-core.cli start
error: Could not connect to the server 127.0.0.1:8332

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
nicholas@mordor:~$ 
</code></pre>
<p>and am just looking to run <code>bitcoin-core</code> in pruning mode to play with.</p>
<p>I want to run a command like:</p>
<p>bitcoin-cli -testnet getblockchaininfo</p>
<p>Because I installed with <code>snap</code> I can run <code>snap info bitcoin-core</code> but <code>man bitcoin-core</code> doesn't give any results.</p>
<p>Starting the <code>daemon</code>:</p>
<pre><code>nicholas@mordor:~$ 
nicholas@mordor:~$ bitcoin-core.daemon
2020-11-11T20:55:32Z Bitcoin Core version v0.20.1 (release build)
2020-11-11T20:55:32Z Assuming ancestors of block 0000000000000000000f2adce67e49b0b6bdeb9de8b7c3d7e93b21e7fc1e819d have valid signatures.
2020-11-11T20:55:32Z Setting nMinimumChainWork=00000000000000000000000000000000000000000e1ab5ec9348e9f4b8eb8154
2020-11-11T20:55:32Z Using the 'sse4(1way),sse41(4way)' SHA256 implementation
2020-11-11T20:55:32Z Default data directory /home/nicholas/snap/bitcoin-core/common/.bitcoin
2020-11-11T20:55:32Z Using data directory /home/nicholas/snap/bitcoin-core/common/.bitcoin
2020-11-11T20:55:32Z Config file: /home/nicholas/snap/bitcoin-core/common/.bitcoin/bitcoin.conf
2020-11-11T20:55:32Z Using at most 125 automatic connections (1024 file descriptors available)
2020-11-11T20:55:32Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2020-11-11T20:55:32Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2020-11-11T20:55:32Z Script verification uses 1 additional threads
2020-11-11T20:55:32Z scheduler thread start
2020-11-11T20:55:32Z HTTP: creating work queue of depth 16
2020-11-11T20:55:32Z No rpcpassword set - using random cookie authentication.
2020-11-11T20:55:32Z Generated RPC authentication cookie /home/nicholas/snap/bitcoin-core/common/.bitcoin/.cookie
2020-11-11T20:55:32Z HTTP: starting 4 worker threads
2020-11-11T20:55:32Z Using wallet directory /home/nicholas/snap/bitcoin-core/common/.bitcoin/wallets
2020-11-11T20:55:32Z init message: Verifying wallet(s)...
2020-11-11T20:55:33Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2020-11-11T20:55:33Z Using wallet /home/nicholas/snap/bitcoin-core/common/.bitcoin/wallets
2020-11-11T20:55:33Z BerkeleyEnvironment::Open: LogDir=/home/nicholas/snap/bitcoin-core/common/.bitcoin/wallets/database ErrorFile=/home/nicholas/snap/bitcoin-core/common/.bitcoin/wallets/db.log
2020-11-11T20:55:33Z init message: Loading banlist...
2020-11-11T20:55:33Z Using /16 prefix for IP bucketing
2020-11-11T20:55:33Z Cache configuration:
2020-11-11T20:55:33Z * Using 2.0 MiB for block index database
2020-11-11T20:55:33Z * Using 8.0 MiB for chain state database
2020-11-11T20:55:33Z * Using 440.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
2020-11-11T20:55:33Z init message: Loading block index...
2020-11-11T20:55:33Z Opening LevelDB in /home/nicholas/snap/bitcoin-core/common/.bitcoin/blocks/index
2020-11-11T20:55:33Z Opened LevelDB successfully
2020-11-11T20:55:33Z Using obfuscation key for /home/nicholas/snap/bitcoin-core/common/.bitcoin/blocks/index: 0000000000000000
2020-11-11T20:55:43Z LoadBlockIndexDB: last block file = 186
2020-11-11T20:55:43Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=338, size=108899992, heights=325785...326349, time=2014-10-17...2014-10-21)
2020-11-11T20:55:43Z Checking all blk files are present...
2020-11-11T20:55:43Z LoadBlockIndexDB(): Block files have previously been pruned
2020-11-11T20:55:43Z : You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain.
Please restart with -reindex or -reindex-chainstate to recover.
: You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain.
Please restart with -reindex or -reindex-chainstate to recover.
2020-11-11T20:55:43Z Aborted block database rebuild. Exiting.
2020-11-11T20:55:43Z Shutdown: In progress...
2020-11-11T20:55:43Z scheduler thread exit
2020-11-11T20:55:43Z Shutdown: done
nicholas@mordor:~$ 
</code></pre>

CC BY-SA 4.0
2020-11-11T19:46:11.540Z
what throws me for a loop is that if I `sudo` into `root` there's a `bitcoin.conf` file in snap -- but there's also a `bitcoin.conf` file for my user account!  I have the GUI open now so will play with it.
Nicholas Saunders
CC BY-SA 4.0
2020-11-11T20:44:37.877Z
Have you started `bitcoind` at all? Anything in the debug.log file?
Pieter Wuille
CC BY-SA 4.0
2020-11-11T20:47:39.573Z
I installed with `snap`, and, frankly, this hdd isn't suitable for blockchain usage.  I might have to just use different hardware.  But, to answer your question, @PieterWuille I'm not sure how to start `bitcoind` when installed from `snap`.  What you see above was my attempt to ascertain if it was even running.
Nicholas Saunders
CC BY-SA 4.0
2020-11-11T20:51:30.533Z
You start the snap binary using `bitcoin-core.daemon` (or the GUI using `bitcoin-core.qt`). The `bitcoin-core.cli` tool is to communicate with a running daemon.
Pieter Wuille
CC BY-SA 4.0
2020-11-11T20:56:03.997Z
ah, that's the answer to my poorly asked question @PieterWuille
Nicholas Saunders
<bitcoin-core><paper-wallet><wallet-security><coldstorage><hardware-wallet>
Starting bitcoind for the express purpose of creating a wallet?
Nicholas Saunders
# Starting bitcoind for the express purpose of creating a wallet?

(Asked by: username_0 on 2020-11-11)

Referencing this solution:
My favorite method:

grab out a old/unused pc/mac
install a linux over usb (maybe Talis) (make sure your USB stick is clean!)
download a recent version of bitcoin-core (check hash, verify gitian signatures)
copy bitcoin-core over usb to your offline machine
start ./bitcoind
./bitcoin-cli getnewaddress (gives you a new public key)
./bitcoin-cli dumpprivatekey (gives you the corresponding private key)
print or write down both strings (address can be recreated from private key, but print it anyhow)
verify the printed or written down strings
try to delete printers cache (power off, reset)

Now you could delete/format the pc/mac.
But maybe it's worth keeping your new offline computer to generate new addresses or sign transaction in a "cold space/wallet".
I've installed bitcoin-core using snap on Ubuntu and ready to start a dry-run of this for reference.  However, disk space is limited, and, even then, I have no interest in downloading the blockchain itself.
How do I start bitcoind for generating a wallet?
I have:
nicholas@mordor:~$ 
nicholas@mordor:~$ bitcoin-core.cli status
error: Could not connect to the server 127.0.0.1:8332

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
nicholas@mordor:~$ 
nicholas@mordor:~$ bitcoin-core.cli getblockchaininfo
error: Could not connect to the server 127.0.0.1:8332

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
nicholas@mordor:~$ 
nicholas@mordor:~$ bitcoin-core.cli start
error: Could not connect to the server 127.0.0.1:8332

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
nicholas@mordor:~$ 

and am just looking to run bitcoin-core in pruning mode to play with.
I want to run a command like:
bitcoin-cli -testnet getblockchaininfo
Because I installed with snap I can run snap info bitcoin-core but man bitcoin-core doesn't give any results.
Starting the daemon:
nicholas@mordor:~$ 
nicholas@mordor:~$ bitcoin-core.daemon
2020-11-11T20:55:32Z Bitcoin Core version v0.20.1 (release build)
2020-11-11T20:55:32Z Assuming ancestors of block 0000000000000000000f2adce67e49b0b6bdeb9de8b7c3d7e93b21e7fc1e819d have valid signatures.
2020-11-11T20:55:32Z Setting nMinimumChainWork=00000000000000000000000000000000000000000e1ab5ec9348e9f4b8eb8154
2020-11-11T20:55:32Z Using the 'sse4(1way),sse41(4way)' SHA256 implementation
2020-11-11T20:55:32Z Default data directory /home/nicholas/snap/bitcoin-core/common/.bitcoin
2020-11-11T20:55:32Z Using data directory /home/nicholas/snap/bitcoin-core/common/.bitcoin
2020-11-11T20:55:32Z Config file: /home/nicholas/snap/bitcoin-core/common/.bitcoin/bitcoin.conf
2020-11-11T20:55:32Z Using at most 125 automatic connections (1024 file descriptors available)
2020-11-11T20:55:32Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2020-11-11T20:55:32Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2020-11-11T20:55:32Z Script verification uses 1 additional threads
2020-11-11T20:55:32Z scheduler thread start
2020-11-11T20:55:32Z HTTP: creating work queue of depth 16
2020-11-11T20:55:32Z No rpcpassword set - using random cookie authentication.
2020-11-11T20:55:32Z Generated RPC authentication cookie /home/nicholas/snap/bitcoin-core/common/.bitcoin/.cookie
2020-11-11T20:55:32Z HTTP: starting 4 worker threads
2020-11-11T20:55:32Z Using wallet directory /home/nicholas/snap/bitcoin-core/common/.bitcoin/wallets
2020-11-11T20:55:32Z init message: Verifying wallet(s)...
2020-11-11T20:55:33Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2020-11-11T20:55:33Z Using wallet /home/nicholas/snap/bitcoin-core/common/.bitcoin/wallets
2020-11-11T20:55:33Z BerkeleyEnvironment::Open: LogDir=/home/nicholas/snap/bitcoin-core/common/.bitcoin/wallets/database ErrorFile=/home/nicholas/snap/bitcoin-core/common/.bitcoin/wallets/db.log
2020-11-11T20:55:33Z init message: Loading banlist...
2020-11-11T20:55:33Z Using /16 prefix for IP bucketing
2020-11-11T20:55:33Z Cache configuration:
2020-11-11T20:55:33Z * Using 2.0 MiB for block index database
2020-11-11T20:55:33Z * Using 8.0 MiB for chain state database
2020-11-11T20:55:33Z * Using 440.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
2020-11-11T20:55:33Z init message: Loading block index...
2020-11-11T20:55:33Z Opening LevelDB in /home/nicholas/snap/bitcoin-core/common/.bitcoin/blocks/index
2020-11-11T20:55:33Z Opened LevelDB successfully
2020-11-11T20:55:33Z Using obfuscation key for /home/nicholas/snap/bitcoin-core/common/.bitcoin/blocks/index: 0000000000000000
2020-11-11T20:55:43Z LoadBlockIndexDB: last block file = 186
2020-11-11T20:55:43Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=338, size=108899992, heights=325785...326349, time=2014-10-17...2014-10-21)
2020-11-11T20:55:43Z Checking all blk files are present...
2020-11-11T20:55:43Z LoadBlockIndexDB(): Block files have previously been pruned
2020-11-11T20:55:43Z : You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain.
Please restart with -reindex or -reindex-chainstate to recover.
: You need to rebuild the database using -reindex to go back to unpruned mode.  This will redownload the entire blockchain.
Please restart with -reindex or -reindex-chainstate to recover.
2020-11-11T20:55:43Z Aborted block database rebuild. Exiting.
2020-11-11T20:55:43Z Shutdown: In progress...
2020-11-11T20:55:43Z scheduler thread exit
2020-11-11T20:55:43Z Shutdown: done
nicholas@mordor:~$

**Tags:** bitcoin-core, paper-wallet, wallet-security, coldstorage, hardware-wallet

> **Comments:**
> **username_0**: what throws me for a loop is that if I `sudo` into `root` there's a `bitcoin.conf` file in snap -- but there's also a `bitcoin.conf` file for my user account!  I have the GUI open now so will play with it.  
> **username_1**: Have you started `bitcoind` at all? Anything in the debug.log file?  
> **username_0**: I installed with `snap`, and, frankly, this hdd isn't suitable for blockchain usage.  I might have to just use different hardware.  But, to answer your question, @PieterWuille I'm not sure how to start `bitcoind` when installed from `snap`.  What you see above was my attempt to ascertain if it was even running.  
> **username_1**: You start the snap binary using `bitcoin-core.daemon` (or the GUI using `bitcoin-core.qt`). The `bitcoin-core.cli` tool is to communicate with a running daemon.  
> **username_0**: ah, that's the answer to my poorly asked question @PieterWuille  

---

## 0 answers

