****ANNOUNCEMENT!**** Due to software updates since Decred was initially launched, this tutorial won't work 100% anymore. I will be updating it to work with DCRD v1.0.1 and later soon. Tutorial One of the neat things about the Raspberry Pi, beyond the whole "fully functional Linux computer for under $100 US," is that since it takes all its power from a USB port, keeping one running 24/7 is super cheap. I have one I bought to use as a Mumble server, but it turns out Mumble consumes so few resources that it may as well not even be running for all the rest of the system cares. So here I am with a computer that I need to keep running all the time, but the CPU is pretty much idle, and the 32GB micro-SD card I bought for it is pretty much empty. Hey, let's use it as a Decred full node. Step 1: Setting up dcrd to listen to foreign ports So I'm going to assume you've already followed the quick reference guide to get everything running on the Pi. You're starting dcrd with the command Code: ./dcrd --testnet -u user -P pass or maybe you've got a shell script to do that for you, so you just have to type Code: ./start_dcrd.sh If you're really advanced, maybe you have a config file that takes care of the username and password for you. If not, we're going to cover that. Q: Why should I use a config file A: There are a few reasons. One is security: using a config file lets you put the server's username and password there, so you aren't typing it in every time, which means it doesn't appear in your command history, and it isn't visible in the window title(for some operating systems). Another is convenience. Instead of having to make a shell script or batch file, or remember the whole list of command-line parameters, you can pack all of them into the config file and just run dcrd directly. Download pi_dcrd.conf.txt from the attached files, rename it dcrd.conf, and put it in the dcrd system directory.(that's .dcrd, in the home directory. If you can't see it, go to View in the file explorer's menu and make sure "Show Hidden" is checked.) Open the config file in your favorite text editor. Inside, it should look like this: Code: rpcuser=[dcrd_username] rpcpass=[dcrd_password] testnet=1 rpclisten=:19109 The first thing you'll want to do is change [username] and [password] to your chosen username and password. You can use [user] and [password] like the Quick Reference shows, and since we're just on the testnet right now there's nothing wrong with that, but you may want to change them to something a little more secure later. The second thing you'll want to do is check that last line. The one that says "rpclisten." That's where the magic happens. By default, dcrd is set up to only listen to localhost on port 19109(for the testnet. Mainnet will have a different port.) by adding a blank in there, we've told dcrd that we want it to listen to all incoming addresses. Like the other machine we're going to be running a wallet from at the end of this tutorial.  February 8, 2016(Mainnet launch date) is now in the past instead of the future, so it's time to make sure you're set to run on the Mainnet instead of the Testnet! This is easy: change the testnet value from 1 to 0, then change the rpclisten value from 19109 to 9109, then run the Mainnet binaries instead of the Testnet binaries. [/edit] While we're here, grab the rpc.cert file and copy it to a safe place. We'll need it later. Now you should be able to start your chain server by just running the dcrd executable file. Step 2: (optional) Setting up the wallet on the Raspberry Pi Since we've got a host that's going to be running 24/7, why don't we also have a wallet running so we can stake and earn some credits off of this endeavor? This part is super easy. Do the same thing we just did to add the config file to dcrd, except we're doing it for dcrwallet. so download pi_dcrwallet.conf.txt, rename it to dcrwallet.conf, and put it in the .dcrwallet directory(which should now be visible right next to .dcrd, since you have hidden files turned on.) Inside of dcrwallet.conf, you'll find the following: Code: username=[wallet_username] password=[wallet_password] dcrdusername=[dcrd_username] dcrdpassword=[dcrd_password] enablestakemining=1 balancetomaintain=100 ticketmaxprice=50 What's this? Two usernames and two passwords? What's real? I DON'T KNOW WHAT'S GOING ON ANYMORE! Well, it's actually easy. [wallet_username] and [wallet_password] are the username and password that you want to use to connect to the wallet via dcrdctl. [dcrd_username] and [dcrd_password] are the username and password you used when starting up dcrd, and are provided so that the wallet can connect to the chain server(dcrd) when it needs to. Note that dcrdusername and dcrdpassword are optional. If they are missing, dcrwallet will attempt to use [wallet_username] and [wallet_password] in their stead. Which is perfectly fine, but if you want to use a different(more secure, or just not re-use the same password for everything) password for your chain server, then the option is there. Code: enablestakemining=1 As of wallet version 8.2, enablestakemining does nothing, and the correct lines should be: Code: enablevoting=1 enableticketbuyer=1 [/edit] This is what tells the wallet you want to be buying Proof of Stake tickets. If you don't want to buy those tickets, set enableticketbuyer to 0. Code: balancetomaintain=100 This is the minimum number of credits you want the wallet to keep available for spending. When you buy a staking ticket, you don't actually lose any credits, but the credits used to "buy" that ticket become locked and unusable. This could be a problem if you wanted to buy, say, some silver bullion or fancy vinyl stickers.(Note that nobody will be accepting testnet credits, that's just silly.) If you set a balancetomaintain value, then the wallet will not buy any staking tickets if it would reduce your available funds below that level. Set this value to 0 if you don't care and just want to invest every penny you've got into earning interest. Code: ticketmaxprice=50 This is the maximum number of credits the wallet will spend when buying a Proof of Stake ticket. The higher the value, the more tickets you'll be able to bid on, but the more of your credits will be tied up in buying tickets. Set this to 0 if you don't want to buy any staking tickets. Well that was easy! Now you can start the wallet by invoking dcrwallet directly, as well! Alright, now for the last step. Step 3: Setting up the second wallet to connect to the chain server remotely We're done with the Raspberry Pi now, switch to the computer you'll be using for everyday work. Mine is running MS Windows 8.1, so I will be referring to it as the "Windows" computer, but this last stage should work just fine on pretty much anything. This step assumes you already have a wallet running on your Windows computer which was generated using the same seed used to generate the one in step 2(if you followed step 2, anyway). You'll need 2 things for this step. 1 is that last config file, win_dcrwallet.conf.txt. Download it, rename it to dcrwallet.conf, and put it in the application directory on your Windows computer(%appdata%/local/Dcrwallet on Windows). Inside of that one, you'll see the following lines: Code: username=[wallet_username] password=[wallet_password] dcrdusername=[dcrd_username] dcrdpassword=[dcrd_password] rpcconnect=[pi_ip_address]:19109 cafile=rpc.cert Same as before, [wallet_username] and [wallet_password] are what you use to connect to the wallet with dcrctl, [dcrd_username] and [dcrd_password] should be set to whatever you used all the way back in step 1. For [pi_ip_address], you want to use the IP address of your raspberry pi as it appears from your Windows computer. Mine is at 192.168.0.128(that's a LAN address, don't even bother trying), so for me, that line ends up looking like this: Code: rpcconnect=192.168.0.128:19109 Finally, there's that last line. You remember in step 1, were we grabbed rpc.cert from the .dcrd directory? This is the certificate that tells the wallet it's connecting to the RIGHT chain server. It doesn't really matter where you put it on your Windows machine, as long as you set this to the relative path from dcrwallet.exe to rpc.cert, or the absolute path to rpc.cert. In my case, I've renamed it to "pidrpc.cert" and dropped it in the same directory, so for me, the line looks like this: Code: cafile=pidrpc.cert using a relative path, since those are usually shorter. Once again, if you're running on the Mainnet, you'll want the port to be 9109 instead of 19109.[/edit] That's it! You can now start up your wallet by executing it directly, and you can use it as a proxy to manage your chain server and wallet via dcrctl locally. Added information for the dcrdusename and dcrdpassword commands.