Using Akash for Web3 Hosting

Mando
6 min readFeb 28, 2022

Akash is a web3 platform that provides container hosting services to anyone who needs them. In this blog, we will cover how this works in addition to getting you through your first deployment.

For our purposes, we will stay away from the command line tools provided by the Akash core team and focus on a tool that was developed by a small group of developers to make deployments easier on the network. This tool is called Akashlytics and can be downloaded here https://akashlytics.com/deploy. If you want to follow along please download and install the tool on your computer now. It is compatible with Mac, Linux, and Windows operating systems.

Setup

Now that we have the tool installed we need to get our prerequisites set up. First things first, launch the tool and click “Create New Account”. Today we will be generating a wallet instead of importing an existing one.

As with any new crypto wallet, the mnemonic phrase should be recorded as it will be the only way to recover the wallet if lost. Also, it should never be shared as it will allow anyone who has it to access and move any funds that are in it. The account name and password will only be used inside this tool and are not required to recover the wallet in the future.

After hitting the next button you will be presented with the ever-present crypto wallet mini-game.

Click the words in order to rebuild your mnemonic

.

When you have the puzzle correct simply click next. From there you will be presented with a prompt on how to purchase some AKT tokens to use in your deployment.

I won’t go into how to purchase crypto here but once your wallet is funded with at least 6 tokens we can proceed to the next set of steps. You will see the balance in the upper left-hand corner of the window.

There is only one more thing needed to get up and running. A certificate is how you will verify your identity when interacting with the compute providers. The certificate is verifiable on-chain and associated with your address so anyone can verify that the two go together.

To create a certificate click the create certificate button on the upper right-hand corner of the window.

You will be asked to put in your password. This is the same password you set up while creating the wallet. After entering your password you will be prompted to approve the on-chain transaction. This prompt will appear every time you have to do a step that interacts with the chain. When the operation completes you will see a serial number identifying the certificate you just created.

This is the last prerequisite needed to actually run a deployment on the Akash Network.

Deploying

To create a new deployment simply click the “Create Deployment” button this will run a few checks to make sure you completed the setup steps correctly before allowing you to deploy. If all is well you should see three green checkmarks

Click continue. Since we are only doing an example deployment we will be using a template that someone else created to run an application. We can find the templates in the template gallery in the bottom of the list. Go ahead and click on it.

Games are fun so let’s choose Tetris from the list.

To deploy from this template simply click the deploy button next to the name.

You should now see a large window with a lot of text in it. This is what is called an SDL file and is kind of like the recipe for the deployment. If you think about making a cake with a recipe this is exactly the same concept. With baking, you follow the directions for what to and in what quantities. You apply the right amount of heat to those ingredients for the right amount of time and you will always end up with basically the same cake. SDL files work like a recipe that providers can follow to always end up with the exact same end result. In our case a running container in the cloud.

Type in a name for your deployment so you can easily keep track of it and click “Create Deployment”. This will trigger a pop-up asking if you are ok with depositing 5 AKT into escrow so that the provider can be guaranteed payment. Think of this as an assurance that you won’t be dining and dashing with the provider’s compute power.

When you finished depositing the tokens you will now have to wait for a few minutes while the bids start to roll in. Only the providers that can satisfy the requirements inside the SDL you used will be able to bid.

When the spinning circle stops you will have a list of bids to choose from. You can view details about each provider and select the one that is right for your needs.

In this case, I will select the first one on the list since I am only running a game and price is my only concern. Once you have selected the provider simply click the “Accept Bid” button in the upper right and approve the transaction. After a few seconds, you will see your deployment up and running. If you want to test it navigate to the URL at the bottom of the window.

That’s it. We now have a full container deployment running on a provider from the Akash Network. In future blogs, I plan to cover some advanced topics related to Akash deployments. Things like how to deploy in a way that would make censorship extremely difficult and how to build your own fully custom deployment.

--

--

Mando

Mando has diverse interests from technology, crypto, relationships (closed ENM), family life, mead brewing and cooking (particularly BBQ).