Akash Command (CLI)
This guide will walk you through installing the akashapplication, creating and funding an account on an Akash network, and deploying a single-tier web application on Akash.
The software to run Akash and the command-line client used to interact with them are all distributed in the akashapplication. The akash command is used to run the Akash Network.

Part 1. Install Akash

Select a tab below to view instructions for MacOS, Linux, or compiling from source.
MacOS
Linux
Source

MacOS

Before you install Akash, you will need to install the XCode Command Line Tools, and also we recommend using Homebrew to install Akash.

1. Install XCode:

You will need to install Apple's XCode Command Line Tools. Run this command in Terminal:
1
xcode-select --install
Copied!

2. Install Homebrew:

If you do not have Homebrew, you can install Homebrew using:
1
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Copied!

3. Install Akash:

Install akash using homebrew:
1
brew tap ovrclk/tap
2
brew install akash
3
brew link akash --force
Copied!
Once installed, verify the installation by running akash version
1
akash version
Copied!
Congrats!

Linux

Download the archive for your system from the release page, extract it, and install the akash binary into your path.

GoDownloader

Alternatively, install the latest version via godownloader First, configure the version of the Akash Network AKASH_VERSIONas a shell variable in your terminal:
1
# Install Zip utility if not already installed
2
sudo apt install zip
Copied!
1
# configure akash version
2
AKASH_VERSION="$(curl -s "https://raw.githubusercontent.com/ovrclk/net/master/mainnet/version.txt")"
3
4
# install akash
5
curl https://raw.githubusercontent.com/ovrclk/akash/master/godownloader.sh | sh -s -- "v$AKASH_VERSION"
Copied!
The final step is to make sure that the akash binaries are available in your shell PATH.This page contains instructions for setting the PATH on Linux.
The downloader will extract the project to .../bin for current path unless otherwise set. Example using debian or Ubuntu: If you are in user home directory when entering the commands above, the example path will be /home/$USER/bin which is where the executable file was downloaded to. To add this to your system path do the following:
1
# Add Akash to Path
2
export PATH=$PATH:/home/$USER/bin
Copied!
You can verify path was added correctly by simply checking with the following command
1
echo $PATH
Copied!

Source

Installing Akash suite from source
1
$ go get -d github.com/ovrclk/akash
2
$ cd $GOPATH/src/github.com/ovrclk/akash
3
$ git checkout "v$AKASH_VERSION"
4
$ make deps-install
5
$ make install
Copied!
Akash is developed and tested with golang 1.16+. Building requires a working golang installation, a properly set GOPATH, and $GOPATH/bin present in $PATH.
Once you have the dependencies properly setup, download and build akash using make install

Part 2. Create an Account

Configure the name of your key. The command below will set the name of your key to myWallet, run the below command and replace myWallet with a name of your choice:
1
AKASH_KEY_NAME=myWallet
Copied!
Verify you have the shell variables set up . The below command should return the name you've used:
1
echo $AKASH_KEY_NAME
Copied!
Copy and paste this command into Terminal to create an Akash account:
1
akash keys add $AKASH_KEY_NAME
Copied!
Read the output and save your mnemonic phrase is a safe place. Let's set a Shell Variable in Terminal AKASH_ACCOUNT_ADDRESS to save your account address for later.
1
export AKASH_ACCOUNT_ADDRESS="$(akash keys show $AKASH_KEY_NAME -a)"
2
3
echo $AKASH_ACCOUNT_ADDRESS
Copied!
We now need to point Akash to where the keys are stored for your configuration. To do this we will set the AKASH_KEYRING_BACKEND environmental variable.
1
AKASH_KEYRING_BACKEND=os
Copied!
Note that if you close your Terminal window this variable will not bee saved.

Part 3. Fund your Account

Funding your network account is required to use the network. All messages charge a transaction fee, deployment leases are paid by the account used to create them. There are a two ways to fund your account, buy tokens and apply for awards from the community.

Buy AKT from an exchange

Tokens may currently be purchased on exchanges listed here. From there you can send tokens to your Akash account address.

Get $100 of AKT from the Akash Community

Developers can request funding from the Akash Community. Please read the article How to Apply for Developer Grants **and follow the steps:

Part 4. Configure your Network

First configure the base URL ($AKASH_NET) for the Akash Network; copy and paste the command below:
1
AKASH_NET="https://raw.githubusercontent.com/ovrclk/net/master/mainnet"
Copied!

Version

Next configure the version of the Akash Network AKASH_VERSION; copy and paste the command below:
1
AKASH_VERSION="$(curl -s "$AKASH_NET/version.txt")"
Copied!

Chain ID

The akash CLI will recogonize AKASH_CHAIN_ID environment variable when exported to the shell.
1
export AKASH_CHAIN_ID="$(curl -s "$AKASH_NET/chain-id.txt")"
Copied!

