DEV Community

Daniel Ioni
Daniel Ioni

Posted on

๐Ÿš€ How I Deployed MyZubster on a VPS โ€“ A Complete Guide

๐Ÿš€ How I Deployed MyZubster on a VPS โ€“ A Complete Guide

After building the backend (Rust + Tari) and the frontend (React + TypeScript) for MyZubster, the next logical step was to make it accessible to the world. In this guide, I'll walk you through the exact steps I took to deploy a full-stack NFT application on a VPS.

What you'll learn:

  • How to set up a VPS for a production deployment
  • How to deploy a Rust backend with Docker
  • How to deploy a React frontend with Nginx
  • How to configure a reverse proxy
  • How to secure your server

๐Ÿ“ฆ Prerequisites

  • A VPS (Ubuntu 22.04 or 24.04 recommended)
  • SSH access to your server
  • A domain name (optional, but recommended)
  • Basic knowledge of the Linux terminal
  • Your project code hosted on GitHub

My setup:

  • VPS Provider: [Your provider, e.g., DigitalOcean, Vultr]
  • OS: Ubuntu 24.04 LTS
  • RAM: 4GB
  • Storage: 50GB SSD

๐Ÿ”ง Step 1: Initial Server Setup

1.1 Connect to your VPS

ssh root@YOUR_VPS_IP

1.2 Update the system
bash

apt update && apt upgrade -y

1.3 Create a new user (recommended)
bash

adduser myzubster
usermod -aG sudo myzubster
su - myzubster

1.4 Set up SSH keys (for security)
bash

# On your local machine, copy your public key
ssh-copy-id myzubster@YOUR_VPS_IP

1.5 Configure firewall
bash

sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable

๐Ÿณ Step 2: Install Docker and Docker Compose
bash

# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

# Add user to docker group
sudo usermod -aG docker $USER

# Install Docker Compose
sudo apt install docker-compose-plugin -y

# Verify installation
docker --version
docker compose version

๐Ÿ—๏ธ Step 3: Deploy the Backend (Rust + Tari NFT Template)
3.1 Pull the Docker image
bash

docker pull myzubster/tari-nft-template:latest

3.2 Run the container
bash

docker run -d \
  --name tari-nft \
  --restart always \
  -p 8080:8080 \
  -e RUST_LOG=info \
  myzubster/tari-nft-template:latest

3.3 Verify the backend is running
bash

docker ps
docker logs tari-nft

Expected output:
text

INFO: Template NFT server started on port 8080

๐ŸŒ Step 4: Install Node.js and Build the Frontend
4.1 Install Node.js 20
bash

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

# Verify
node --version  # v20.x.x
npm --version   # 10.x.x

4.2 Clone the repository
bash

git clone https://github.com/DanielIoni-creator/MyZubster.git
cd MyZubster/myzubster-frontend

4.3 Install dependencies and build
bash

npm install
npm run build

4.4 Verify the build
bash

ls -la dist/

๐Ÿ–ฅ๏ธ Step 5: Set Up Nginx as a Reverse Proxy
5.1 Install Nginx
bash

sudo apt install nginx -y
sudo systemctl start nginx
sudo systemctl enable nginx

5.2 Create an Nginx configuration
bash

sudo nano /etc/nginx/sites-available/myzubster

Paste this configuration:
nginx

server {
    listen 80;
    server_name YOUR_VPS_IP;  # Or your domain name

    root /var/www/myzubster;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }

    location /api {
        proxy_pass http://localhost:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    # Security headers
    add_header X-Frame-Options "SAMEORIGIN" always;
    add_header X-Content-Type-Options "nosniff" always;
    add_header Referrer-Policy "no-referrer-when-downgrade" always;
}

5.3 Enable the site
bash

