Cryptocurrency Mining on a Raspberry Pi (it’s fun….trust me)

💡Tryout HIVEOS Entirely Free:

Can you actually mind cryptocurrency
on this little raspberry pie? Yeah. Yeah, you can. But should you
though? Yes. Yes, you should. But is it profitable? Not exactly, but don't don't want that this way
as you please, because in this video, I'm going to show you how to mine
cryptocurrency on this little credit card sized computer, a raspberry
pie, and it's fun. Not only is it just cool
to say you've done this, but you'll learn a ton
about cryptocurrency and
cryptocurrency mining along the way. So here we go. This has been
on my bucket list for a long time. Let's turn this little guy into
a cryptocurrency mining machine. The first real quick, I got a
question for you can the cloud, which is where basically
everything is on the internet. All our services can the cloud be
hacked? Yeah, of course it can be hacked.

The cloud is not a safe place
unless you make it safe. This right here is why we need the
sponsor of today's video cloud sec 2021 presented by trend micro cloud.
Sec 2021 is a virtual conference, three days of awesomeness. And you
don't want to miss it, which by the way, one of those days is a 24 hour
CTF hands-on lab challenge. It's going to be cool. And this conference is for people like
you who want to learn more about the cloud cloud security DevSecOps,
which is like the coolest term ever, and the current cyber threat landscape.
So what's it going to be like, is it going to be like every
virtual conference? No, here's the agenda right here. Three
days, three themes re-imagined creation. And my favorite practice. Now some
key things about this conference. First community they'll get access to a
community of cloud and security experts. And this is one of the biggest
cloud communities out there. You'll also get some keynotes from the
industry leaders and experts like from AWS and trend micro and
Snick and check us out. There are over 100 sessions
covering things like zero trust XDR, which is re-imagining.

The sock cloud infrastructure is code
cloud native dev ops and the cyber threat landscape. And then what's really cool is the region
specific insights you get on day two, you'll hear from experts local to you
sharing their insights and observations for your area, for what you're dealing
with, the security things you're facing. And then of course, day three is all
about practicing. Hands-on a challenge, 24 hours of nonstop play it's anyways,
free virtual cloud security conference. So if you're in the cloud, which if
you're not, you should be at security. This is for you. So go register right now. Link below the conference is
November 16th through 18th, completely free and completely
awesome. And thanks again to cloud sec, 2021 and trend micro for sponsoring
this video anyways, back to the, uh, raspberry PI stuff.

Now,
first I got to say this, we will not be mining any of the big
cryptocurrencies like Bitcoin or Ethereum. Those guys are out and I'll
explain why here in a moment, but we'll be mining is a
cryptocurrency called Monero, which is Esperanto for
coin. Little fun fact there, coffee break for the fun fact, Monero is a pretty well-known coin
and it's all about secure anonymous transactions. So it has
a pretty cool use case. And it's the perfect coin
of mine with a raspberry PI, but Y we'll cover that here in a moment, but first let's talk about
what you need for this project. At the top of our list is a raspberry PI
and that's pretty much all you're going to need. And for this you'll want
a raspberry PI three or four, either one will work, but obviously
four is better cause he want more power. And then like every raspberry PI
project you'll need an SD card, power supply SD card reader, and last, but certainly not least a solid
cup of coffee there real quick.

Before we dive in and go crazy with this, let's talk about why we're doing
Minero over BTC or Ethereum. And also why are we even crypto
mining and what is crypto mining? Now, if you already know all this
stuff, go ahead and skip forward. I've got timestamps
below, but if you don't, let's talk a little bit more about Monero. Now the simple answer as to why
we're not mining Bitcoin or Ethereum, is that it's just too stinking heart. Our little raspberry PI would just not
be able to do it. He couldn't cut it, but Monero, he can do that. It's easier. Now let's talk about what
crypto mining actually means.

Crypto mining is all about supporting
the blockchain. What does that mean? Let's talk about it. So one cool thing about cryptocurrency
and actually one of the main cool things about it is that I can send money
to you without involving a bank, which traditionally it always involves
a bank, but not with crypto sun. I can send Ben one Bitcoin and I don't
have to involve Zelle chase bank of America or anybody, which
Ben you're welcome. One. Bitcoin's a crazy amount of money.
What is it? 66,000 right now, $67,000 for one Bitcoin. I hope
you're watching this right now. And it's at a hundred thousand. Let me
know if it is comment below anyways. Now again, normally a bank would have to be used
to keep track of that transaction, but with crypto, Nope, no bank, but
then who keeps track of it? Everybody, everyone involved with this
cryptocurrency keeps track of it.