Network Node

You need to select a node on the network to connect to, using an RPC endpoint. To configure theAKASH_NODE environment variable use this export command:
1
export AKASH_NODE="$(curl -s "$AKASH_NET/rpc-nodes.txt" | head -1)"
Copied!

Confirm your network variables are setup

Your values may differ depending on the network you're connecting to.
1
echo $AKASH_NODE $AKASH_CHAIN_ID $AKASH_KEYRING_BACKEND
Copied!
You should see something similar to:
http://135.181.60.250:26657 akashnet-2 os

Check your Account Balance

Check your account has sufficient balance by running:
1
akash query bank balances --node $AKASH_NODE $AKASH_ACCOUNT_ADDRESS
Copied!
You should see a response similar to:
1
balances:
2
- amount: "93000637"
3
denom: uakt
4
pagination:
5
next_key: null
6
total: "0"
Copied!
If you don't have a balance, please see the funding guide. Please note the balance indicated is denominated in uAKT (AKT x 10^-6), in the above example, the account has a balance of 93 AKT. We're now setup to deploy.
Your account must have a minimum balance of 5 AKT to create a deployment. This 5 AKT funds the escrow account associated with the deployment and is used to pay the provider for their services. It is recommended you have more than this minimum balance to pay for transaction fees. For more information on escrow accounts, see here

Part 5. Create your Configuration

Create a deployment configuration deploy.yaml to deploy the ovrclk/lunie-light for Lunie Light Node app container using SDL.
You can use cURL to download the file:
1
curl -s https://raw.githubusercontent.com/ovrclk/docs/master/guides/deploy/deploy.yml > deploy.yaml
Copied!

Modify your Configuration

You may use the sample deployment file as-is or modify it for your own needs as desscribed in our SDL (Stack Definition Language) documentation. A typical modification would be to reference your own image instead of our demo app image.

EXAMPLE CONFIGURATION:

1
cat > deploy.yaml <<EOF
2
---
3
version: "2.0"
4
5
services:
6
web:
7
image: ovrclk/lunie-light
8
expose:
9
- port: 3000
10
as: 80
11
to:
12
- global: true
13
14
profiles:
15
compute:
16
web:
17
resources:
18
cpu:
19
units: 0.1
20
memory:
21
size: 512Mi
22
storage:
23
size: 512Mi
24
placement:
25
westcoast:
26
attributes:
27
host: akash
28
signedBy:
29
anyOf:
30
- "akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63"
31
pricing:
32
web:
33
denom: uakt
34
amount: 1000
35
36
deployment:
37
web:
38
westcoast:
39
profile: web
40
count: 1
41
42
EOF
Copied!

Part 6. Create your Certificate

Before you can create a deployment, a certificate must first be created. Your certificate needs to be created only once per account and can be used across all deployments.To do this, run:
1
akash tx cert create client --chain-id $AKASH_CHAIN_ID --keyring-backend os --from $AKASH_KEY_NAME --node $AKASH_NODE --fees 5000uakt
Copied!
You should see a response similar to:
1
{
2
"body": {
3
"messages": [
4
{
5
"@type": "/akash.cert.v1beta1.MsgCreateCertificate",
6
"owner": "akash1vns5ka3x69ekm3ecp8my8d5zfu8j23p5qew0w3",
7
"cert": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ3RENDQVdXZ0F3SUJBZ0lJRm1pcUJWcWZDVmt3Q2dZSUtvWkl6ajBFQXdJd1NqRTFNRE1HQTFVRUF4TXMKWVd0aGMyZ3hkbTV6Tld0aE0zZzJPV1ZyYlRObFkzQTRiWGs0WkRWNlpuVTRhakl6Y0RWeFpYY3dkek14RVRBUApCZ1ZuZ1FVQ0JoTUdkakF1TUM0eE1CNFhEVEl4TURNd01qSXpNak15TmxvWERUSXlNRE13TWpJek1qTXlObG93ClNqRTFNRE1HQTFVRUF4TXNZV3RoYzJneGRtNXpOV3RoTTNnMk9XVnJiVE5sWTNBNGJYazRaRFY2Wm5VNGFqSXoKY0RWeFpYY3dkek14RVRBUEJnVm5nUVVDQmhNR2RqQXVNQzR4TUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowRApBUWNEUWdBRUtaSTlmWGVPVzRCYXRwcU1mb1VTekx2b01lWGlpbEZTMnJhZlhKdUNObUlMVjJMaWhIZW5JdjJTCjV5Uzh1Zkh5QmNMSUI5aFE1VE81THRHSUpPdzIvYU0xTURNd0RnWURWUjBQQVFIL0JBUURBZ1F3TUJNR0ExVWQKSlFRTU1Bb0dDQ3NHQVFVRkJ3TUNNQXdHQTFVZEV3RUIvd1FDTUFBd0NnWUlLb1pJemowRUF3SURTUUF3UmdJaApBSjJzQ3ZodGNzWkRXUkQ2MU03ZkVCRUk5eEt5Z0UzRkd3K2tIYVhZYXl0TUFpRUE4cUZtb3FEc1Z0ZzhPSHc1Ck5iOEljd0hiNHVkc0RpTzRxaWhoL0owNWZKaz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=",
8
"pubkey": "LS0tLS1CRUdJTiBFQyBQVUJMSUMgS0VZLS0tLS0KTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFS1pJOWZYZU9XNEJhdHBxTWZvVVN6THZvTWVYaQppbEZTMnJhZlhKdUNObUlMVjJMaWhIZW5JdjJTNXlTOHVmSHlCY0xJQjloUTVUTzVMdEdJSk93Mi9RPT0KLS0tLS1FTkQgRUMgUFVCTElDIEtFWS0tLS0tCg=="
9
}
10
],
11
"memo": "",
12
"timeout_height": "0",
13
"extension_options": [],
14
"non_critical_extension_options": []
15
},
16
"auth_info": {
17
"signer_infos": [],
18
"fee": {
19
"amount": [],
20
"gas_limit": "200000",
21
"payer": "",
22
"granter": ""
23
}
24
},
25
"signatures": []
26
}
Copied!

