Demos Network Specifications
  • Introduction
    • What is Demos Network
    • Demos Network Architecture
  • FAQ
  • Cookbook
    • Project setup
      • Run the project (MacOS)
      • Run the project (Windows)
        • WSL 2 Setup on Windows (10 and 11 only)
        • Issue Troubleshooting
      • Run the project (Ubuntu)
  • SDK
    • Getting Started
    • WebSDK
      • Authentication
        • FIDO2 Passkeys
          • Under the Hood: FIDO2 Passkeys
      • NodeCalls
      • Transactions
        • Creating a transaction
        • Signing a transaction
        • Broadcasting a transaction
      • L2PS SDK
        • The l2ps module
        • Interacting with the L2PS
        • L2PS Messaging System
      • Instant Messaging
        • What is the Instant Messaging Protocol?
        • Architecture Overview
        • Encryption
        • Quickstart
        • Message Types
        • API Reference
        • FAQ
    • Cross Chain
      • General layout of the XM SDKs
      • EVM
      • BTC
      • Solana
      • MultiversX (EGLD)
      • NEAR
      • IBC
      • TON
      • XRPL
      • The XMScript
      • Identities
    • Demoswork
    • Cookbook
      • Demoswork
        • Creating work steps
        • Conditional Operation
        • Base Operation
        • Signing and broadcasting
      • Transactions
        • Crosschain Transaction
        • Native Transactions
      • SWAP
        • Crosschain SWAP
    • Web2
      • Quick Start
      • DAHR API Reference
        • Types
      • Making Requests
      • Identities
        • Twitter
        • GitHub
    • API Reference
    • Bridges
      • Rubic Bridge Test
    • Post Quantum Cryptography
  • Backend
    • Internal Mechanisms
      • Network Time Synchronization
      • Cross Context Identities
    • Global Change Registry
      • GCR Structure
      • How is GCR Synced?
    • Consensus Mechanism
      • Unparalleled Scalability
      • Decentralization in PoR-BFT
      • Enhanced Security
      • Comparative Advantage
      • Addressing Potential Criticisms
      • Conclusion
    • Communications Stack
    • L2PS (Subnet) Framework
      • How are L2PS transactions handled?
    • Miscellaneous
      • Browsing the Postgres DB via psql
    • Bridges
      • Rubic Bridge
    • Developers Testbed
      • Setting up the environment
      • Setting up the repository
      • Installing dependencies
      • Node Configuration
      • Running the node
  • Frontend
    • Demos Providers Discovery Mechanism
Powered by GitBook
On this page
  1. Cookbook
  2. Project setup

Run the project (Windows)

PreviousRun the project (MacOS)NextWSL 2 Setup on Windows (10 and 11 only)

Last updated 5 months ago

  1. Node version - 20.15.1

  2. Open the project with VS Code

  3. Create a .env file in the root directory (if it doesn't exist) and copy the env.example there.

CONSENSUS_TIME=10

RPC_FEE=5

SERVER_PORT=53550

EXPOSED_URL=http://127.0.0.1:53550

  1. Run the project to get the public and private keys (Note: It will be crushed, expected)

    1. Find the public key file in the root directory, copy the public key

    2. Create a file demos_peerlist.json in the root directory, and copy the demos_peerlist.json.example there and replace the “identity” with your public key.

  2. on your machine if you don’t have it installed.

  3. Open the Ubuntu terminal and run the following commands to install the dependencies

    1. Go to the project folder

      cd /mnt/c/Users/User/Desktop/node (example for Desktop)

    2. Check the node version by running the following command (should be 20.15.1)

      node -v

    3. Run the following commands

      1. sudo apt-get update

      2. sudo apt-get install dos2unix

      3. sudo apt install nodejs

      4. sudo apt install npm

      5. sudo npm install -g n

      6. chmod +x install

      7. sed -i 's/\r$//' ./install

      8. ./install

    4. If you encounter any issues, please check out the section.

  4. Run the project

    1. Again in the Ubuntu terminal, in the project directory run the sed -i 's/\r$//' ./run command

    2. Make sure the Docker Engine is running and you have enabled the WSL2

      1. Open the Docker Desktop

      2. Go to the Settings

      3. In the General section enable the WSL 2-based engine

      4. In the Settings menu, go to the Resources > WSL Integration section and enable the WSL 2 and Ubuntu

      5. After enabling WSL 2 and WSL integration, click Apply & Restart to restart the Docker Desktop and apply the changes.

      6. Run the docker --version command in the Ubuntu Terminal and check if all is set.

    3. Go to the postgres_5332 folder of the project by running cd postgres_5332/

    4. Run the sudo usermod -aG docker $USER command to add your user to the Docker group.

    5. Close and open a new WSL terminal window

    6. Go to the postgres folder again and run the command docker compose up

    7. Go back to the root directory by running cd ../ command

    8. Run the project ./run

Setup WSL2
Issue Troubleshooting