It's decentralized. All of us keep track of all
the transactions with this
currency and we write it down and our diary, our
journal, it's not a journal, but it kind of is this
diary or journal is called. The blockchain will generate
a hash of this transaction, kind of like a label and identifier. And we'll lump that altogether with a
bunch of other transactions all around the same time. And we'll group those into a block and
then we'll chain another block to that. And another block to that,
get it the block chain. And think about that for a second.
This blockchain, this ledger, this cryptocurrency diary
contains every single transaction ever for that cryptocurrency. You can look at it right now and see
everything that's been done with Bitcoin. Since the Dawn of time, everyone
can see it and you can't change it.

So for forever, forever, everyone knows. I sent Ben one Bitcoin and
that can never be changed. And to make sure that can't be
changed or tampered with or hacked, that's where we come in the minors.
We make sure the blockchain is safe. That's how we support the
blockchain. We secure it. Let me show you the miners
have a pretty big job. Their job is to add new
blocks to the blockchain, but this right here is hard to be
able to add a block to the blockchain.

You have to have a tremendous amount of
computing power and you have to be fast and kind of lucky. Let me do a
high level walk through real quick. Cause it is super, super in depth
and deep. What actually happens here. And I can't go that deep
right now, but high level, here we go back to me and Ben, Ben, I'm
feeling super generous today, buddy.

I'm going to send you yeah, you
guessed it another Bitcoin. So boom. I send Ben another Bitcoin, another
transaction. There you go. Ben, this transaction is then advertised out
to the Bitcoin network to the Bitcoin nodes to be verified. And once
verified, it will be placed in a pool. This pool or memory pool is like a
waiting room. It's like a holding area. Holding tank. These little transactions are waiting
for their chance to be written to the blockchain and to be remembered forever. But what are they waiting on
while they're waiting on us? They're waiting on the minors. She's the miner's job to go out
and gather these transactions and put them inside a block and a write it
to the blockchain easier said than done sucker.

Here's what we have to do
though. Written into the blockchain. The program is a puzzle, a
cryptographic hash puzzle. Then the minor us, if we can solve that next cryptographic
hash puzzle and the blockchain, if we can figure it out the fastest
and we're the first one to do it, then we get the honors of adding
the next block to the blockchain. We'll dip our hands into the memory
pool and pull out some transactions that are waiting patiently.

Put them inside a block and add them
to the blockchain. And guess what? We are rewarded handsomely
for our efforts. If you do get to add a block
to the blockchain in Bitcoin, you are rewarded with how many,
let me Google it real quick. And this will change by the way you reward it with 6.25 Bitcoin, which equates to $421,000. As of the recording of this video. Whew,
easy enough right now let's get rich. No, it's not that easy obviously, right? Because here's why we're not the only
miner out there.

If we were dude, we wouldn't be ready. The problem is there are a ton of
other people competing to do this, a ton of other people trying
to solve the same puzzle. There's only one right answer.
And they're all competing for it. Now how you solve this problem. It's
a very complex mathematical problems. Just big math, big math. How you do that is with brute
force guessing our minor, our raspberry PI is just going to guess
as many times as it can to solve the problem. One, no two, no three, no four, no five. No. And it does this over and over and
over until it gets the right answer and whoever gets the answer, the
fastest will win. Now again, there's a lot more that goes into this.
A bunch of more magic that happens. Trust me, it's magic. And if you
want me to make another video, deep diving into how this
works, let me know. But for now, just know that in order to add a block
to the blockchain and get that reward, you have to solve a really,
really hard math problem.

And you have to be the quickest to do it. And that's exactly why the
raspberry PI cannot be used to mine, Bitcoin or Ethereum or any of
those big name cryptocurrencies. And with currencies like
Bitcoin and Ethereum, we've got a couple of things working
against us and our poor little pie. First, the more miners there are,
the more difficult it is to
solve this crypto puzzle. The difficulty will actually
increase the more miners there are. And Bitcoin and Ethereum are two of
the most popular cryptos out there.

