Skip to content

install the swarm updater

Bamidele Oluwatobi edited this page Jan 23, 2024 · 5 revisions

cd sphinx-swarm

git pull origin master

install deps

sudo apt install nodejs

sudo apt install npm

sudo npm install pm2 -g

create the pm2 ecosystem file:

vi ecosystem.config.js

module.exports = {
  apps: [
    {
      name: "restarter",
      script: "./restarter.js",
      env: {
        SECOND_BRAIN: "true", // or not
        PASSWORD: "-",
      },
    },
  ],
};

start the server

pm2 start ecosystem.config.js

View logs

pm2 logs 0 sometimes it might not be 0 use pm2 list to find the process id number the restarter server is running on

Update Swarm environment variable with restarter password

vi .env

SWARM_UPDATER_PASSWORD=-

restart swarm

./restart-second-brain.sh