How to Host the Discord-Captcha-Fishing Source on Linux

In this tutorial, you’ll learn how to host the Discord-Captcha-Fishing project on a Linux VPS. We’ll use Nginx (a web server tool) and pm2 (to keep the bot and server running). Everything starts with the main.mjs file.

Prerequisites

  • A VPS with Linux (Ubuntu recommended).
  • SSH access (you’ll need the VPS IP and password).
  • A domain (e.g., yoursite.com) that you’ll configure to point to your VPS IP.

Step 1: Configure Your DNS

Before setting up the server, you need to point your domain (e.g., yoursite.com) to your VPS IP. This is done in your domain provider’s control panel (e.g., GoDaddy, Namecheap, Cloudflare). Here’s how:

  1. Log in to Your Domain Provider:
    • Go to the website where you bought your domain and log in.
  2. Find the DNS Settings:
    • Look for something like "DNS Management," "Nameservers," or "Zone Editor."
  3. Add an A Record:
    • Create a new record:
    • Type: A (this links your domain to an IP).
    • Name/Host: Leave it blank or use @ for yoursite.com, and use www for www.yoursite.com.
    • Value: Enter your VPS IP (e.g., 123.456.78.90).
    • TTL: Use the default (e.g., 3600) or set to 600 for faster updates.
    • Save the changes.
  4. Wait for DNS to Update:
    • This can take a few minutes to 24 hours. To check if it’s ready, type ping yoursite.com in your terminal or command prompt. If it shows your VPS IP, it’s working.

Note: Do this for both yoursite.com (blank or @) and www.yoursite.com (use www as the name).


Step 2: Connect to Your VPS

  1. Open a terminal on your computer:
    • On Windows, use "Command Prompt" or download "PuTTY."
    • On Mac/Linux, use "Terminal."
  2. Type this command, replacing 123.456.78.90 with your VPS IP:
  3. Enter your password when asked (you won’t see it as you type, that’s normal!).

Step 3: Update the System and Install Tools

Install the necessary programs. Copy and paste each command into the terminal and press Enter:

cd ~
sudo apt-get update
sudo apt update
sudo apt install nginx
sudo apt install certbot
sudo apt install git
sudo apt install curl
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt install -y nodejs
sudo npm install -g pm2
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get clean
clear

If it asks for "yes" or "y," type y and press Enter.


Step 4: Download the Project

Grab the project from GitHub:

git clone https://github.com/PantherOwO/Discord-Captcha-Fishing.git
cd Discord-Captcha-Fishing

Step 5: Edit the Configuration File

  1. Open the config.json file to add your details:
    nano config.json
    
  2. Use the arrow keys to move around. Edit things like:
    • The Discord bot token (get it from the Discord website if you don’t have it).
    • Other settings the project needs.
  3. To save and exit:
    • Press Ctrl + X (hold Ctrl and press X).
    • Type y to confirm.
    • Press Enter to exit.

Step 6: Configure Nginx

We’ll use the default Nginx file and add our settings.

  1. Open the default file:
    sudo nano /etc/nginx/sites-available/default
    
  2. Delete everything (hold Ctrl + K to erase line by line until it’s empty).
  3. Copy and paste this text:
    server {
        listen 80;
        server_name yoursite.com www.yoursite.com; # Put your domain here
    
        client_max_body_size 0;
    
        location / {
            proxy_pass http://localhost:3000;
            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;
        }
    }
    
  4. Replace yoursite.com with your real domain (e.g., myproject.com).
  5. Save and exit:
    • Press Ctrl + X.
    • Type y.
    • Press Enter.
  6. Restart Nginx:
    sudo systemctl restart nginx
    

Step 7: Add HTTPS Security with Certbot

Now that DNS is set, secure your site with HTTPS:

sudo certbot --nginx -d yoursite.com -d www.yoursite.com
  • Replace yoursite.com with your domain.
  • Answer the questions:
    • Enter your email when asked.
    • Choose 2 to redirect all traffic to HTTPS (recommended).

Step 8: Run the Project with PM2

  1. Install the project’s dependencies:
    npm install
    
  2. Start the bot and server with pm2:
    pm2 start main.mjs --name "discord-captcha"
    
  3. Save the PM2 setup:
    pm2 save
    
  4. Set PM2 to start with the system:
    pm2 startup
    

Step 9: Open Firewall Ports

Open ports 80 and 443 for the site:

1
2
3
sudo ufw allow 80
sudo ufw allow 443
sudo ufw enable

Step 10: Test Everything

  • Open your browser and go to https://yoursite.com or https://www.yoursite.com.
  • If something loads, the server is working!
  • Check the bot on Discord.
  • If there’s an issue, see the errors with:
    pm2 logs discord-captcha
    

Tips for Beginners

  • If the site doesn’t load, ensure your DNS is pointing to the VPS IP (use ping yoursite.com to check).
  • If Nginx fails, test it with:
    sudo nginx -t
    
  • Stuck? Copy the error message and ask for help!

Done! Your project is live with HTTPS, no file size limits, and the bot is running smoothly. Enjoy!


Edit
Pub: 05 Mar 2025 22:48 UTC
Views: 150