Skip to content

Setting up SJ2

Renato Dell'Osso edited this page Aug 24, 2023 · 1 revision

Setting up SJ2

DO NOT UPDATE PACKAGES!! USE THE VERSIONS WE’VE BEEN USING.

You should be seeing 20 vulnerabilities. If this is lower, something has gone wrong.

Steps:

  1. Create a new tmux session: tmux new-session -s sj2

  2. Run: sudo apt update

  3. Run:

    curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
    
    echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
    
    sudo apt-get update
    sudo apt-get install redis
    
    
  4. Run:

    redis-server --daemonize yes
    

    Check if the process started or not:

    ps aux | grep redis-server
    
  5. Run: sudo apt install nodejs

  6. Run: git clone https://github.com/codedecatur/Scout-Janssen-2.git

  7. Run: sudo apt install npm

  8. Navigate to Scout-Janssen-2/sj2

  9. Run: npm ci

  10. CD to ../jai/

  11. Run: npm ci

  12. Run: sudo npm install -g n

  13. Run: sudo npm cache clean -f

  14. Run: sudo n 18.13.0

  15. Transfer the .env file

  16. Run: sudo npm install semver

  17. Transfer the cert keys

  18. Update Cloudflare’s DNS settings

  19. Run sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/node to make it so that SJ2 can run things on port 443

  20. Add the server’s IP to list of allowed IPs in MongoDB Atlas (in Network Access)

  21. Run: git checkout bugfixes. (You might have to run git stash prior to this)

Clone this wiki locally