Presearch Docs
Presearch WebsiteNode SetupKeyword StakingSupport
  • Presearch Project
    • 🏠Welcome to Presearch 👋
    • 🪙Tokenomics
      • Contract Security
      • Liquidity Providing Uniswap
      • Liquidity Providing Aerodrome
    • 💰PRE Purchasing Options
      • How to Buy PRE Tokens in the United States Using USD: A Comprehensive Guide
      • Supported Exchanges
      • Buy with Credit Card
      • How to Swap PRE in Trust Wallet
      • How to Swap PRE in Metamask Wallet
      • How to buy PRE in AhoraCrypto.com
    • 🗺️Roadmap
    • 🛡️Web3 - Safety, Troubleshooting & Best practices
    • ❓General FAQ
      • Which blockchain do PRE Tokens operate on?
      • How many tokens can I buy?
      • When I buy tokens, how do I pay?
      • When will I receive my tokens?
      • What can I use my tokens for?
      • How to withdraw tokens from Presearch?
      • What Wallets accept PRE?
      • Referral Program
      • How can I help promoting Presearch?
      • How can I contact the support team?
      • Who do I contact for marketing / promotional offers?
      • Presearch vision paper
  • Presearch Engine
    • ⭐What is Presearch Engine?
    • ❓Presearch Engine FAQ
      • How to set Presearch as the Default Search Engine on Desktop
      • How to Set Presearch as Your Default Search Engine on the Chrome App in iOS
      • How to Set Presearch as Your Default Search Engine on the Chrome App in Android
      • Am I tracked when I use Presearch?
      • How to use the Maps
      • How to Change the Color of the Search Engine
      • How to use the Testnet/Presearch engine
      • Why are my reward tokens not increasing when I search?
      • What is 'Authentic Search'?
      • What is Rewards Verification?
      • How to use AI
      • How to Add New Search Providers to your Presearch Dashboard
      • How to Change Password
      • How to Update profile
    • 🔎MetaSearch
    • NSFW Spicy Mode
  • PreGPT AI
    • ⭐What is PreGPT 2.0?
    • 🤖How to use PreGPT 2.0
    • ❓PreGPT FAQ
      • General usage
      • Subscription
      • Service operation
      • AI model limitations
      • Roadmap & Improvements
      • Policy
  • Nodes
    • ⭐What is a Node?
      • Hardware and system requirements
    • ⚙️Node Setup Instructions
      • Generic installation instructions
      • Node Configuration Parameters
      • Individual Setup for various VPS providers
        • Running a node on FluxOS
          • Flux Node Grandfathering
        • Running a node on Akash
        • Running a node on ThreeFold
        • Running a Node on AWS
        • Running a Node on Racknerd
        • Running a node on Microsoft Azure
        • Running a node on Linux VPS
        • Running a node on Stack OS
      • Setup Nodes on Raspberry Pi
    • 🔧Troubleshooting and maintenance
      • Backing Up and Migrating Nodes
      • Alternative to Backing up nodes
      • Backup method with Docker Desktop for Windows
      • Backup method for Linux
    • 🎇Node Rewards
      • Node Reward Changes
    • 🔠API Access
    • 🫐Preberry
    • ❓Nodes FAQ
      • Can I already run a Presearch node?
      • Is Docker required to run a Presarch node?
      • Is there a node network explorer or some kind of overview page?
      • Will there be IPv6 support for Presearch nodes?
      • Can I run Presearch node besides Flux node?
      • IOS application to view node statistics
  • Keyword Staking
    • ⭐What is Keyword Staking?
    • 🤝Strategy for Staking PRE
    • 📦Ads Pricing - How much does it cost to advertise on Presearch?
    • ❓Keywords FAQ
      • How can I see keywords traffic?
      • How to report bogus/abusive ADs from Keyword staking?
  • Search Staking and Usage Rewards
    • ⭐What are Usage rewards?
      • How do PRE rewards work
      • How to claim search rewards
    • ❓Search Staking FAQ
      • How to use Search staking?
      • How to use the calculator for Search Stake
  • AD-FREE SEARCH FEATURE
    • How to use the Ad-Free Search Feature
  • Support
    • 🆘Presearch Support
    • 🗞️Presearch News
    • 📝Press Release
  • NFTs
    • 🛣️"The Road to Mainnet"
    • 💻Supported Wallets
  • Community
    • 🛠️Community Projects
    • 🧑‍🏫Community Tutorials
      • Intense Investor
      • Martin Valk
      • Your Friend Andy
      • Keith Laye
      • Passive Aggressive Income
      • Lefty Chris - How to Create a Presearch Node
      • Crypto Laymen
      • Modo Tech
      • Mechanic Joe
      • TheNodeCatcher
  • apps
    • 📱iOS
    • 🤖Android Browser
