Setting up a Solana Metaplex NFT Storefront in the Cloud

Download and Install Putty

  • Log in and execute commands on your cloud hosted web server
  • Generate a SSH SHA 256 keypair

⚠️ Security Tip

Choose a Cloud Provider

Cloud Account Setup

Destroying a Server

Provision a Virtual Server

Get a Domain Name

Log into your Server

Server Config

Update System

sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt install fail2ban -y && sudo apt install nginx -y

Update Snap and Install Certbot

sudo snap install core; sudo snap refresh core
sudo apt-get remove certbot
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
systemctl status nginx

Config Local Firewall

sudo ufw allow proto tcp from any to any port 22
sudo ufw allow proto tcp from any to any port 80
sudo ufw allow proto tcp from any to any port 3000
sudo ufw enable
sudo ufw allow 'Nginx HTTP'

Install nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source ~/.bashrc
nvm — version
nvm ls-remote
nvm install v16.8.0

Update Local Repo

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update

Install Yarn

sudo apt install yarn -y

Clone Metaplex

git clone https://github.com/metaplex-foundation/metaplex.git

Edit the .env File

sudo nano ~/metaplex/js/packages/web/.env

Compile Website

cd metaplex/js/
yarn
yarn bootstrap
yarn start

Configure nginx Reverse Proxy

sudo nano /etc/nginx/sites-available/default
proxy_pass http://127.0.0.1:3000/;
sudo nginx -t
sudo systemctl restart nginx

A Quick Test

yarn start

But Wait!

Install a SSL certificate

sudo certbot --nginx
sudo ufw allow 'Nginx Full'
sudo ufw delete allow 'Nginx HTTP'
sudo certbot renew --dry-run

Set up Node.Js as a Service

npm install pm2@latest -g
pm2 start yarn --interpreter bash --name metaplex -- start
pm2 startup systemd
pm2 save

One Last Step, Config your Cloud Firewall

That’s it! Your Metaplex Storefront is ready for action!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Artifact Staking

Artifact Staking

Artifact Staking is a cutting edge, forward leaning blockchain infrastructure provider.