PegaScape self-hosting

Arakon

Well-Known Member
OP
Member
Joined
Apr 24, 2008
Messages
445
Trophies
1
XP
1,034
Country
Gambia, The
I got my hands on an ipatched Switch that has FW 4.1.0 on it. Pegascape works great on it, but I don't like depending on an external server that may go down at any time.
I'd like to self-host on a PC or RPI. I found a docker image, but that instantly errors out, presumably because the github site it tries to access no longer exists.
Has anyone gotten this to work successfully? No matter what I try, I always get several pages of errors and the server won't start.
I'm thinking it's related to the versions used being several years old and the code not being compatible anymore.

Can anyone point me to a tutorial or have more info what is needed to get this working?
 

Arakon

Well-Known Member
OP
Member
Joined
Apr 24, 2008
Messages
445
Trophies
1
XP
1,034
Country
Gambia, The
Thank you, but that's obviously the first thing I checked, and with the info given there, it's not possible to get a server going (anymore?).
For example, it complains about browserify not being installed, which also fails to install when I try. Browserify is not mentioned anywhere on the github.
 

linuxares

The inadequate, autocratic beast!
Global Moderator
Joined
Aug 5, 2007
Messages
13,285
Trophies
2
XP
18,106
Country
Sweden
Ah found the issue

Do like this

npm i browserify

Let it install.

Then open package.json with like Notepad++ or such.
Remove:
"browserify": "^14.5.0",

Then try to do "npm install" again and it will skip browserify
 

Arakon

Well-Known Member
OP
Member
Joined
Apr 24, 2008
Messages
445
Trophies
1
XP
1,034
Country
Gambia, The
Update: Got it working.
Full tutorial for use i.e. with the latest raspberry OS Lite:

Code:
1) Install NVM and nodejs:

    sudo apt-get install nodejs
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
 
    You may need to log off/close putty and connect again for it to work. 
    I had to install nodejs first to get proper pathing setup.

2) Run nvm to install node 8.0 and npm:
 
    nvm install 8.0.0
    nvm use 8.0.0
 
3) Install python 2, as the server needs 2, not 3:
 
    sudo apt-get install python2
 
4) Install dependencies:
 
    npm i browserify
    npm i nan
 
5) Download the PegaScape repository
 
    sudo apt-get install git
    git clone https://github.com/noahc3/PegaScape.git

6) Install Pegascape:

    cd PegaScape
    npm install
 
If all goes well, you should then be able to run it with:

    sudo node start.js (add "--webapplet" when using via fakenews)
 

Note: If you try to run hblauncher and just get a white screen after selecting the album, you need to downgrade hbl.nsp by downloading i.e. https://github.com/switchbrew/nx-hbloader/releases/download/v2.0.0/hbl.nsp and putting it into the /atmosphere folder.
Post automatically merged:

Only thing I can't figure out is how to run it automatically on startup. When I set it up as a service, it launches without error, but the switch can't connect. Run it manually, all good.
 
Last edited by Arakon,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: good night