Powered by GitBook
On this page
  • Video Tutorial
  • Preface
  • Requirements
  • Installing an Ubuntu Server 20.04 LTS VM
  • Installing Docker on Ubuntu Server 20.04 LTS
  • Presearch Auto-updater
  • Presearch node

Was this helpful?

Edit on GitHub
  1. Nodes
  2. Node Setup Instructions
  3. Individual Setup for various VPS providers

Running a node on Microsoft Azure

How to run a Presearch Node on a Micrsoft Azure VPS

PreviousRunning a Node on RacknerdNextRunning a node on Linux VPS

Last updated 1 year ago

Was this helpful?

Video Tutorial

Preface

Below we document the steps to install an Ubuntu Server 20.04 LTS virtual machine on Microsoft Azure, add Docker Community Edition and finally the Presearch node.

Right now, for a node with 1000 PREs staked on the test-net, this is not a cost-effective solution; the running cost for a single node is around EUR 7 per month. This can be brought down slightly by going for an even smaller instance but that takes a performance hit on the below setup; as described we need a single core with more than just 512Mb RAM to function best

However, it does result in a machine with optimal Reliability score and we’re in it for the long term so gaining the maximum result in PRE’s per PRE staked seems the way forward.

Requirements

  • Active Azure subscription and at least $9 per node per month credit.

  • A basic understanding of Microsoft Azure.

Installing an Ubuntu Server 20.04 LTS VM

Azure lets you easily run any VM as part of their “Compute Resources”. This can be done programmatically, using ARM templates, or simply using the Azure Portal, as detailed below.

To create the Ubuntu Server platform for Docker and your Presearch node, follow these steps:

  • From the menu on your left, select “Virtual machines”. If this option is not available, simply type “Virtual machines” in the search box on top.

  • From the menu, choose “Add” and then “Virtual machine”.

The options in this first screen:

Subscription: Choose any active Azure subscription connected to your account.

Resource group: All the resources created for this VM (CPU, disks, virtual network,...) will be grouped under this Resource group, so it makes sense to use a separate resource group for each node since this helps when inspecting costs and performance per node.

Virtual machine name: Any name you like, as long as it is unique in your subscription.

Region: You can choose any region you want, this is the cloud. However, in this phase of the testnet all gateways are US based and from experience, nodes in US-West currently perform best.

Availability options: As there really is not much data to safeguard for your node and all disks in Azure offer at least some sort of redundancy, we choose “No infrastructure redundancy required” to save cost.

Image: Select “Ubuntu Server 20.04 LTS - Gen 1” as your base image.

Size: The cheapest size that still runs a Presearch node well is currently a “Standard_B1s”, offering 1 vcpu and 1Gb of RAM. You could theoretically select the “Standard_B1ms” which is even cheaper and offers a mere 512Mg of RAM but these did not perform as well for me, gaining a much lower Node Reliability score.

Note: the price you see calculated here is going to drop a little when we go for the cheaper hard-disks below.

Authentication type: Because at least during setup we will have to reach the VM’s console, we need SSH access to the machine. For any publicly addressable device on the internet we should always protect access with an SSH public key. This key will be auto-generated and we will retrieve it later.

Username: You can leave this default (azuser) or use any name you prefer.

SSH public key source: Generate a new pair, unless you have your own SSH key and prefer to use that.

Key pair name: will be auto generated; leave as-is or adjust to your preferred naming scheme.

