This post is gonna be a little walk through of a Vanilla Samourai Dojo install on x86. First things first, lets take a look at the requirements to install Dojo, I've included a sceenshot below from the Samourai Docs, pretty straight forward/self explanatory.
x86-64 means that it reqires a 64 bit x86 processor, in dumber terms that equals pretty much run of the mill desktop computers from the past 10 years. We want to use a ssd due to the faster read and write times, since the Dojo is going to be constantly updating as the blockchain grows, and we need a minimum of 600GB to store the blockchain, the indexer database, and other assorted files that are going to be installed with dojo. I would definitely agree with the doc, and reccomend a 1tb ssd. the 2gb ram is fairly easy to meet with most desktop computers, even older ones. Something like this Dell Optiplex 7040 plus an added 1tb ssd would be perfect, and you could get both for around 300 total.
Once you aquire or repurpose a computer, its time to flash it with ununtu server. Download the iso here, then flash it to a usb drive using Balena Etcher. I'm not going to cover that in depth as its pretty simple and there are tons of guides out there on how to do it. This guide covers everything pretty well and should help you get your server flashed and ready to go pretty quickly.
Plug in an ethernet cable to the server and wait a few seconds. Its time to find your servers lan ip-address. You can do this by plugging in a moniter and a keyboard to the server and running
sudo apt install net-tools
or you can just log into your router and find the lan ip address there.
Now its time to get ready to ssh into your server, if you're on linux no extra steps are required, as openssh comes installed on linux.
If you're a mac user, you're going to need to install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
and then use homebrew to install openssh
brew install openssh
If you're a windows user, you'll need to use putty, which in all honsty I have no experience with. Hopefully this guide helps you out.
Alright, so now we have aquired our server hardware, installed ubuntu server, connected it to the internet via ethernet cable, found our servers lan ip address, and prepared to ssh in.
(user is your user, replace xxx.xxx with the lan ip address you found earlier)
It will inform you that the authenticity of the host can't be established and ask if you want to trust it, go ahead and type yes and enter. Then it will ask you for the password to the server. This is the computers password you set when installing ubuntu. Now, as a good practice run:
sudo apt update && sudo apt upgrade -y
just to ensure everything is up to date. We are ready to start on the dojo installation.
Installing the Dojo
Head over to the Samourai Docs dojo first install. I'm gonna loosely step by step it with some screenshots of terminal as we go. Head to the first time install guide and take it step by step. I'm plagaraising for reference so you can follow along step by step and verify with the official guide:)
Prepare the host system:
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common unzip
we don't need to do the first step in this docker install as we are working with a fresh install of ubuntu server.
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
Verify that you now have the key with the following fingerprint before continuing
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update && sudo apt-get install docker-ce docker-ce-cli containerd.io
type y and hit enter
sudo docker --version
Verify that the docker installation worked with this command.
Install Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
make docker compose an executable command
sudo chmod +x /usr/local/bin/docker-compose
Verify the installation of docker compose was successful
sudo docker-compose --version
Add your user to the docker group and restart the system:
Even though the first time install guide says to make another user, we can skip this because our computer is going to be dedicated to running dojo
to add your user to the docker group
sudo usermod -aG docker <yourserverusername>
Restart the server, this will end the ssh connection and you will have to ssh in again.
sudo shutdown -r now
SSH back in and then test the docker installation with:
docker run hello-world
Configure Docker data storage directory:
Skip this step in the first install guide, we aren't using an external drive, we are using the same ssd that we installed ubuntu server on.
Create a directory to store your dojo.
Download the latest version of Dojo
unzip samourai-dojo-master.zip -d .
Copy into your dojo-app directory
cp -a samourai-dojo-master/. dojo-app/
Get rid of the source archive now that we have unzipped it and placed it in our dojo-app directory
rm -rf samourai-dojo-master rm samourai-dojo-master.zip
Configure the Dojo
Change directory into the my-dojo configuration folder
list the directories with ls (a handy command in general lol)
Now we are going to go through each configuratin file, and edit some values in preparation for the installation. I like to save the edited values into secure notes using bitwarden password manager.
After editing each configuration file save and exit the file with CTRL+X, Y and ENTER.
Edit the bitcoind conf
change the bitcoin_rpc_user and bitcoin_rpc_password to your desired value. I like to save them in my password manager. You can also change the bitcoin_db_cache to a higher value if youve got more ram. If you're doing this on the optiplex with 16gb ram go ahead and use 2048 for this value.
Edit the database conf
Chance the mysql_root_password, the mysql_user and the mysql_password to custom values, save these values in a password manager.
Edit the nodejs conf
Change node_api_key, node_admin_key, node_jwt_secret, node_active_indexer to custom values and save them into your password manager.
Edit the indexer conf
We are going to use fulcrum, you can find instructions for this in the advanced section under local fulcrum server.
INDEXER_INSTALLmust be set to
NODE_ACTIVE_INDEXERmust be set to
# Set the value of INDEXER_INSTALL to "on" # Set the value of INDEXER_TYPE to "fulcrum" # Set the value of INDEXER_BATCH_SUPPORT to "active" # Save and exit nano
Edit the explorer conf
Set explorer_install to on, and cheache the explorer_key to a custom value. Save the value into your password manager.
Edit the whirlpool conf
Set whirlpool_install to on
That wraps everthing up, its time to install the dojo.
Change directory into the my-dojo directory
now all you gotta do is run
It'll ask if you want to install, type y, hit enter, and away it goes, docker will run the required scripts and complete the install. Read about the automatic install.
To get your specific onion links run
It will have the onion address to your Dojo Maintenance Tool, your Block Explorer, your fulcrum hidden service, and your whirlpool onion link (I accidentally forgot the whirlpool conf before taking this screenshot and was to lazy to go back lol.)
Learn more about using dojo here.
One last thing, you might have to rescan your dojo if you're connecting a previously used samourai wallet.
Happy Dojo operating.