And there are a bunch
of people mining them. And these people don't
just use raspberry pies. They use crazy things like
massive. GPU's like 30 nineties. They also use things called Asics, which are specialized computers
and devices that are built. Our purpose made to mine Bitcoin. And
they do it faster than anybody else. Let me show you a popular
brand is ant miner. And this beast is purpose designed
to do one thing.

Mine, Bitcoin, it's all the things about
breathing and mining Bitcoin, and it doesn't come cheap,
$12,000. Are you kidding me? It's going to be a $35 raspberry
pie any day of the week. Right now there are data centers,
just chock full of these machines. More powerful than this. Even
constantly mining for Bitcoin, constantly guessing the answer to
that crypto puzzle. And you know what? They're going to end up winning the block, reward the chance to actually write that
next block to the blockchain more than we are. In fact, we'll never ever get
a chance with this little puny guy. So now let's talk about Monero and
why it's better for us than Bitcoin or Ethereum Monero. Doesn't like Asics. They think it's bad for the
blockchain. And it actually is. You see blockchain technologies
are all about this. Centralizing the control of the currency
and the problem we're seeing right now with all these crazy powerful Asics is
that people can fill their data centers with a ton of these Asics.

Like I'm talking like one company or one
person and they can start to get more control over what gets added to
the blockchain than anyone else. It becomes more centralized. They get
to add more blocks than anybody else. It becomes unfair. And right now,
no one can really mind Bitcoin, unless you get something crazy. Like those
ant miners, but mineral said, no, no, no. We're not doing that.
When you're mining Bitcoin, you're going to use their algorithm, which is the SHA 2 56 algorithm Minero
has their own as called random X. And they built into their
algorithm, ACEs prevention, basically making it to where if you
tried to make them an arrow with an ASIC, it wouldn't be worth it.
How's that work. I don't know. That's that suit that's up here for me. You see Minero's goal was to
make it to where anyone can mine.

Monero NEPC even something small, like a raspberry PI and this
makes it to where their system, their blockchain is more decentralized
where a lot more people have a chance to write a block to the blockchain. I just, one more thing before we jump
into actually how to do this, this whole thing with how Bitcoin
allows miners to do things in Minero and Ethereum, this process is
called proof of work. And again, there's a lot more to it than
what I talked about here, but just know that's what this is called. And it involves our computers solving
very complex, cryptographic, math, puzzles, hash puzzles, and racing
to get the right answer. So anyways, that was a quick rundown on how quick
that was of cryptocurrency mining.

Let me know what you thought
of that below. Anyways. Now time to crypto mine on this raspberry
PI and we're going to remind Monero and the process is actually pretty
quick and painless. And honestly, I'm shocked at this
little guy's performance. So let's do after a quick coffee
break there's was a lot of crypto explaining. I think I earned
that one anyways. Here we go. Oh, and also the block reward for XMR or
Monero.

That's what it's called. XMR coin. That's its abbreviation. When you
get to add a block to the blockchain, that's going to be 1.16
XMR which equates to about 300 bucks at the time, this
recording I'll stop right there. Don't even think about it. No, you're not going to be making about 300
bucks with your raspberry PI doing this at least not anytime soon.
I'll explain later, okay. The first few steps
involve baking our pie. This will be a typical
raspberry pie setup. Now we will be using raspberry PI iOS,
but we're going to be using 64 bit. That's required for that. We're going to have to go out to raspberry
pi.org and download it there. Image. I've got the link below
in the description. It's going to be raspberry
PI iOS light arm 64. And we'll pick the latest
one right here for you. That might be different
depending on when you are at. So I'll click on that and click
on that zip file to download bam.

It was this guy right here.
You might need a coffee break. This will take a moment. Okay.
Mine took a minute. Anyways, we get a zip file here. I'll go ahead and open that folder
or open that file rather unzip it, extract all. And in that folder
should be our image. Perfect. Now let's grab our SD card, put it
inside our micro SD card.