# Move the build files
sudo mkdir -p /var/www/myzubster
sudo cp -r dist/* /var/www/myzubster/

# Create a symbolic link
sudo ln -s /etc/nginx/sites-available/myzubster /etc/nginx/sites-enabled/

# Test the configuration
sudo nginx -t

# Restart Nginx
sudo systemctl restart nginx

๐Ÿ”’ Step 6: Set Up SSL with Let's Encrypt (Optional but Recommended)
6.1 Install Certbot
bash

sudo apt install certbot python3-certbot-nginx -y
---

## ๐Ÿ“ฆ Prerequisites

- A VPS (Ubuntu 22.04 or 24.04 recommended)
- SSH access to your server
- A domain name (optional, but recommended)
- Basic knowledge of the Linux terminal
- Your project code hosted on GitHub

**My setup:**
- VPS Provider: [Your provider, e.g., DigitalOcean, Vultr]
- OS: Ubuntu 24.04 LTS
- RAM: 4GB
- Storage: 50GB SSD

---

## ๐Ÿ”ง Step 1: Initial Server Setup

### 1.1 Connect to your VPS

Enter fullscreen mode Exit fullscreen mode


bash
ssh root@YOUR_VPS_IP
6.2 Obtain an SSL certificate
bash

If you have a domain name

sudo certbot --nginx -d your-domain.com

If you only have an IP address (self-signed certificate)

Skip this step and use HTTP

๐Ÿงช Step 7: Test Your Deployment
7.1 Check the backend
bash

curl http://localhost:8080/health

7.2 Check the frontend

Open your browser and go to:
text

http://YOUR_VPS_IP

You should see the MyZubster dashboard!
7.3 Check the API endpoint
bash

curl http://YOUR_VPS_IP/api/status

๐Ÿ› ๏ธ Step 8: Monitoring and Maintenance
8.1 Check logs
bash

Backend logs

docker logs tari-nft

Nginx logs

sudo tail -f /var/log/nginx/access.log
sudo tail -f /var/log/nginx/error.log

8.2 Update the application
bash

Stop the backend container

docker stop tari-nft
docker rm tari-nft

Pull the latest image

docker pull myzubster/tari-nft-template:latest

Restart the container

docker run -d --name tari-nft --restart always -p 8080:8080 myzubster/tari-nft-template:latest

Update the frontend

cd ~/MyZubster/myzubster-frontend
git pull
npm install
npm run build
sudo cp -r dist/* /var/www/myzubster/
8.3 Set up monitoring (optional)
bash

Install htop for system monitoring

sudo apt install htop -y

Install docker stats monitoring

docker stats

๐Ÿšจ Troubleshooting Common Issues
Issue 1: "Port 8080 already in use"
bash

Find the process using port 8080

sudo lsof -i :8080

Kill the process

sudo kill -9 PID

Issue 2: "Connection refused" when connecting to backend
bash

Check if the container is running

docker ps

Check the logs

docker logs tari-nft

Issue 3: Nginx fails to start
bash

Check the configuration

sudo nginx -t

Check the error log

sudo tail -f /var/log/nginx/error.log
Issue 4: Frontend not updating
bash

Clear the browser cache (Ctrl+Shift+Delete)

Or use incognito mode

Clear the Nginx cache

sudo rm -rf /var/cache/nginx/*
sudo systemctl restart nginx
๐Ÿ“Š Security Checklist

SSH port changed from 22 (optional)

SSH key authentication only

Firewall configured (UFW)

Regular updates (apt upgrade)

SSL certificate installed

.env files not exposed

Docker images scanned for vulnerabilities
Enter fullscreen mode Exit fullscreen mode

๐Ÿ”— Resources

GitHub Repository: https://github.com/DanielIoni-creator/MyZubster

Docker Hub: https://hub.docker.com/repository/docker/myzubster/tari-nft-template

MyZubster Dashboard: https://myzubster.com (if you have a domain)

Previous Articles:

    NFTs on Monero in 2026

    MyZubster Tech Guide: Why Monero, Not Bitcoin

    MyZubster NFT Dashboard
Enter fullscreen mode Exit fullscreen mode

๐Ÿš€ Conclusion

Deploying MyZubster on a VPS was a rewarding journey. It taught me how to:

Set up a production server from scratch

Deploy Docker containers in production

Configure Nginx as a reverse proxy

Secure a server with SSL and firewalls

Manage a full-stack application in the cloud
Enter fullscreen mode Exit fullscreen mode

The best part? Now anyone can access and use MyZubster!

If you're planning to deploy your own project, remember:

Start small, then scale

Document everything

Automate with CI/CD when possible

Monitor your server regularly
Enter fullscreen mode Exit fullscreen mode

๐Ÿ“ฌ Connect with Me

If you found this guide helpful, let's connect!

๐Ÿ“– Dev.to: https://dev.to/danielioni

๐Ÿฆ Twitter: https://x.com/myzubster

๐Ÿ’ผ LinkedIn: https://linkedin.com/in/daniel-ioni-62b2b9423/

๐Ÿ™ GitHub: https://github.com/DanielIoni-creator
Enter fullscreen mode Exit fullscreen mode

Built with โค๏ธ for the Monero and Tari community.

Questions? Drop a comment below or reach out on social media! ๐Ÿš€

Top comments (0)