Installation f(x)Core
This guide will explain how to install the fxcored entrypoint onto your system. With these installed on a server, you can participate in the mainnet as either a Full Node or a Validator.
Additionally, you may refer to this YouTube tutorial video to set up your validator.

Hardware Requirements

We recommend the following for running f(x)Core:
  • 2 or more CPU cores
  • At least 500G of disk storage
  • At least 4G of memory
  • At least 10mbps network bandwidth
To see a quick cloud setup on how to setup and deploy it on the cloud.

Install build requirements

Install make and gcc.
On Ubuntu this can be done with the following commands:
Ubuntu
Mac
Windows
1
sudo apt-get update
Copied!
1
sudo apt-get install -y make gcc
Copied!
Ps: sudo apt-get install -y make gcc may have encountered a problem with locked files, just try sudo apt-get install -y make gcc again.
Ensure you have Homebrew installed.
Once you have Homebrew installed, you may run the following commands to install make :
1
brew install make
Copied!
and gcc:
1
brew install gcc
Copied!
We'll be needing these commands later so let's install the necessary packages:
1
brew install git
Copied!
1
brew install wget
Copied!
Ensure you have make and gcc installed and that the paths are set correctly for git bash.
One option for installing gcc can be found here.
You may select tdm64-gcc-10.3.0-2
Restart gitbash after installing
One option for installing make is using chocolate , more information can be found here.
Once you have chocolate installed, run this command:
make sure to run gitbash as administrator mode if the following commands do not work
1
choco install make
Copied!
Ensure you have all the necessary dependencies and compilers.
1
gcc --version
Copied!
will return:
1
gcc.exe (tdm64-1) 10.3.0
2
Copyright (C) 2020 Free Software Foundation, Inc.
3
This is free software; see the source for copying conditions. There is NO
4
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
Copied!
and for make:
1
make --version
Copied!
will return:
1
GNU Make 4.3
2
Built for Windows32
3
Copyright (C) 1988-2020 Free Software Foundation, Inc.
4
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
5
This is free software: you are free to change and redistribute it.
6
There is NO WARRANTY, to the extent permitted by law.
Copied!

Install Go

All other environments
If you are remoting into a terminal
Install go by following the official docs. Please select your respective environment❗
For Ubuntu environment, there may be permissions denied issues with unzipping the go zip file, try using sudo su to resolve it.
Especially if you are remoting into a Ubuntu terminal, run this command to download the go installer:
1
wget https://dl.google.com/go/go1.18.2.linux-amd64.tar.gz
Copied!
After you have downloaded the package and you may proceed to step 2 of the official docs. Choose your system OS and follow the instructions stated.
Go 1.16+ or later is required for the f(x)Core. If you are remoting into a terminal, you may input the following command:
Setting environment variables:
1
mkdir -p $HOME/go/bin
2
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.profile
3
echo "export PATH=$PATH:$(go env GOPATH)/bin" >> ~/.profile
4
source ~/.profile
Copied!

Install the binaries

Next, let's install the latest version of f(x)Core. Make sure you have git installed if not you will be prompted to install git. Follow the instruction in the terminal.
All Other Environments
Windows
1
git clone https://github.com/functionx/fx-core.git
Copied!
1
cd fx-core
Copied!
You should run your commands in gitbash. But open fxcored.exe file using cmd prompt
Make sure the name of your folder does not have whitespaces!
1
git clone https://github.com/functionx/fx-core.git
Copied!
1
cd fx-core
Copied!
1
make go.sum
Copied!
All Other Environments (Mainnet)
All Other Environments (Testnet)
Windows (Mainnet)
Windows (Testnet)
1
make go.sum
Copied!
1
make install
Copied!
1
git checkout testnet-evm
Copied!
1
make go.sum
Copied!
1
make install-testnet
Copied!
1
make go.sum
Copied!
1
make build-win
Copied!
use cmd prompt to open the fxcored.exe file
in the path ./build/bin/fxcored.exe
1
git checkout testnet-evm
Copied!
1
make go.sum
Copied!
1
make build-win network=testest
Copied!
use cmd prompt to open the fxcored.exe file
in the path ./build/bin/fxcored.exe
That will install the fxcored binary. Verify network:
1
fxcored network
Copied!
The output should look something similar to this:
1
ChainId: dhobyghaut
2
CrossChainSupportBscBlock: "1"
3
CrossChainSupportPolygonBlock: "1"
4
CrossChainSupportTronBlock: "1"
5
EIP155ChainID: "90001"
6
EvmSupportBlock: "408000"
7
GravityPruneValsetsAndAttestationBlock: "1"
8
GravityValsetSlashBlock: "1"
9
Network: testnet
Copied!
for Mainnet the ChainId should be fxcore
Verify version:
1
fxcored version --long
Copied!
or:
1
fxcored version
Copied!
fxcored version --long should output something similar to:
1
name: fxcore
2
server_name: fxcored
3
version: master-9b5596f54b9cadc001725a431fdfe22768c6e4c9
4
commit: 9b5596f54b9cadc001725a431fdfe22768c6e4c9
5
build_tags: netgo,ledger
6
go: go version go1.17.7 darwin/amd64
7
...
Copied!

Build Tags

Build tags indicate special features that have been enabled in the binary.
Build Tag
Description
netgo
Name resolution will use pure Go code
ledger
Ledger devices are supported (hardware wallets)