Crypto Strategies eBook

Solana NFT Collection

In this text we’ll give you a short overview of how you can create a Solana NFT collection from scratch.

This is a short guide outlining necessary steps. If you want a more involved one, with all the detailed code, have a look here. This tutorial comes also with access to a private Discord channel for Solana Devs.

The end result of the full tutorial above is the NFT minting website on Solana that you can deploy on Vercel. All the steps are described for beginners:

Create a Solana NFT collection

Create a Solana NFT collection

Generally speaking in order to have a collection you need to:

  1. create a Solana wallet and interact with Solana blockchain
  2. create NFTs with metadata
  3. deploy an NFT collection on Solana
  4. create a simple website where people can buy your NFT

The first point is pretty straightforward. It’s all about installing Solana CLI (command line interface).

For 2-4 we will need to install Sugar (Candy Machine interface) that will allow uploading of NFTs and then download also a sample Candy Machine UI which will be our website.

The full code for creating a collection is:

### Install Sugar

bash <(curl -sSf
sugar --version

### Setup Solana Wallets

# Setup Solana Tool Suite
sh -c "$(curl -sSfL"
solana --version

# owner
solana-keygen new --outfile ./wallets/Owner.json

# treasury
solana-keygen new --outfile ./wallets/Treasury.json

# creator
solana-keygen new --outfile ./wallets/Creator.json

solana config set --keypair ./wallets/owner.json
solana config set --url

### Prepare Assets - sample collection of NFTs with metadata

curl --output ./


### Launch Interactive Setup with Sugar

# Gets you Candy Machine ID
sugar launch

### Setup Candy Machine UI - the NFT minting website

git clone

cd candy-machine-ui

yarn install

cp .env.example .env
## modify this .env to add your details

yarn start

This is it!

Following these steps will create a simple NFT collection on Solana, using the exemplary metadata and images.

Create an NFT pfp collection

Another issue to solve when creating a large collection is how to create actual images when you want to have say 5000 elements.

The answer is you have to create them generatively using layers. You will have layers for bodies, eyes, hats, hands, etc. and you each NFT will be a randomly picked selection. This way you can create a pfp – a profil picture NFT depicting a person or an animal.

In the tutorial 3 ways are presented:

  • manual modifications; you just do everything manually. This is doable if your collection has less than 100 NFTs.
  • custom Python code: you can use simple Python code to generate all the NFTs from layers
  • Hashlips Art Engine

HashLips Art Engine is a tool used to create multiple different instances of artworks based on provided layers. It’s available for free on Github and you can configure it following the official guide to output NFTs with Solana-adjusted metadata.

Deploying website and NFTs

There are two awesome tools you can use in your NFT journey.

First of all Vercel is a free tool that will allow you to deploy your website – especially the one above candy-machine-ui. You simply need to connect it to your Github account.

The second tool is Pinata that gives you free storage and is compatible with Sugar. You can register for free on Pinata. Go to API keys and generate one to get a JWT token that you can use for ‘sugar launch’ configuration.

That’s it!

Creating a Solana NFT collection is a great programming exercise that can be done by beginners too.

Leave a Reply

Your email address will not be published. Required fields are marked *