Part 7. Create your Deployment

To deploy on Akash, run:
1
akash tx deployment create deploy.yaml --from $AKASH_KEY_NAME --node $AKASH_NODE --chain-id $AKASH_CHAIN_ID --fees 5000uakt -y
Copied!
You should see a response similar to:
1
{
2
"height":"140325",
3
"txhash":"2AF4A01B9C3DE12CC4094A95E9D0474875DFE24FD088BB443238AC06E36D98EA",
4
"codespace":"",
5
"code":0,
6
"data":"0A130A116372656174652D6465706C6F796D656E74",
7
"raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"dseq\",\"value\":\"140324\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]",
8
"logs":[
9
{
10
"msg_index":0,
11
"log":"",
12
"events":[
13
{
14
"type":"akash.v1",
15
"attributes":[
16
{
17
"key":"module",
18
"value":"deployment"
19
},
20
{
21
"key":"action",
22
"value":"deployment-created"
23
},
24
{
25
"key":"version",
26
"value":"2b86f778de8cc9df415490efa162c58e7a0c297fbac9cdb8d6c6600eda56f17e"
27
},
28
{
29
"key":"owner",
30
"value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj"
31
},
32
{
33
"key":"dseq",
34
"value":"140324"
35
},
36
{
37
"key":"module",
38
"value":"market"
39
},
40
{
41
"key":"action",
42
"value":"order-created"
43
},
44
{
45
"key":"owner",
46
"value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj"
47
},
48
{
49
"key":"dseq",
50
"value":"140324"
51
},
52
{
53
"key":"gseq",
54
"value":"1"
55
},
56
{
57
"key":"oseq",
58
"value":"1"
59
}
60
]
61
},
62
{
63
"type":"message",
64
"attributes":[
65
{
66
"key":"action",
67
"value":"create-deployment"
68
},
69
{
70
"key":"sender",
71
"value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj"
72
},
73
{
74
"key":"sender",
75
"value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj"
76
}
77
]
78
},
79
{
80
"type":"transfer",
81
"attributes":[
82
{
83
"key":"recipient",
84
"value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8"
85
},
86
{
87
"key":"sender",
88
"value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj"
89
},
90
{
91
"key":"amount",
92
"value":"5000uakt"
93
},
94
{
95
"key":"recipient",
96
"value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u"
97
},
98
{
99
"key":"sender",
100
"value":"akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj"
101
},
102
{
103
"key":"amount",
104
"value":"5000000uakt"
105
}
106
]
107
}
108
]
109
}
110
],
111
"info":"",
112
"gas_wanted":"200000",
113
"gas_used":"94653",
114
"tx":null,
115
"timestamp":""
116
}
Copied!

Find your Deployment #

Find the Deployment Sequence (DSEQ) in the deployment you just created. You will need to replace the AKASH_DSEQ with the number from your deployment to configure a shell variable.
1
AKASH_DSEQ=CHANGETHIS
Copied!
Now set the Order Sequence (OSEQ) and Group Sequence (GSEQ). Note that if this is your first time deploying on Akash, OSEQ and GSEQ will be 1.
1
AKASH_OSEQ=1
2
AKASH_GSEQ=1
Copied!
Verify we have the right values populated by running:
1
echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ
Copied!

Part 8. View your Bids

After a short time, you should see bids from providers for this deployment with the following command:
1
akash query market bid list --owner=$AKASH_ACCOUNT_ADDRESS --node $AKASH_NODE --dseq $AKASH_DSEQ
Copied!