USB reader. There we go. And I'll be right back. Cool. Mine is in my computer now to
launch our raspberry PI imager. This is my recommended tool to write
stuff to your SD card link below anyways, choose ROS. We're going to scroll down
to the very bottom and do use custom. Cause we've got a customer west we're
going to use and we'll find that file. We just download it. Here's
that folder. There's the image. Reservoir ALS bullseye arm 64
light open I'll choose my storage. I've got a massive SD card. I don't know
why. And then hold on. Not quite yet. Click on control, shift X to open our super secret menu
so we can do our headless install anyways, where you click on enable it. And Avalon I'm learning French
enable SSH put in the password for your PI user. And then down here we'll enable
wifi and configure our wifi.

pexels photo 3379934

Unless you're doing hardwired, then
that will be different for you. Our wifi set up password set. I'm all
good to go. I'm gonna click on save then. Right? And then yes.
And let it do its thing. Hopefully doesn't take too long this
time. I'm going to do a quick coffee. We already downloaded our stuff.
Yeah, it's going pretty quick. Yep. That was pretty quick. Okay, cool. It's
done. It'll go grab you right back. We'll take the SD card out of our
reader. Throw that into a raspberry PI oh, come on work. All right, here we go. And then plug in some power and go.
Now we're going to wait for it to boot. And while it's doing that, I'm going to go log into my router so
I can see the latest DHCP IP address at hands out.

Because probably going to
be this guy. It'll be his IP address. If you don't have Ubiquiti, your router will look different and
their mind is to not some.one, 1 8, 2. Let's see, I Peter's are going to
use, sorry. We'll hopped up on coffee, like always anyways. So we're going
to launch our terminal windows. It'll be CMD, Mac or Linux
will be terminal. And then
we'll log into our device. Command will be SSH. hi@tendotseven.one.one eight two or
whatever your IP address is getting logged in here type in yes.

Into
your password. And we're in. Yes. Okay. Let's get this thing going. Let's turn this beast into a well
crypto mining beast. First let's update. Our repositories command
will be sudo apt update. It should be fairly quick.
She's going to go out there, update us repository list and stuff. We're solid now to install our pre-recs
or the things we need to make this thing run command is sudo apt install, and then I'll copy a bunch of stuff
we're going to throw in there. Again. Commands will be below and
go missile. Take a moment. Just chill or drink some coffee
or tea or whatever you go. Cool. That was pretty fast. All right,
now we're going to use get, I'm gonna paste the command in here. I'll
wait. Did I get it? Okay, here we go. There we go. We're going to use,
get to pull down this program. XMR IgG or XM rig running clone
that repository bam cloned. And then we're going to change directory
into that directory by doing CD space X M rig we're in now, we're going
to make a new directory in KTA.

Our build. We'll see the end
to that directory CD build. Now we're going to install a program
by building it from the source, which is pretty cool. The first
command will be C make space.dot, and to that that'll be really fast
done and not for the long part type in make. That's it hit enter and
take a long coffee break. Sorry I'm doing, you can track your
progress over here on the left. And it was our percentages over here
anyways, in a bit. Okay. Mine is done. That took a minute, but
anyways, we are ready to go. Like that's done now with just
one command. Just one command. We can turn this guy into a mining
machine, but hold up real quick. There is one more thing we have
to do. I almost forgot. Remember, we'll be mining the cryptocurrency Monero, which means we'll be
gaining some XMR coin.

That's what it looks like now in order
for us to mind that cryptocurrency, they have to be able to give it to us
and the way you receive cryptocurrency, keep it, buy it. Whatever is by
storing that sucker into a wallet. Now, instead of a regular wallet,
like you put in your pocket, it's going to be a digital wallet out
there on the interwebs or somewhere safe. You have a lot of options for
wallets, but for this example, just to get you going and make this fast, let's walk through creating one right now. If we go out to getting an
arrow.org at a link below, we will go to downloads and click
on, well, we have a few options here, but I'll just get the gooey wallet. Cause
it'll be simple. So for me right now, I've got windows.

So I'll click on that 64 bit installer
that I click on it to install and it's going to install like
any other windows app, you know the drill next next I
accept. Yeah, next, next, next, next. And install and finish. I'll go ahead and find that on
my computer and launch that. And it's called gooey wallet. Yeah,
there it is. It's called GUI wallet. And if you want to find it, I'm going
to allow it to reach the outside. That'd be fine. Continue. And
then we'll just do simple mode.

