Building Pagascape from source to running Self Hosted mode.

Has been reports of the public PegaScape site suffering crashes and been offline, so I decided to create a Step by step tutorial about building the Pegascape Source and running it on Self Hosted mode.

If you need to run pegascape on a Ubuntu Machine, open a Terminal window and run the commands:

you need Python 2 on the system, so installed python2 and created an alias to python

Bash:
sudo apt update
sudo apt install python2
alias python=/usr/bin/python2

Using the recommendation of @xradeon , installed the node and npm, 9.11.2 & 5.6.0 versions respectively (https://gbatemp.net/threads/pegascape-alternative.650182/post-10372685)

You need some base packages installed, curl to download the specific NPM version script, git to clone the repo, make and g++ to build the source
Bash:
sudo apt install curl git make g++

In order to use a specific NPM version, I followed the instructions on https://stackoverflow.com/questions...l-a-specific-version-of-node-on-ubuntu-debian (Answer 56):
Bash:
cd ~
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.nvm/nvm.sh
nvm install 9.11.2
node --version
npm --version


As instructed by the README.MD on the original repo: https://github.com/noahc3/PegaScape#self-hosting
after install NodeJS & NPM, executed the next commands to clone the repo and build using NPM:
Bash:
cd ~
git clone https://www.github.com/noahc3/PegaScape
cd ~/PegaScape/
npm install

on my system systemd-resolved was running so I had to stop it to be able to run integrated DNS
Bash:
sudo systemctl stop systemd-resolved

As we are using a specific version of NPN which is installed for the user not system wide, if you use the command sudo node you get the "command not found" error
1710276002266.png

so you need to execute it with full path:
Bash:
sudo /home/impeeza/.nvm/versions/node/v9.11.2/bin/node start.js --webapplet

Now the PegaScape server is running self hosted
1710276011922.png


To close the PegaScape site, you type .exit and press [ENTER]

Tested on a 4.1.0 console and works fine.

If you want to use caffeine is recommended to leave out the parameter --webapplet since that one is for fake news and might cause the problem using caffeine.

Remember there are another parameters to start.js:
--webapplet: To enable fake internet, allowing the Switch to pass the connection test and load things like Fake News.
--ip <html_server_ip_override> if the detected IP address for the HTML server is not preffered.
--host <dns_server_ip_override> if the detected IP address for the DNS server is not preffered.
--disable-dns if you want to disable the internal DNS server and use something else (dnsmasq, bind, etc).
 

Attachments

  • 1710275505480.png
    1710275505480.png
    19.2 KB · Views: 17
Last edited by impeeza,

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,809
Trophies
2
Age
48
Location
Japan
XP
3,715
Country
United States
Did you check the IP address on the host computer (the computer that on which the VM is running) ?
If so try from another computer/ your phone. It can be a VM network issue (e.g your VM is set up to communicate only to the host or on local NAT)
ummm...
I put the DNS IP in the PC's browser bar and it opens the pegascape exploit.
I'd call that a yes... Other than if it's a VM, it can generally communicate with the host but not necessarily other appliances on the network...


It could be the way your router is setup. Is your Switch's IP address in the same subnet, when it's connected to the wifi? Is there a Gateway address, and is that address the IP of your router (in this case, if you have a gateway set at all, you want it to be the linux host IP, not the router... perhaps...)? Are you connecting more than one router in your house with a cable going from a LAN port on one to a WAN port on the other (which is wrong... if you want your devices to talk to each other while connected to separate access points)?

Are you using a Linux VM? If you are, and using NAT in your network settings, I suggest you try bridged. Your VM's IP should end up in the same subnet as everything else that connects to your wifi (likely starting with 192.168, instead of 172.21... does your PC have an IP starting with 172?)
 
Last edited by urherenow,

MrZizou325i

Member
Newcomer
Joined
Mar 17, 2024
Messages
9
Trophies
0
Age
38
XP
14
Country
Spain
ummm...

I'd call that a yes... Other than if it's a VM, it can generally communicate with the host but not necessarily other appliances on the network...


It could be the way your router is setup. Is your Switch's IP address in the same subnet, when it's connected to the wifi? Is there a Gateway address, and is that address the IP of your router (in this case, if you have a gateway set at all, you want it to be the linux host IP, not the router... perhaps...)? Are you connecting more than one router in your house with a cable going from a LAN port on one to a WAN port on the other (which is wrong... if you want your devices to talk to each other while connected to separate access points)?

Are you using a Linux VM? If you are, and using NAT in your network settings, I suggest you try bridged. Your VM's IP should end up in the same subnet as everything else that connects to your wifi (likely starting with 192.168, instead of 172.21... does your PC have an IP starting with 172?)
I do not know what else to do. I'm going crazy.....
I only have one router. I hope that later there will be a solution within my reach, for now my son will have to wait... Thank you for your help. Greetings
 

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,809
Trophies
2
Age
48
Location
Japan
XP
3,715
Country
United States
I do not know what else to do. I'm going crazy.....
I only have one router. I hope that later there will be a solution within my reach, for now my son will have to wait... Thank you for your help. Greetings
Well, you could start by actually answering questions from people that are trying to help you.

Are you using a VM?
Check the IP address of your phone, connected to your wifi... does it's IP address start with 172.21...?
Can you ping the ip of your phone from within linux?
If you are using a VM, have you set the network settings to BRIDGED?

I need to establish that your network environment is correct and working, before trying to find out if something is configured wrong on the Switch...
 

MrZizou325i

Member
Newcomer
Joined
Mar 17, 2024
Messages
9
Trophies
0
Age
38
XP
14
Country
Spain
Well, you could start by actually answering questions from people that are trying to help you.

Are you using a VM?
Check the IP address of your phone, connected to your wifi... does it's IP address start with 172.21...?
Can you ping the ip of your phone from within linux?
If you are using a VM, have you set the network settings to BRIDGED?

I need to establish that your network environment is correct and working, before trying to find out if something is configured wrong on the Switch...
Sorry. I use Ubuntu install Linux on Windows. The IP of my devices connected to the Wi-Fi network start at 192.168..... I don't know what you mean by pinging my phone's IP in Linux. I have not configured the network in Bridge... Thank you for your help and your patience 😅
 

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,809
Trophies
2
Age
48
Location
Japan
XP
3,715
Country
United States
Sorry. I use Ubuntu install Linux on Windows. The IP of my devices connected to the Wi-Fi network start at 192.168..... I don't know what you mean by pinging my phone's IP in Linux. I have not configured the network in Bridge... Thank you for your help and your patience 😅
This is why your setup isn't working. I'm not very familiar with networking in WSL (which is what you're using). A quick Google says that in Windows 10, you can go to the registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss. The 2 important entries here are
NatGatewayIpAddress, which should be your router's IP (192.68.0.1 usually, or sometimes 192.168.50.1 for newer ASUS routers)
and
NatNetwork, which should be 192.168.0.0/24 or 192.168.50.0/24 (depending on your local network setup). After changing this to be correct, running node start.js should say it's responding with 192.168.xx.xxx... which would be what you want to use as your DNS on the Switch.

Honestly, it might be easier to download VMWare Player (it's free), and create a Ubuntu VM, with a Bridged network. I don't bother with WSL anymore, so I can't give very precise instructions beyond what I'm Googling with the information you provide.
 

MrZizou325i

Member
Newcomer
Joined
Mar 17, 2024
Messages
9
Trophies
0
Age
38
XP
14
Country
Spain
This is why your setup isn't working. I'm not very familiar with networking in WSL (which is what you're using). A quick Google says that in Windows 10, you can go to the registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss. The 2 important entries here are
NatGatewayIpAddress, which should be your router's IP (192.68.0.1 usually, or sometimes 192.168.50.1 for newer ASUS routers)
and
NatNetwork, which should be 192.168.0.0/24 or 192.168.50.0/24 (depending on your local network setup). After changing this to be correct, running node start.js should say it's responding with 192.168.xx.xxx... which would be what you want to use as your DNS on the Switch.

Honestly, it might be easier to download VMWare Player (it's free), and create a Ubuntu VM, with a Bridged network. I don't bother with WSL anymore, so I can't give very precise instructions beyond what I'm Googling with the information you provide.
Friend, thank you very much. I followed your advice and created a VM with VMWare.... and I was finally able to access the exploit in my console. I appreciate your help. Greetings
 
  • Like
Reactions: urherenow

Skullink120

New Member
Newbie
Joined
Mar 30, 2024
Messages
2
Trophies
0
Age
31
XP
9
Country
Brazil
HELP: Guys, I have a question. In this tutorial it says that it is not necessary to use " --webapplet " for those who use Caffeine (I used it before when the site was working) If I use Caffeine do I have to leave it without anything, or is it mandatory to put some parameter? I already have Pegaswitch installed on NAND. I apologize if some words are wrong or out of order, I'm not very fluent in English and I use Google Translate
 

gtzfreddy

New Member
Newbie
Joined
May 11, 2021
Messages
2
Trophies
0
Age
35
XP
36
Country
Colombia
I follow all the steps in this guide and I manage to create the DNS server correctly but I cannot access the IP it generates from an external device, I tried from WSL and from Virtualbox with the bridge adapter
 

veesonic

Member
Newcomer
Joined
Aug 18, 2019
Messages
20
Trophies
0
Age
44
XP
474
Country
United States
I'm somewhat tech savvy but I get pretty lost when doing anything command prompt, terminal, or linux related. I was able to follow this tutorial and get Pegascape Self Hosting working on Windows 10. I made some adjustments on what I needed to get it working, you can follow the original post and refer to my reply to see my adjustments. B-)

https://gbatemp.net/threads/pegascape-self-hosting-in-windows-10.652216/post-10392861
 

half-turok

Well-Known Member
Member
Joined
Apr 22, 2015
Messages
102
Trophies
0
Age
39
XP
800
Country
Mexico
Can I use this tutorial for Arch Linux? My PC hat Arch Linux and some commands are different like other Linux versions.

I like to try this tutorial, but I want to now if work on my Linux.
 

Bumblecito

Well-Known Member
Member
Joined
May 25, 2017
Messages
110
Trophies
0
Age
38
XP
411
Country
Mexico
Could anybody port this to docker-compose please, or any other way to make it work on dsm 7.2 (synology nas)?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Quincy @ Quincy:
    Usually when such a big title leaks the Temp will be the first to report about it (going off of historical reports here, Pokemon SV being the latest one I can recall seeing pop up here)
  • K3Nv2 @ K3Nv2:
    I still like how a freaking mp3 file hacks webos all that security defeated by text yet again
  • BigOnYa @ BigOnYa:
    They have simulators for everything nowdays, cray cray. How about a sim that shows you playing the Switch.
  • K3Nv2 @ K3Nv2:
    That's called yuzu
    +1
  • BigOnYa @ BigOnYa:
    I want a 120hz 4k tv but crazy how more expensive the 120hz over the 60hz are. Or even more crazy is the price of 8k's.
  • K3Nv2 @ K3Nv2:
    No real point since movies are 30fps
  • BigOnYa @ BigOnYa:
    Not a big movie buff, more of a gamer tbh. And Series X is 120hz 8k ready, but yea only 120hz 4k games out right now, but thinking of in the future.
  • K3Nv2 @ K3Nv2:
    Mostly why you never see TV manufacturers going post 60hz
  • BigOnYa @ BigOnYa:
    I only watch tv when i goto bed, it puts me to sleep, and I have a nas drive filled w my fav shows so i can watch them in order, commercial free. I usually watch Married w Children, or South Park
  • K3Nv2 @ K3Nv2:
    Stremio ruined my need for nas
  • BigOnYa @ BigOnYa:
    I stream from Nas to firestick, one on every tv, and use Kodi. I'm happy w it, plays everything. (I pirate/torrent shows/movies on pc, and put on nas)
  • K3Nv2 @ K3Nv2:
    Kodi repost are still pretty popular
  • BigOnYa @ BigOnYa:
    What the hell is Kodi reposts? what do you mean, or "Wut?" -xdqwerty
  • K3Nv2 @ K3Nv2:
    Google them basically web crawlers to movie sites
  • BigOnYa @ BigOnYa:
    oh you mean the 3rd party apps on Kodi, yea i know what you mean, yea there are still a few cool ones, in fact watched the new planet of the apes movie other night w wifey thru one, was good pic surprisingly, not a cam
  • BigOnYa @ BigOnYa:
    Damn, only $2.06 and free shipping. Gotta cost more for them to ship than $2.06
    +1
  • BigOnYa @ BigOnYa:
    I got my Dad a firestick for Xmas and showed him those 3rd party sites on Kodi, he loves it, all he watches anymore. He said he has got 3 letters from AT&T already about pirating, but he says f them, let them shut my internet off (He wants out of his AT&T contract anyways)
  • K3Nv2 @ K3Nv2:
    That's where stremio comes to play never got a letter about it
  • BigOnYa @ BigOnYa:
    I just use a VPN, even give him my login and password so can use it also, and he refuses, he's funny.
  • BigOnYa @ BigOnYa:
    I had to find and get him an old style flip phone even without text, cause thats what he wanted. No text, no internet, only phone calls. Old, old school.
  • Psionic Roshambo @ Psionic Roshambo:
    @BigOnYa, Lol I bought a new USB card reader thing on AliExpress last month for I think like 87 cents. Free shipping from China... It arrived it works and honestly I don't understand how it was so cheap.
    Psionic Roshambo @ Psionic Roshambo: @BigOnYa, Lol I bought a new USB card reader thing on AliExpress last month for I think like 87...