├── README.md
└── nexus.sh
/README.md:
--------------------------------------------------------------------------------
1 |
Run Nexus Prover Beta
2 |
3 | ## Info
4 | - You need to have min 4 RAM in your system (VPS)
5 | - Recommended : 6 GB RAM
6 | - You can buy VPS from [PQ Hosting](https://pq.hosting/?from=622403&lang=en) using cryptocurrency
7 | ---
8 | This script is compatible with Ubuntu on local system as well as on VPS
9 | - If you run on VPS, u don't need to do anything after running the installation commands
10 | - If you run on Local system (Ubuntu), u just need to open the terminal after turning on your system to start this prover, it will start running automatically again
11 |
12 | ## Installation
13 | - You can use either this command
14 | ```bash
15 | sudo apt install curl && curl -sSL https://raw.githubusercontent.com/zunxbt/nexus-prover/main/nexus.sh | bash
16 | ```
17 | - Or this command to run this script
18 | ```bash
19 | sudo apt install wget && wget -qO - https://raw.githubusercontent.com/zunxbt/nexus-prover/main/nexus.sh | bash
20 | ```
21 |
22 | ## Status
23 | - You can check your prover logs, using the below command
24 | ```bash
25 | journalctl -u nexus.service -f -n 50
26 | ```
27 | - You will see something like this, it means, it is fine
28 |
29 | 
30 |
31 | ## Imp Note (Try 15 mins after running the installation command)
32 | - If you want to connect your web browser nexus prover ID with CLI, then just visit : [Nexus Beta Website](https://beta.nexus.xyz/) and then copy your prover ID from profile section
33 | - If you can't copy normally then watch the below video (Use f12 or just right click on empty place on the site and then click on inspect option. then go to applictaion section and copy the prover ID, don't include the double comma)
34 |
35 |
36 | https://github.com/user-attachments/assets/4648f062-f63a-40e1-8697-c82851ed9470
37 |
38 |
39 | - Now open terminal and use the below command
40 | ```bash
41 | sed -i 's/.*/YOUR_PROVER_ID/' .nexus/prover-id
42 | ```
43 | - Make sure to replace `YOUR_PROVER_ID` with the value u copied earlier (Example : `sed -i 's/.*/P2Fn8XlXjuWr8yeoJvE6bi2iP1I3/' .nexus/prover-id`)
44 | - Now restart the nexus.service using below command
45 | ```bash
46 | sudo systemctl restart nexus.service
47 | ```
48 | - After some times, u will see that, your CLI nexus points will also be displayed on [Nexus Beta Website](https://beta.nexus.xyz/) upon clicking `Profile` section
49 |
50 | 
51 |
--------------------------------------------------------------------------------
/nexus.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | RED='\033[0;31m'
4 | GREEN='\033[0;32m'
5 | YELLOW='\033[1;33m'
6 | BLUE='\033[0;34m'
7 | CYAN='\033[0;36m'
8 | MAGENTA='\033[0;35m'
9 | NC='\033[0m'
10 |
11 | error() {
12 | echo -e "${RED}[ERROR]${NC} $1"
13 | exit 1
14 | }
15 |
16 | warn() {
17 | echo -e "${YELLOW}[WARN]${NC} $1"
18 | }
19 |
20 | info() {
21 | echo -e "${BLUE}[INFO]${NC} $1"
22 | }
23 |
24 | success() {
25 | echo -e "${GREEN}[SUCCESS]${NC} $1"
26 | }
27 |
28 | task() {
29 | echo -e "${MAGENTA}[TASK]${NC} $1"
30 | }
31 |
32 |
33 | task "Installing system packages"
34 | packages=(curl wget build-essential pkg-config libssl-dev unzip git-all screen)
35 | for pkg in "${packages[@]}"; do
36 | if ! dpkg -l | grep -q "^ii $pkg "; then
37 | sudo DEBIAN_FRONTEND=noninteractive apt-get install -y $pkg
38 | else
39 | info "$pkg is already installed"
40 | fi
41 | done
42 |
43 | task "Checking Rust installation"
44 | if ! command -v rustc &> /dev/null; then
45 | info "Installing Rust"
46 | curl -sSL https://raw.githubusercontent.com/zunxbt/installation/main/rust.sh | bash || error "Failed to install Rust"
47 | sleep 2
48 | . "$HOME/.cargo/env"
49 | sleep 1
50 | rustup target add riscv32i-unknown-none-elf
51 | else
52 | info "Rust is already installed"
53 | fi
54 |
55 | task "Installing Protocol Buffers"
56 | if ! command -v protoc &> /dev/null; then
57 | wget https://github.com/protocolbuffers/protobuf/releases/download/v21.5/protoc-21.5-linux-x86_64.zip
58 |
59 | task "Extracting Protocol Buffers"
60 | if ! unzip -o protoc-21.5-linux-x86_64.zip -d protoc; then
61 | error "Failed to extract Protocol Buffers"
62 | fi
63 |
64 | task "Installing Protocol Buffers"
65 | sudo rm -rf /usr/local/include/google 2>/dev/null
66 | sudo mv protoc/bin/protoc /usr/local/bin/ || error "Failed to move protoc binary"
67 | sudo mv protoc/include/* /usr/local/include/ || error "Failed to move protoc headers"
68 |
69 | rm -rf protoc*
70 | success "Protocol Buffers installed"
71 | else
72 | info "Protocol Buffers is already installed"
73 | fi
74 |
75 | task "Running Nexus CLI"
76 | curl https://cli.nexus.xyz/ | sh
77 |
--------------------------------------------------------------------------------