How to setup a Q Fullnode
Setup your Server
You must prepare your server / machine to begin. One possibility is to use a local machine, alternatively you can use a cloud instance on AWS for example. There is a good external tutorial on how to get started with Ethereum on AWS. You can use this tutorial as a basic reference.
Get basic Configuration
Clone the repository and go to the /fullnode
directory
Linux
If you use Graphical User Interface(GUI), open terminal
- Press
CTRL + ALT + T
to open the terminal - Or open Show Application in the Dash Bar & find out Terminal Application.
- Go to the directory where you want to push the repository:
cd "YOUR_DIRECTORY"
You can print your current working directory with:
pwd
- Clone the repository
git clone https://gitlab.com/q-dev/mainnet-public-tools
- Go to the
/fullnode
directory
cd "mainnet-public-tools/fullnode"
Windows (if you don't have git installed)
Open PowerShell
- Press
Windows+R
to open the "Run" tool - Type "powershell" and press Enter to open terminal
- Go to the directory where you want to push the repository:
cd "YOUR_DISK:\YOUR_DIRECTORY"
If you work with cmd instead of PowerShell, use command:
cd /d "YOUR_DISK:\YOUR_DIRECTORY"
Replace YOUR_DISK and YOUR_DIRECTORY with real names.
You can print the current working directory and its contents using the command:
dir
- Clone the repository:
# Download the contents of the Git repository
Invoke-WebRequest -Uri https://gitlab.com/q-dev/mainnet-public-tools/-/archive/master/mainnet-public-tools-master.zip -OutFile mainnet-public-tools-master.zip
# Extract the contents of the ZIP file
Expand-Archive -Path mainnet-public-tools-master.zip -DestinationPath .
# Remove the ZIP file
Remove-Item -Path mainnet-public-tools-master.zip
- Go to the
/fullnode
directory
cd "mainnet-public-tools\fullnode"
MacOS
- Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal.
- In the Finder, open the /Applications/Utilities folder, then double-click Terminal.
- Go to the directory where you want to push the repository:
cd "YOUR_DIRECTORY"
You can print your current working directory with:
pwd
- Clone the repository
git clone https://gitlab.com/q-dev/mainnet-public-tools
- Go to the
/fullnode
directory
cd "mainnet-public-tools/fullnode"
This directory contains the docker-compose.yaml
file for quick launching of the full node with preconfigurations on rpc, blockchain explorer using .env
file (which can be created from .env.example
file).
Configure Ports
Choose ports (or leave default values) for node rpc api and blockchain explorer by copying .env.example
to .env
and editing the file.
Linux, macOS, other Unix-like systems
cp .env.example .env
nano .env
After editing the ports, save the changes in nano:
- Press
Ctrl+O
to save changes - Press
Ctrl+X
to exit
Windows
# This will copy the .env.example file to a new file named .env.
copy ".\env.example" ".\env"
#This will open the .env file in Notepad for editing. If you prefer to use a different text editor, replace notepad.exe with the appropriate command for your editor.
notepad.exe .\env
Save changes with Ctrl+S
and close notepad.
Replace existing ports.
# the port you want to use for p2p communication (default is 30314)
EXT_PORT=30314
# the port you want to use for explorer (default is 8081)
EXPLORER_PORT=8081
Launch Node
Launch the node by executing the following command from /fullnode
directory:
docker-compose up -d
Verify your Installation
After node is launched, it starts syncing with network.
The setup includes a local blockchain explorer. You can browse blocks, transactions and accounts via your browser by opening the url http://localhost:PORT
where PORT
is the number you chose above for EXPLORER_PORT, e.g. http://localhost:8080
You can check your nodes real-time logs with the following command:
docker-compose logs -f --tail "100"
Find additional peers
In case your client can't connect with the default configuration, we recommend that you add an additional flag referring to one of our additional peers ($BOOTNODE1_ADDR
, $BOOTNODE2_ADDR
or $BOOTNODE3_ADDR
) within docker-compose.yaml
file:
fullnode:
image: $QCLIENT_IMAGE
entrypoint: ["geth", "--bootnodes=$BOOTNODE1_ADDR,$BOOTNODE2_ADDR,$BOOTNODE3_ADDR", "--datadir=/data", ...]
Updating Q-Client & Docker Images
To upgrade the node follow the instructions Upgrade Node