Sol on Akash for Dummies

June 15, 2021

Sol on Akash for Dummies

How to run a Solana Validator on the Akash Network the simple way

This is a multi Stage deployment guide with the aim of providing users the information to deploy and maintain a Solana Validator Node on the Akash Network with minimal friction and deployment knowledge.

  • Stage 1 consists of deploying an Ubuntu image to Akash. Think of it as a normal EC2 AWS Ubuntu instance you can install software and run commands on.
  • Stage 2 is the process of running a Solana Validator Node on that Ubuntu instance we deployed to Akash in Stage 1.

Stage 1-

Ubuntu on Akash
(Credit- CoffeeRoaster4435)

Setup an “ssh” Ubuntu image on Akash

Create the Akash-Ubuntu Deploy.yml-

(While also exposing some ports we will need for later)

--- version: "2.0"services: web: image: user994455/ubuntu-base:0.2 env: - sshport=22000 - pubkey=your-public-ssh-key-here expose: - port: 22000 as: 22000 to: - global: true - global: true - port: 8899 as: 8899 proto: tcp to: - global: true - port: 8000 as: 8000 proto: tcp to: - global: true - port: 8001 as: 8001 proto: tcp to: - global: true - port: 8002 as: 8002 proto: tcp to: - global: true - port: 8003 as: 8003 proto: tcp to: - global: true - port: 8004 as: 8004 proto: tcp to: - global: true - port: 8005 as: 8005 proto: tcp to: - global: true - port: 8006 as: 8006 proto: tcp to: - global: true - port: 8007 as: 8007 proto: tcp to: - global: true - port: 8008 as: 8008 proto: tcp to: - global: true - port: 8009 as: 8009 proto: tcp to: - global: true - port: 8010 as: 8009 proto: tcp to: - global: true profiles: compute: web: resources: cpu: units: 4 memory: size: 8Gi storage: size: 20Gi placement: dcloud: attributes: host: akash signedBy: anyOf: - "akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63" pricing: web: denom: uakt amount: 20deployment: web: dcloud: profile: web count: 1

On your workstation setup an ssh public/private key pair.

$ssh-keygen -t rsa# (a password is optional. But in most cases you don't need one).# Note that $HOME/.ssh/ is now created

Update deploy.yml-

Copy and paste the contents of $HOME/.ssh/ and paste them into deploy.yml -pubkey=your-public-ssh-key-here(deploy.yml : line 8). NOTE: Make sure that you do not use any " around the pubkey as this will cause problems.

Update resources as needed. Set the amount of RAM / CPU / disk space as needed.

Ensure the steps you follow in Deploy Commands are executed in the same directory your Deploy.yml is located in.


Deploy to Akash-

You will need an Akash wallet with at least 5 AKT in order to provide escrow to a provider for your deployment. These commands will have certain flags filled to keep the user experience as simple as possible and assume you already have an Akash wallet in your environment. If you do not follow the steps on the Akash Docs

Deploy Commands

Step 1: Create a certificate & deployment

akash tx deployment create deploy.yml --from --node=tcp:// --chain-id akashnet-2 --fees 5000uakt -y

After you run the akash tx deployment create command your client will spit out a json string. Within the string you will be given a dseq value.

Note: the dseq value given here cannot be used in order to deploy you must acquire your own.

Step 2: Export your DSEQ as an environment variable

export DSEQ=

Step 3: Make an order and view your bids

akash query market order get --node= --owner --dseq $DSEQ --oseq 1 --gseq 1 akash query market bid list --owner --node= --dseq $DSEQ

Once you run query market bid list you will receive bids from multiple different providers.

- bid:bid_id:dseq: "140324"gseq: 1oseq: 1owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvujprovider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7created_at: "140326"price:amount: "1"denom: uaktstate: openescrow_account:balance:amount: "50000000"denom: uaktid:scope: bidxid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7settled_at: "140326"state: opentransferred:amount: "0"denom: uakt

Simply select a provider from the list. To make the experience easier a provider was added to the following commands.

Step 4: Create your lease & send your manifest

akash tx market lease create --chain-id akashnet-2 --node=tcp:// --owner --dseq $DSEQ --gseq 1 --oseq 1 --provider akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 --from --fees 5000uaktakash query market lease list --owner --node=tcp:// --dseq $DSEQakash provider send-manifest deploy.yml --node=tcp:// --dseq $DSEQ --provider akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7 --home ~/.akash --from

Step 5: View your status and acquire port/URL

akash provider lease-status --node=tcp:// --home ~/.akash --dseq $DSEQ --from --provider akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7
After running akash provider lease-status you should get
{ "services": { "web": { "name": "web", "available": 1, "total": 1, "uris": null, "observed_generation": 1, "replicas": 1, "updated_replicas": 1, "ready_replicas": 1, "available_replicas": 1 } }, "forwarded_ports": { "web": [ { "host": "", <- your url "port": 22000, "externalPort": , "proto": "TCP", "available": 1, "name": "web" } ] } }

Finally to ssh in to your Ubuntu deployment run

ssh -p root@

Stage 2-

Solana Validator Node

Step 1: Install the Solana release v1.6.10 on your machine

sh -c “$(curl -sSfL"

Please update your PATH environment variable to include the solana programs:

Check your version

solana --version

Step 2: Configure Solana CLI

Confirm the Cluster is reachable

solana transaction-count

Confirm your installation

solana-gossip spy --entrypoint

Step 3:

Create Identity

solana-keygen new -o ~/validator-keypair.json

Set the config path to your keypair

solana config set --keypair ~/validator-keypair.json

Airdrop some SOL

solana airdrop 1

Create Your Vote Account

solana-keygen new -o ~/vote-account-keypair.json

Step 4:

Run the Validator Node

solana-validator \  --identity ~/validator-keypair.json \  --vote-account ~/vote-account-keypair.json \  --rpc-port 8899 \  --entrypoint \  --limit-ledger-size \  --log ~/solana-validator.log


Run it in the background with Systemd

[Unit]Description=Solana ValidatorAfter=network.targetWants=solana-sys-tuner.serviceStartLimitIntervalSec=0[Service]Type=simpleRestart=alwaysRestartSec=1User=solLimitNOFILE=700000LogRateLimitIntervalSec=0Environment="PATH=/bin:/usr/bin:/home/sol/.local/share/solana/install/active_release/bin"ExecStart=/home/sol/bin/[Install]

In progress-

Since the port 22 is being opened as port 80 in order to allow for ssh, you must use a load balancer/reverse proxy to expose the remainder of the ports.