Choose a Provider

Note that there are bids from multiple different providers. In this case, both providers happen to be willing to accept a price of 1 uAKT. This means that the lease can be created using 1 uAKT or 0.000001 AKT per block to execute the container. You should see a response similar to:
1
bids:
2
- bid:
3
bid_id:
4
dseq: "140324"
5
gseq: 1
6
oseq: 1
7
owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj
8
provider: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal
9
created_at: "140326"
10
price:
11
amount: "1"
12
denom: uakt
13
state: open
14
escrow_account:
15
balance:
16
amount: "50000000"
17
denom: uakt
18
id:
19
scope: bid
20
xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal
21
owner: akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal
22
settled_at: "140326"
23
state: open
24
transferred:
25
amount: "0"
26
denom: uakt
27
- bid:
28
bid_id:
29
dseq: "140324"
30
gseq: 1
31
oseq: 1
32
owner: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj
33
provider: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7
34
created_at: "140326"
35
price:
36
amount: "1"
37
denom: uakt
38
state: open
39
escrow_account:
40
balance:
41
amount: "50000000"
42
denom: uakt
43
id:
44
scope: bid
45
xid: akash1vn06ycjjnvsvl639fet9lajjctuturrtx7fvuj/140324/1/1/akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7
46
owner: akash1f6gmtjpx4r8qda9nxjwq26fp5mcjyqmaq5m6j7
47
settled_at: "140326"
48
state: open
49
transferred:
50
amount: "0"
51
denom: uakt
Copied!
For this example, we will choose akash10cl5rm0cqnpj45knzakpa4cnvn5amzwp4lhcal Run this command to set the provider shell variable:
1
AKASH_PROVIDER=akash1vky0uh4wayh9npd74uqesglpaxwymynnspf6a4
Copied!
Verify we have the right value populated by running:
1
echo $AKASH_PROVIDER
Copied!

Part 9. Create a Lease

Create a lease for the bid from the chosen provider above by running this command:
1
akash tx market lease create --chain-id $AKASH_CHAIN_ID --node $AKASH_NODE --owner $AKASH_ACCOUNT_ADDRESS --dseq $AKASH_DSEQ --gseq $AKASH_GSEQ --oseq $AKASH_OSEQ --provider $AKASH_PROVIDER --from $AKASH_KEY_NAME --fees 5000uakt
Copied!

Confirm the Lease

You can check the status of your lease by running:
1
akash query market lease list --owner $AKASH_ACCOUNT_ADDRESS --node $AKASH_NODE --dseq $AKASH_DSEQ
Copied!
Note the bids will close automatically after 5 minutes, and you may get the response:
1
bid not open
Copied!
If this happens, close your deployment and open a new deployment again. To close your deployment run this command:
1
akash tx deployment close --from=$AKASH_KEY_NAME --fees 5000uakt
Copied!
If your lease was successful you should see a response that ends with:
1
state: active
Copied!
Please note that once the lease is created, the provider will begin debiting your deployment's escrow account, even if you have not completed the deployment process by uploading the manifest in the following step.

Part 10. Send the Manifest

Upload the manifest using the values from above step:
1
akash provider send-manifest deploy.yaml --node $AKASH_NODE --dseq $AKASH_DSEQ --provider $AKASH_PROVIDER --home ~/.akash --from $AKASH_KEY_NAME
Copied!
You should expect no output from the above command.

Confirm the URL

Now that the manifest is uploaded, your image is deployed. You can retrieve the access details by running the below:
1
akash provider lease-status --node $AKASH_NODE --home ~/.akash --dseq $AKASH_DSEQ --from $AKASH_KEY_NAME --provider $AKASH_PROVIDER
Copied!
You should see a response similar to:
1
{
2
"services": {
3
"web": {
4
"name": "web",
5
"available": 1,
6
"total": 1,
7
"uris": [
8
"rga3h05jetf9h3p6dbk62m19ck.ingress.ewr1p0.mainnet.akashian.io"
9
],
10
"observed_generation": 1,
11
"replicas": 1,
12
"updated_replicas": 1,
13
"ready_replicas": 1,
14
"available_replicas": 1
15
}
16
},
17
"forwarded_ports": {}
18
}
Copied!
You can access the application by visiting the hostnames mapped to your deployment. Look for a URL that is ends in akashian.io and copy it to your web browser.

View your logs

You can view your application logs to debug issues or watch progress like so:
1
akash \
2
--home "$AKASH_HOME" \
3
--node "$AKASH_NODE" \
4
provider lease-logs \
5
--dseq "$AKASH_DSEQ" \
6
--gseq "$AKASH_GSEQ" \
7
--oseq "$AKASH_OSEQ" \
8
--provider "$AKASH_PROVIDER" \
9
--from "$AKASH_KEY_NAME"
Copied!
Last modified 1mo ago