Public inbound ports: Allow selected ports (when the node is running you can close port 22 if you wish, we will need it now to continue the setup.

Select inbound ports: this should be set to SSH (22).

  • Now, click “Next : Disks”, and change the default disk type to either Standard SSD or Standard HDD, the latter option being even cheaper and not impacting the node performance in this test-net phase.

Selecting a cheaper disk option

  • Click the “Management” tab, and ensure the checkbox “Enable auto shutdown” is unchecked, as per image below.

  • That’s it! Now, click “Review + create”. Your selected options are checked and if all is okay, the “Create” button will become active.

  • Click “Create”, and after a few seconds a pop-up will appear, offering you to download the generated keys. Click “Download private key and create resource” and a private key will be downloaded.

Note where you save this key and keep it secure! Anyone in possession of this private key can access your server.

Download the private key

The system will now be deployed and a progress screen will appear. When all resources have been deployed you will be presented with a screen as below.

Deployment is complete

  • Your Ubuntu Server is now running. To access it, click “Go to resource”.

  • From the Virtual Machine overview screen, select “Connect” and then “SSH” from the menu.

Connect via SSH

You are now shown instructions, as per image below. Note the username and IP address listed under point 4, and then use your preferred SSH client (such as Putty) to connect to the new virtual server.

From there, continue as with a standard Ubuntu VM below.

Installing Docker on Ubuntu Server 20.04 LTS

First, make sure your Ubuntu Server is up-to-date, and install supporting libraries needed for Docker.

sudo apt update && sudo apt upgrade -y
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y

Add the relevant Docker Community Edition repository, and refresh the repository cache.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update

Then, install Docker CE and add your user to the Docker group (replace [username] below with your Ubuntu username).

sudo apt-get install docker-ce docker-ce-cli containerd.io -y
sudo usermod -aG docker [username]

Now log-out and login again to ensure your default user has been added to the docker group.

You can test this by running Docker’s equivalent of hello-world (without prefixing sudo):

docker run hello-world

Your node registration code

Click on “Copy” to copy the code to your clipboard.

Presearch Auto-updater

Now, we install the presearch-node and an automatic updater. To ensure the presearch node always runs the latest image we are using the the Presearch Auto-updater image to check the presearch-node image every 900 seconds (15 minutes) for an updated version and if found, to automatically update it.

docker run -d --name presearch-auto-updater --restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock presearch/auto-updater --cleanup --interval 900 presearch-auto-updater presearch-node

Presearch node

And finally, we download, and then start a presearch-node container.

Execute the below in your terminal, making sure you replace [YOUR_REGISTRATION_CODE] with the code you picked up from your node-control panel.

  • [NODE_DESCRIPTION] with the descriptive name of your node

docker pull presearch/node

docker run -dt --name presearch-node --restart=unless-stopped -v presearch-node-storage:/app/node -e REGISTRATION_CODE=[YOUR_REGISTRATION_CODE] presearch/node

Since version 0.9.21, there are additional parameters you can enter at startup to pre-set some parameters for your node. These are:

  • DESCRIPTION : this will be the descriptive text for your node,

  • URL : to find out still, from the upcoming medium post ;-)

  • STAKE : to stake an amount of PRE from node startup.

This would make the full command something like:

docker run -dt --name presearch-node --restart=unless-stopped -v presearch-node-storage:/app/node -e REGISTRATION_CODE=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -e DESCRIPTION="My Favorite Node" -e URL="https://my-hosting-provider.com/my-node-admin-page" -e STAKE=10000 presearch/node

Check if things are running properly by typing in the following command:

docker logs -f presearch-node

If all works as planned, you should see something like the below. You can get back to the command prompt by pressing CTRL+C.

Once back at the command prompt, type EXIT to close your terminal session.

Thank you so much to our Presearch Community member Niels for putting this together for us.

Active and Node registration code.

Goto and log on with your Azure account. This account should have an active Azure subscription, and the rights to create the VM.

connect via SSH instructions

First, goto your and note down personal Node registration code. You will need this later to start the presearch-node container.

⚙️
Node-Dashboard
portal.azure.com
Node's dashboard page
Video description