You can change this at any time, but just
for this example, let's get you going. So I'll click on that box. I understand next we'll create a
new wallet name or whatever you want store it wherever you want. And then
right here, you want to back up this, this is your pneumonic seed. This is how every crypto wallet
is backed up and restore us. If you ever have to restore this wallet,
you're going to use this. So take that, write it down physically, somewhere
on a piece of paper and click on next. Put a password in for it, click
on next. And then we're good. Click on create wallet and then put in
that same password you had before. Boom, we've got a wallet for our,
uh, Minero for our mining. Uh, once more access I'll
allow it. It's sinking up. We're going to wait on that to
finish. So if you want to have coffee, break something, now
it's still synchronizing, but we can go ahead and move forward.

What we're gonna do now is click
on the account tab right here. And then right here, you'll see your
account. And that is your wallet address. We're going to need that. So go ahead and click on the copy icon
the very far right? Just have that handy. And now we're ready to start mining and
you're gonna learn a few things here as we go. So type in this command or copy
and paste, whatever you want to do, but make sure you fill in your
information.

If you want to use my wallet, address more power to you. Anyways, put in.ford/x M rig. That's our
application. We're going to be using it. We'll do a dash O or tick oh space. And we'll specify the pool or the
mining pool we're going to be using. Now the one I want to demonstrate here
and I'll explain what I mean here to bed or what that is. But what I
want to use is Gulf dot Minero ocean.stream, colon 1 0 1 2 8. Now you're probably
wondering what the junk is, a mining pool and why are we
using one? Here's the thing, even though that mining Monero is
significantly easier at the mining BTC or Ethereum, it's still very, very
difficult for a tiny baby raspberry pie. Like if we just tried to Maya, Minero
on our own with just this one device, we would never see any amount of money
ever. It just would never happen. We never get lucky enough or have
enough compute power to actually win the block. That's why you have to join
forces with someone else, a team.

And that's what a pool is. It's a mining
pool. It's a bunch of other devices, a bunch of other miners like yourself
that are agreeing to join the pool and mine together. They all connect to the
same pool and they all work together, sharing their compute power to
try and solve that complex hashing puzzle. And because you have
all that compute power combined, you do end up winning some blocks.
And when a block is one, the reward, which again is 1.16 XMR that will
be distributed to the miners.

And how much you get is
determined by how much you held, how much work did you actually
put in to help solve the problem? And then got some fancy algorithms and
fancy calculations on the mining pool to determine that I'll show you what it
looks like here in a bit. But anyways, let's keep configuring our stuff here.
Now there are other mining pools. You can choose your own if
you want.

I like this one. You can copy me just like this, if
you want. And then just after that, we'll do a dash you space and here is
what you'll paste in your wallet address. I'm gonna paste mine in right now.
And then just one more thing here. We'll do a space dash P, which
normally stands for password, but this is also a way we can
label our workers are minors.

So if you do end up having
more than one raspberry PI, or you want to start using your computers
and stuff to do this, cause you can, you can your workers, if
you have more than one, I want to end this PI four because
I do have other pies in the mix and that's it. We're going to hit,
enter, and magic is going to happen. You're ready. Let's go. Lot
of things happening here. It's getting things ready. It's
connecting and stuff's already happening. Look here. We get a new
job from Gulf Minero. So we're helping to solve the
problems. A couple of things. When you have this command line
selected, if you hit the letter, H it'll show you your hash rate right now, what the hash rate you can think
of the hash rate as your speed. How fast are you solving
this crypto hash puzzle? How many guesses are you
making? That's your hash rate? This raspberry PI is using a CPU to mine.

This he's got four cores and each
core is doing 10 hashes per second. And you know, obviously 11 on the
other ones for a total of 44.1, six hash as a second. Now
that's actually not too bad, but it definitely doesn't
compare to other things like, um, earlier we saw the ASIC miner from
ant miner. I think what was that? How many hashes was that doing? Oh yeah. That's like your head 104
Tara hashes per second. And more often than not your CPU. And even your GPU will
have a higher hash rate, but still the raspberry PI he can do some
damage. Anyways. Couple more commands. We can see here. We can hit the letter S
to see if we have done anything yet. I, right now we have, we have no
results yet. What does that mean? When we do actually help solve a
problem, a cryptographic hash puzzle, and our mining pool wins a block. We'll
see that we had some shares excepted, and how many shares we get is how much
work we actually put in to help solve the problem.

