how to run the Frontrunning Bot on a remote server

Running on a Remote Server

If you prefer to run the FastlyBot Frontrunning Bot on a remote server for increased reliability and 24/7 operation, follow these steps:

  1. Choose a Remote Server:

    • Select a cloud service provider such as AWS, Google Cloud, or DigitalOcean to host your server.
  2. Set Up the Server:

    • Install Node.js version 18 or later on your remote server. You can follow the official Node.js installation instructions for your server's operating system or you can follow thes steps for Installing Node.js with Apt Using a NodeSource PPA on ubuntu.
    cd ~
    curl -sL https://deb.nodesource.com/setup_20.x -o /tmp/nodesource_setup.sh
    
    • Inspect the contents of the downloaded script with nano or your preferred text editor:
    nano /tmp/nodesource_setup.sh
    

    When you are satisfied that the script is safe to run, exit your editor. Then run the script with sudo:

    sudo js /tmp/nodesource_setup.sh
    

    The PPA will be added to your configuration and your local package cache will be updated automatically. You can now install the Node.js package by:

    sudo apt install nodejs
    

    Verify that you’ve installed the new version by running node with the -v version flag:

    node -v
    
    Output
    v20.19.0
    
  3. Transfer the Folder to the Server:

    • Use an FTP client (e.g., FileZilla) to connect to your remote server.
    • Upload the zipped folder that you downloaded from Fastlybot Dashboard to a directory on your server.
  4. Unzip the Folder on the Server:

    • Access your server through SSH.

    • Navigate to the directory where you uploaded the zipped folder.

    • Unzip the folder using the following command:

      unzip premium-frontrunningbot.zip
      
  5. Configure Environment Variables:

    • Navigate to the unzipped FastlyBot Frontrunning Bot directory on your server.
    • Copy the content of your local configuration file to the env.js file on the server.
    • Update the configurations, including the private key and WebSocket provider link, with the relevant information for the server.
  6. Install Dependencies:

    • Run the following command to install the necessary dependencies:

      npm install
      
  7. Start the Bot:

    • Initiate the bot with the following command:

      npm start
      
    • Your Frontrunning Bot is now running on your remote server, actively monitoring and front running transactions.

  8. Monitor Logs (Optional):

  • If you want to run it in the background 24/7 and monitor logs for debugging or analysis, you can use tools like pm2 to manage the bot process and view logs.

    npm install -g pm2
    pm2 start index.js --name fastlybot-frontrun
    pm2 logs fastlybot-frontrun
    

Now, your Frontrunning Bot is operational on a remote server, providing you with the flexibility to engage in crypto markets without the need for continuous local monitoring. Ensure that your server is secure, and only authorized individuals have access to the configuration files and private keys. Happy trading!