Running a node

In this guide you learn how to run a node in two methods

Running a node can be done for two purposes: relaying transactions and/or mining. For relaying transactions all you need to do is run the executable and you are good to go. If you want to mine then you need to set a username and password so that your miner is able to connect to it.

There are two ways to do this: set them in your config file or pass them in using parameters.

Method 1: config file

The advantage of this method is that you don't have to enter it anywhere. You can run your node and use the cli tools wihtout passing in the rpcuser and rpcpassword flags all the time.

Create the file ~/.factorn/factorn.conf if it does not exist. Add the following to it:

rpcuser=<Type a username of your choice>
rpcpassword=<Type in any password of your choosing>

That's it. You can start your node or use the cli tools and it will use that username and password automafically.

Method 2: Command line RPC flags

From the directory where you untar-ed your binaries from the release page do the following:

./factornd -rpcuser=<set your username here> -rpcpassword=<set your password here>

Your miner will need these to connect to your node and ask for the next block to mine. If you are mining locally your port are the standard ports: mainnet -> 8332 and testnet -> 18332. By default factornd runs on mainnet. To run testnet do:

./factornd -rpcuser=<set your username here> -rpcpassword=<set your password here> -testnet

You will need to know this ro run FACTOR.py from the mining code at https://github.com/FACT0RN/factoring.

Last updated