How To Run Utopian.io on Your Local Machine

Words
285
Reading
2 min
Listen
Play
9y

header.png

Run The Environment Locally

Find below all the information to properly run Utopian.io on your local machine if you wish to contribute to development of the project.

Run the frontend

Clone and Install

git clone https://github.com/utopian-io/utopian.io utopian.io

cd utopian.io

npm install

Generate and Export SSL Certificates

openssl req -x509 -sha512 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

export SERVER_SSL_CERT="/path/cert.pem"

export SERVER_SSL_KEY="/path/key.pem"

export NODE_TLS_REJECT_UNAUTHORIZED=0

Replace path with the path to the generated .pem files.
You may need to authorise your browser in using a self-signed SSL certificate

Run The Frontend

npm run dev-server

Run the backend

Run a MongoDB Instance

  • Create a database named utopian-io
  • Create the following collections:
  • a. users
  • b. moderators
  • c. posts
  • d. sessions
  • e. sponsors
  • f. projects
  • g. stats
  • h. faqs

Clone and Install

git clone https://github.com/utopian-io/api.utopian.io api.utopian.io

cd api.utopian.io

npm install

Create .env file

UTOPIAN_GITHUB_SECRET=GITHUB_SECRET_HERE
UTOPIAN_GITHUB_CLIENT_ID=GITHUB_CLIENT_ID_HERE
UTOPIAN_GITHUB_REDIRECT_URL=http://localhost:3000/github/callback
UTOPIAN_STEEMCONNECT_SECRET=STEEM_CONNECT_SECRET
MONGO_HOST=mongodb://localhost/utopian-io

You can generate a Steem Connect secret by creating an application on https://v2.steemconnect.com/apps/create.

Replace the Github values by creating a test app for your local environment.

Generate and Export SSL Certificates

export NODE_TLS_REJECT_UNAUTHORIZED=0

openssl req -x509 -sha512 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

export SERVER_SSL_CERT="/path/cert.pem"

export SERVER_SSL_KEY="/path/key.pem"

Replace path with the path to the generated .pem files.
You may need to authorise your browser in using a self-signed SSL certificate

Run The Backend

npm run build

npm run dev-server


Utopian Community-Driven Witness

We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.

Utopian.io is the first Community-Driven Witness. Every decision will be taken as per the consensus of the entire community using our public Discord server and soon via a public voting system.

mooncryption-utopian-witness-gif


Top Sponsors


@freedom - Vote Witness

@misterdelegation

@ned

@transisto

@wackou - Vote Witness

@xeldal - Vote Witness

@lafona-miner - Vote Witness

@cnts

@steempty - Vote Witness

@thecryptodrive - Vote Witness

Top Moderators


@ruah

@espoem

@knowledges

@arie.steem

@elear

@damla

@mcfarhat

@rosatravels

@omeratagun

@manishmike10
How To Run Utopian.io on Your Local Machine | Ecency