Setting up a mini PC with a basic Linux system is pretty straightforward. Here’s how I did it:
- Grab a cheap mini PC like an Optiplex and a 2TB external SSD for around $250-300.
- The PC came with Windows pre-installed, but I didn’t even boot it. I created a bootable USB stick with a minimal Debian Linux net install image from my main desktop (which runs Windows).
- Plug the USB into the mini PC.
- Connect a keyboard, monitor, and my router using a network cable.
- Boot the mini PC, go into BIOS, make sure to select USB as the boot option, then restart to boot from the Linux image on the USB.
Follow the Debian installer steps (it’s a minimal shell install, no GUI), set it up as a DHCP client for my router, and enable sshd.
- Once that’s done, I connected to the machine via ssh from my main desktop. After confirming that worked, I unplugged the monitor and keyboard since I didn’t need them anymore.
Then I mounted the external SSD as a logical device.
- After that, I installed Bitcoin (using core, but might switch to Knots) and Tor, setting the external drive as the data directory for bitcoind.
- I also configured the router to forward the necessary ports to the Bitcoin-running machine.
- Finally, I waited for the blockchain to sync, which took about 2 weeks.
And that’s it.
All in all, the hardware setup, OS installation, and Bitcoin software took me about 2 hours.
For more details, check out this link. It has info on setting up Tor with Bitcoin in section G, and that part worked perfectly.
It’s slightly outdated (it mentions Bitcoin Core 21, so those links will need updating to the latest version).
There’s also a good 10-minute setup video for running bitcoind with Tor.
Running Bitcoind with Tor
10 replies 204 views
Optiplexes are thin but not as small as Mac Pros or Raspberry Pis. You sure it's not possible to fit another internal SSD disk in there, even by SATA connection, so you don't have to rely on a slower external drive for the datadir?
Also configure Bitcoin Core to use more RAM for faster IBD/initial sync.
Personally I'd worry more about instability (e.g. sudden disconnect) rather than I/O speed when using USB.
seed_vaultFull Member
Posts: 71 · Reputation: 451
#4Aug 10, 2020, 05:11 PM
I have a couple of Dell optiplexes running, one for Umbrel and another as a Wireguard/nftables server. Both have slots for one internal nvme drive and one 2.5" sata drive. I definitely recommend using the internal drive option.
yield_forkFull Member
Posts: 162 · Reputation: 728
#5Aug 10, 2020, 11:12 PM
I currently run bitcoin over tor, I had an electrs server, but besides it stopped connecting to my electrum and other wallets, I was running out of storage space, so I had to remove it. I run bitcoin core without prune mode, I'm not willing to give up the full node any time soon.
Thanks for these comments, those Dell devices look interesting, I was thinking about buying a rasp pi to run a node with umbrel or mynode. I have 2 SSDs stored, one SATA and one NVME, both 2tb.
Here are some tutorials for those wanting to run Bitcoin core over Tor and an Electrs server (they helped me a lot):
15. Bitcoin over Tor
Electrum Server - Part 1
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#6Aug 11, 2020, 02:31 AM
The bind option is outdated since the newer version (v28.0+) has to include "=onion" for it to work like it was before.
Ref: https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-28.0.md#p2p-and-network-changes
The reference client has a good documentation of how to setup Tor: github.com/bitcoin/bitcoin/blob/master/doc/tor.md
If you're planning to use it 24/7, you may also consider the power consumption difference between those devices.
Optiplex is more of a compact desktop machine (laptop for the "Micro" models) so it's power consumption is far greater than RPi at idle or with load.
But I get it, you must be considering it due to the convenience of having everything in one box rather than going for DIY setup of RPi.
I don't find USB-attached storage more reliable and usually slower than internal storage, but YMMV.
If you run Bitcoin Core over Tor, you don't need to enable port forwarding in your router for incoming connections. My Bitcoin Core nodes all use connectivity via Tor only and I have no issues with incoming connections of other nodes.
Last year I made an experiment with a Raspi 4B with 8GiB RAM and a 1TB USB3-to-SATA SSD as storage to measure how fast it can execute a full IBD from scratch with IBD optimized settings like blocksonly=1 and dbcache=4500. My internet connection has a stable 100MBit/s downstream and the IBD was finished in about 95 hours. Today it would likely take about 5 days with the same setup.
I would assume a low-power mini PC to be more powerful and faster (internal!) storage access than a puny Raspi 4B. RAM isn't expensive for most mini PCs. With 16GiB RAM you probably can set dbcache=12288 for a headless Linux box and enjoy an IBD within only a few days.
Don't forget to remove blocksonly=1 after finishing IBD and set dbcache=1024 or whatever you want, the default value should be fine too, if you remove the dbcache line entirely.
Why not just use a laptop? this way you have it accessible all in one if you need to travel. I googled optiplex and the tower seems rather big so I don't see the benefit. I also discarded back then the Raspberry router because it was getting increasingly slower. I don't have the numbers now but it was taking days predicted for fully syncing. All things considered I concluded that having a spare laptop that you only use for storing keys is the best, ideally with Coreboot installed if you are really paranoid, and then have an additional laptop for making any transactions. If you use an external SSD, you can plug it on a desktop as desired, but the linux install, if it was done on a laptop and you plug the ssd elsewhere, it may complain about something since the drivers etc belong to the laptop, so I would just use the same devices always. So basically 2 laptop settings with external drives. As far as Tor, guarantee it's not leaking your real IP. Also enable full disk encryption on Debian during installation.
You wasted your effort talking to SEO and AI spammer. If you pay attention, he added spam/SEO link inside quoted post.
It's valid alternative. But what kind of scenario where you need access to the physical device?
There are many variant of Dell optiplex PC. There are small ones, like this one https://www.amazon.com/Dell-7020-MFF-i7-14700T-DisplayPort/dp/B0DHCJ1TF1.
Optiplex requires a monitor. Sure that one seems quite small at 7 inches, but you still require a monitor, which is going to be bigger than a laptop. You could get a 14inch laptop, and be able to use it on the fly anywhere. If you want to use it as a desktop, you can just plug the laptop into a monitor, so im not sure what the use case for an optiflex here is unless you are 100% sure you just want to use it as a desktop and always have a monitor available.
You're mostly right. Although you don't have to use monitor on that Optiplex if you install the OS using method called "preseed" or "autoinstall". After installation, you can use another device in order connect to Optiflex using either SSH or VNC.