Now how many times you solve a problem
and how many shares you get will vary. And it will show you what it
looks like here in a moment. So I'll give it a second.
Now, one more command as well. If you hit the letter C it shows
you your current connection. It shows here that we're using the
random X algorithm, our difficulty, which is basically how hard
the problem we're solving is. And a lot of these mining pools will
automatically adjust your difficulty based on how good your mining machine is. I've connected to pools with my raspberry
PI that they adjusted my difficulty ratings to 500, because it's weak
sauce.

Now. I'm not sure if you noticed, but I actually have three raspberry
pies mining to the same exact pool and things are happening. I'll
show you here in a moment, but I want to wait for an accepted
share to come in here. Okay. That didn't take very long, but I do
have some excepted shares right here. Oh, this is so cool. Yeah. Right here.
Oh, my pencils are down here. We accepted and accepted. And the
third one just came in. All right. Now it will happen to where that you
will get a rejected share sometimes, meaning that you were too slow to come
up with a calculation or your efforts to not contribute to solving the block.
But honestly, mining on this pool. I have not seen one rejected
yet. Anyways, let's um, hit the S key to see what
we're doing here.

So, so far they've accepted three
shares, which is awesome. So at this point we have actually
mined some XMR. We have mined Monero. It's a small amount, and it'll take a
bit to accumulate enough to even like, be happy about now how my other three
raspberry pies running for a bit. And let me show you what
they look like here. Notice when they get in the groove, they,
uh, they accept a ton of shares. Like, let me just select this one right here,
type in a S 134 shares.

That's awesome. Now, a lot of these mining pools will
give you a way to see how you're doing, how many hats you're doing. Look at all the workers you have
and how much Minero they owe you. So let me show you real quick
for this particular mining pool, they have a website you'll
go to Minero ocean.stream, and you'll paste your
wallet address right here. And as long as you've actually
submitted some shares, or you saw that accepted your wallet
address should pull up some data here. Now it'll take a couple minutes after
you do the initial share to show up, but this is what I got here. Got my three
workers do with 309 hashes per second. Uh, and notice, I don't know
it was up to my other guy, but these three pies are doing
almost 100 hashes per second. So a quick note on that, is it profitable to run the raspberry
PI as in minor and actually, you know, make money? The short
answer is no, not really, because you have to factor in your
electricity costs and then how much you're actually earning from mining.
According to some mining calculators, I saw you lose about a penny
per day mining with this.

So if you plan on getting
rich, uh, forget about that. But if you plan on having fun and
learning about cryptocurrency, and you have a spare piling laying
around and you want to earn some cryptocurrency, just passively,
go for it. This is cool. And you learn some stuff
along the way, right? Plus you can brag to all your friends
at your cryptocurrency mining. They don't have to know it's this
little and also consider the XMR Minero may significantly go up in price. This
is not financial advice. Don't take that, but I'm optimistic. So even though
I'm probably losing a penny per day, I just like the fact that
I'm collecting a currency. I kind of a stock that could go
up my go down. You never know. Now just realize the reason
that my raspberry PI is not
performing as well as my other ones is because this
guy only has two gigs of Ram. And I didn't realize that
I grabbed my my week one. So if you want to take advantage of
the fast mode with 64 bit architecture, you'll obviously need four gigs or more.
So crypto mining on a raspberry PI, where do you think, are you going to
try it? I really want you to try it.

I know it's not worth the money.
It's worth the fun though, and worth the knowledge and just the, just the cool credits you
get cool credits, right? Thanks for saying you doing
this. Like, yeah, right. Oh, well you learn something anyways. Let me know below if you attempt this
and also do not forget to hack that YouTube algorithm today, that like
button notification, bell, subscribe, make sure you hack YouTube today.
Ethically, of course. And yeah, that's pretty much all I got. I've had
a lot of coffee, no surprise there. And, um, you don't realize this, but I
actually do a lot of takes for this. And, um, there are technical
issues. I've worked through
some times as I record this. So I end the coffee breaks, or
sometimes I do a few takes of those.

I've had more coffee than you realize.
I'll catch you guys next time..

As found on YouTube

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *