[OUTDATED] - How to setup Unchained node (full) testnet - Centos 7 and MongoDB local

This assumes you just installed Centos 7 and nothing else is installed apart from minimal software.

I didn’t cover the security hardening step as it’s the same as outlined on the github quick start. I’ll probably come back and fix all the formatting and explain the hardening steps after Christmas when I have some more time.

1) Add create the repository entry for mongodb:
vi /etc/yum.repos.d/mongodb-org-7.0.repo
nano -w /etc/yum.repos.d/mongodb-org-7.0.repo
Contents of the file:

name=MongoDB Repository

2) Udpate packages now u have added shit to the repos:
yum update
3) install mongodb now u have it in the repos:
sudo yum install -y mongodb-org
4) install shit required for nodejs:
yum install -y gcc-c++ make - Installs c++ compiler and make
5) install node:

curl -sL https://rpm.nodesource.com/setup_18.x | sudo -E bash - 
sudo yum install https://rpm.nodesource.com/pub_16.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y
sudo yum install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1

6) check node is installed
node -v
7) enable mongodb on boot:

systemctl status mongod
systemctl enable mongod
systemctl start mongod

8) log into mongodb:

9) Create the DB that kenshi will use:
use unchained;
10) Insert a blank collection called ‘products’ to create the database.
db.products.insert( { item: "card", qty: 15 } )

11) quit mongodb shell:

12) Update your database config settings. Specifically the URL and name of the DB.

  url: mongodb://localhost/?retryWrites=true&w=majority 
  name: unchained

Full config looks like this (minus my sekrit key because NO):

log: info
name: SomeName
lite: false
gossip: 24
    - https://ethereum.publicnode.com
    - https://eth.llamarpc.com
    - wss://ethereum.publicnode.com
    - https://eth.rpc.blxrbdn.com
  url: mongodb://localhost/?retryWrites=true&w=majority 
  name: unchained
  max: 512
  parallel: 16

At this stage you can start your node and check that it connects to the DB. If so, you’ll now want to create a user acc to run connect to unchained DB.

Here: https://www.mongodb.com/docs/manual/tutorial/enable-authentication/
Here: https://www.mongodb.com/docs/manual/tutorial/create-users/#configure-users-for-self-hosted-deployments


Excellent guide fren

1 Like

This tutorial is outdated and therefore archived.