If you find this guide helpful please consider donating ETH to 0xff6492f6d2a2d1194061751c6b350e4fa5ff34f2
.
Setting up Digital Ocean settings
If you wish to sign-up for Digital Ocean using my referral code click here.
First we will go to "Settings" and then click on "Security".
We will then add an SSH key. To do this we will use SSH-keygen.
Running ssh-keygen -t rsa
will generate an SSH key for us.
You will be required to create a passphrase (I recommend using a tool like LastPass or 1Pass).
Then run pbcopy < ~/.ssh/id_rsa.pub
to put your key into your clipboard.
Copy and paste.
Creating the Droplet.
Select the droplets screen.
It is best to select Ubuntu 16.04
since this is what this guide used.
I then recommend selection the $5/mo droplet size.
You can select any region you wish, I chose Toronto.
Make sure your SSH key is selected if you set that up.
Creating a User
To create a user we run adduser username
. We then make this user to the sudo group with usermod -aG sudo username
.
We must then allow this user to connect using our public key. On our host machine run pbcopy < ~/.ssh/id_rsa.pub
.
Now, back on the server run su - username
to login to that user. Now, mkdir ~/.ssh
and chmod 700 ~/.ssh
to create the .ssh
dir and allow writing.
Now copy and paste your public key to ~/.ssh/authorized_keys
. Then restrict the permissions with chmod 600 ~/.ssh
. We can now login with the new user.
We now disable root by changing PermitRootLogin yes
to PermitRootLogin no
in /etc/ssh/sshd_config
, and then restart the SSH daemon with sudo service sshd restart
.
Downloading Decred
Download the correct Decred install for your machine from Github. If you're using a Digital Ocean machine you want the Linux AMD64.
$ wget https://github.com/decred/decred-release/releases/download/v1.0.1/dcrinstall-linux-amd64-v1.0.1
Next make the download executable.
$ chmod +x dcrinstall-linux-amd64-v1.0.1
Now, execute the node and follow the install process.
$ ./dcrinstall-linux-amd64-v1.0.1
You will be prompted to either create or import a wallet. If you're creating a wallet consider using a tool like LastPass to create a secure password.
Installing Supervisor
Supervisor is a process control system that is quite easy to interface with. We will use it to ensure the node daemon is constantly running.
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install supervisor
Setting Everything In Motion
We will now create a file for Supervisor to autostart the Decred Node Daemon.
Create /etc/supervisor/conf.d/decred.conf
using sudo /touch /etc/supervisor/conf.d/decred.conf
.
[program:decred]
command=~/decred/dcrd
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/decred.err.log
stdout_logfile=/var/log/supervisor/decred.out.log
If you found this guide helpful please consider donating ETH to 0xff6492f6d2a2d1194061751c6b350e4fa5ff34f2
.