Skip to content
  • Categories
  • Recent
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Slate)
  • No Skin
Collapse
Brand Logo

hashpwn

Home | Donate | GitHub | Matrix Chat | PrivateBin | Rules

  1. Home
  2. Tools
  3. Scripts
  4. Vast.ai Hashtopolis Agent Setup Script

Vast.ai Hashtopolis Agent Setup Script

Scheduled Pinned Locked Moved Scripts
1 Posts 1 Posters 276 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • cycloneC Offline
    cycloneC Offline
    cyclone
    Admin Trusted
    wrote on last edited by cyclone
    #1

    Title: hashtopolis agent setup script
    Author: cyclone
    URL:https://github.com/cyclone-github/scripts/blob/main/vastai_htp_setup.sh
    Description:
    Simple script to run on a vast.ai (or any debian linux) instance to get an agent connected to your hashtopolis server.

    #!/bin/bash
    
    # vast.ai htp setup script
    # by cyclone
    # 
    # Changelog:
    # 2024-12-03.1845;
    #   initial github release
    # 2024-12-04.0945;
    #   added pciutils to update PCI IDs for htp to recognize newer GPUs
    #   added sanity check to ensure script is run as root
    #   updated comments for bash compatibility
    
    HTP_SERVER="https://htp_server.com" # EDIT your htp server ip / domain
    HTP_VOUCHER="htp_voucher"           # EDIT your htp voucher (reusable voucher works best if setting up multiple agents)
    
    if [ "$EUID" -ne 0 ]; then
      echo "Script must be run as root. Please run again using sudo or as root user."
      exit 1
    fi
    
    echo "This script will setup a new vast.ai instance to run htp."
    echo
    echo "Running apt update..."
    apt update &> /dev/null && echo "Ok" || echo "Failed"
    echo "Running apt dist-upgrade..."
    apt dist-upgrade -y &> /dev/null && echo "Ok" || echo "Failed"
    echo "Installing required software..."
    apt install wget nano python3 python3-requests python3-psutil pciutils -y &> /dev/null && echo "Ok" || { echo "Failed, exiting"; exit 1; }
    echo "Updating PCI IDs..."
    update-pciids &> /dev/null && echo "Ok" || echo "Failed"
    echo "Creating & entering htp directory..."
    mkdir htp &> /dev/null
    cd htp/ && echo "Ok" || { echo "Failed, exiting"; exit 1; }
    echo "Downloading hashtopolis.zip from htp server..."
    wget -O hashtopolis.zip "$HTP_SERVER/agents.php?download=1" &> /dev/null && echo "Ok" || { echo "Failed, exiting"; exit 1; }
    echo "Creating config.json..."
    echo '{
      "url": "'"$HTP_SERVER"'/api/server.php",
      "voucher": "'"$HTP_VOUCHER"'",
      "token": "",
      "uuid": ""
    }' > config.json && echo "Ok" || { echo "Failed, exiting"; exit 1; }
    echo "Running htp python client..."
    python3 hashtopolis.zip && echo "Ok" || echo "Failed"
    

    Sysadmin by day | Hacker by night | Go Developer | hashpwn site owner
    3x RTX 4090

    1 Reply Last reply
    💪 👍
    1
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    Who's Online [Full List]

    5 users active right now (2 members and 3 guests).
    hashpwn-bot, v1cvap0r

    Board Statistics

    Our members have made a total of 4.7k posts in 152 topics.
    We currently have 270 members registered.
    Please welcome our newest member, immolatje.
    The most users online at one time was 49 on Thursday, December 26, 2024.

    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent