Laurens
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    2
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Running a Xai Node on a VPS This guide will show you how to run Xai Node on a VPS. This is a community-built guide. You can find the official Xai documentation [here](https://xai-foundation.gitbook.io/xai-network/xai-blockchain/sentry-node-purchase-and-setup). ## Minimum hardware requirements The following hardware is required to run a Xai node: - 4 GB RAM - 2 CPU Cores - 60 GB Disk Space - x86/X64 Processor - Stable Internet Connection > Note, the above requirements are subject to change. You can find the latest requirements on the [official Xai docs](https://xai-foundation.gitbook.io/xai-network/xai-blockchain/xai-protocol/sentry-nodes-explained/sentry-node-hardware-requirements). ## 1. VPS Setup ### 1.1 Choose VPS First, choose one of the recommended VPS providers and purchase the package that matches the minimum hardware requirements provided above. Make sure to select **Ubuntu 22.04** as your Operating System. You can use Racknerd since they are one of the cheapest VPS providers. The location of your VPS has no influence on whether you can pass the KYC or claim rewards | Provider | Price | | --- | --- | | [Racknerd](https://my.racknerd.com/aff.php?aff=10290&pid=795) | $38.88 Annually| After your purchase, you'll receive login details in your email. ### 1.2 Log into a server > Perform this step on your laptop/PC. | Windows | Command Prompt | | --- | --- | | MacOS | Terminal | | --- | --- | To connect to VPS, use the `ssh` command from your terminal: ```bash ssh $USER@$REMOTE_SERVER_IP ``` Example: ```bash ssh root@706.437.14.562 ``` > If you're using Windows, the SSH Client is available starting from [Windows 10](https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_overview) version. For earlier versions, please use [PuTTY](https://www.putty.org/) or [Terminus](https://termius.com/) or other alternatives When you log in the first time, you’ll see the following message: ```bash The authenticity of host '$REMOTE_SERVER' can`t be established. ED25519 key fingerprint is SHA256:... This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? ``` Type `yes` and press `Enter`. This will prompt you to input a **password**. Note, all Linux systems don't reveal passwords when you type them. Finish entering your password and click `Enter`. If your credentials are correct, you will see the following message: ```bash Warning: Permanently added '$REMOTE_SERVER' (ECDSA) to the list of known hosts. root@$REMOTE_SERVER`s password: Welcome to Ubuntu 20.04.6 LTS (GNU/Linux 4.4.0-169-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage 0 packages can be updated. 0 updates are security updates. ``` # Setting Up the Xai Sentry Node on Your VPS: A Step-by-Step Guide Running a Xai Sentry Node can be a rewarding venture, allowing you to solve challenges and earn esXAI tokens. Here’s a detailed guide to help you set up your node on a Virtual Private Server (VPS). ## 2. Set up Xai Sentry Node ### 2.1 Log Into Your VPS/VM Start by logging into your VPS or VM where you intend to run the Xai Sentry Node. ### 2.2 Update Your System Ensure your system is up to date: ```bash sudo apt update ``` ### 2.3 Install Necessary Dependencies Install the required dependencies, `curl` and `unzip`, using the following command: ```bash sudo apt install curl unzip ``` ### 2.4 Download Xai CLI Fetch the latest version of the Xai Command Line Interface (CLI) using `curl`: > You dont need to download the file on your computer since this command takes it from the github website ```bash curl -L -o sentry-node-cli-linux.zip https://github.com/xai-foundation/sentry/releases/latest/download/sentry-node-cli-linux.zip ``` Unzip the file: ```bash unzip sentry-node-cli-linux.zip ``` ### 2.5 Set Up a Screen [Screen](https://www.gnu.org/software/screen/manual/screen.html) will allow you to keep running the CLI even if you're disconnected or you log out from your server. Install screen: ```bash sudo apt update && sudo apt install screen ``` Start a screen session: ```bash screen -S xai ``` This will open a screen session, create a new window, and start a shell in that window. The first time you start a screen, you'll see a page of license information. You can press the `Space` bar to read the second page or `Enter` to return to the command prompt. To verify that you set up a Screen session, type `screen -ls` in a second terminal. You should see a message that looks as follows: ```bash There is a screen on: 82824.xai (12/09/2023 11:04:52 AM) (Attached) 1 Socket in /run/screen/@root. ``` ### 2.6 Start Xai CLI Now that you set up a Screen, you can start Xai CLI: ```bash ./sentry-node-cli-linux ``` ### 2.7 Boot the operator To receive node rewards, boot your operator: ```bash boot-operator ``` This will prompt you to enter the private key of your **sentry wallet** (a.k.a Operator). Paste the key and press `Enter`. You can get your **sentry wallet** private key by going to the XAI Desktop App and clicking on the 3 dots **[1]** next to your sentry wallet. You will then have the option to **Export** the sentry wallet private key **[2]** ![image](https://hackmd.io/_uploads/HyDjUR5_6.png) You will be asked if you want to use a **Whitelist** for the operator runtime. If you want to prevent others from utilizing your operator to pay the gas for operating their Keys, then enter "Y". Then hit `Enter`. (*It is strongly recommended to have a whitelist for the operator runtime.*) Use the Up & Down `arrow keys` on your keyboard to navigate to the wallet you want to add to the whitelist, then hit `Spacebar` to select that wallet. It is recommended that you only whitelist the wallet(s) containing Key(s). If you see any wallets you do not recognize, it is recommended that you do not select those wallets. Once you have selected your wallet(s) hit `Enter` Wait a few minutes until you see the following message: ``` The operator has finished booting. The operator is running successfully. esXAI will accrue every few days. Current timestamp: 2023-12-10T01:47:04.273Z. The operator is still running successfully. esXAI will accrue every few days. ``` ### 2.8 Detach from your Screen session You can detach from your current Screen session by **pressing**: - `ctrl a + d` (Windows) - `control a + d` (macOS) or ```bash screen -d <screen_id> ``` where `<screen_id>` is the numbers of your Screen session. Example: ``` screen -d 82824 ``` Make sure to **Detach** before exiting the server. Detached mode allows you to exit your Screen session without closing or interrupting any processes that are happening within that session. That means that everything will keep running in the background even if you log out from your VPS. You can now safely log out from your server: ```bash logout ``` ___________________________ ### 2.9 Show all Screen sessions To see all Screen sessions, type `screen -ls` . You should see a message that looks as follows: ```bash There is a screen on: 82824.xai (12/09/2023 11:04:52 AM) (Detached) 1 Socket in /run/screen/@root. ``` ### 2.10 Kill/Delete a Screen session If you have multiple Screen sessions, you can kill the one you don't need as follows: ```bash screen -XS <screen_id> quit ``` > Replace the following values: > -`<screen_id>` - the id of your current Screen session > -Example: `screen -xs 82824 quit` If you want to delete all running Screen sessions, you can use the following command: ``` Pkill screen ``` this will delete every screen session you where running. If you want to restart the node i recommend starting from step **2.5 Set Up a Screen** in this guide. ### 2.11 Reattach to your Screen session Anytime you want to see the logs from your node, you can reattach to that session as follows: ``` screen -r <screen_id> ``` where `<screen_id>` is the numbers of your Screen session. Example: ``` screen -r 82824 ``` Note, currently you can't see the rewards using the CLI. You need to install a desktop app for it. For more details refer to [this video](https://xai-foundation.gitbook.io/xai-network/xai-blockchain/sentry-node-purchase-and-setup/how-to-videos/command-line-interface-cli/track-accrued-esxai). ### 2.12 Updating your node Login to your server: Use the `ssh` command from your terminal: ```bash ssh $USER@$REMOTE_SERVER_IP ``` Reattach to your Screen session: ```bash screen -r <screen_id> ``` > Replace the following values: > -`<screen_id>` - the id of your current Screen session > -Example: `screen -r 82824` Stop the operator: - `ctrl + c` (Windows) - `control + c` (macOS) Remove your current CLI: ```bash rm sentry-node-cli-linux sentry-node-cli-linux.zip ``` Download the latest CLI: > You dont need to download the file on your computer since this command takes it from the github website ```bash curl -L -o sentry-node-cli-linux.zip https://github.com/xai-foundation/sentry/releases/latest/download/sentry-node-cli-linux.zip ``` Unzip the file: ```bash unzip sentry-node-cli-linux.zip ``` Start CLI: ```bash ./sentry-node-cli-linux ``` Boot operator: ```bash boot-operator ``` Paste the private key of your **Sentry Wallet** and press `Enter`. Wait until the operator has finished booting and you see the following message: ``` The operator has finished booting. The operator is running successfully. esXAI will accrue every few days. Health check complete, subscription to 'ChallengeSubmitted' is still active. ``` Detach from your Screen session: - `ctrl a + d` (Windows) - `control a + d` (macOS) Logout from your server: ```bash logout ``` **Note:** To KYC and view rewards, you need the desktop app, which is not covered in the CLI. Remember that the XAI Desktop App does not show your VPS Node status !!!! Following these steps will help you set up and maintain your Xai Sentry Node effectively. Remember to regularly check for updates and monitor your node's performance.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully