Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » How do you get a WSS server?
- Ancoder
-
1000+ posts
How do you get a WSS server?
what do you mean I gonna use it for scratch games
are you going to compile using turbowarp or htmlifier or something?
- god286
-
1000+ posts
How do you get a WSS server?
so you want to make a scratch cloud server? https://github.com/SheepTester/primitive-cloud-server can help you.
- SansStudios
-
1000+ posts
How do you get a WSS server?
If you want to make your own websocket server, you can use the websockets python module.
This does require knowledge of advanced python and python asyncio.
From the documentation:
This does require knowledge of advanced python and python asyncio.
From the documentation:
import asyncio import websockets async def echo(websocket): async for message in websocket: await websocket.send(message) async def main(): async with websockets.serve(echo, "localhost", 8765): await asyncio.Future() # run forever asyncio.run(main())
- Chiroyce
-
1000+ posts
How do you get a WSS server?
If you want to make your own websocket server, you can use the websockets python module.
So they probably need one that is compatible with the Scratch frontend, so what god286 said is the best idea I gonna use it for scratch games
https://github.com/SheepTester/primitive-cloud-server can help you.so you want to make a scratch cloud server?
Step 1 - Make an account on https://replit.com
Step 2 - Click this link and then wait for it to finish loading…
Step 3 - Click on the “.replit” file on the left side

Step 4 - Paste this onto the file
language = "nodejs"
run = "npm install; npm start"

Done!! Your server is now running! You can close the tab and it will still run, but if it is inactive for over an hour, it'll shut down the server, so you'll have to press run again, If you want it to run 24/7, use uptimerobot's free plan and set a pinger for this url
https://primitive-cloud-server.<YOUR-REPLIT-USERNAME>.repl.co
Your server's websocket URL will be
wss://primitive-cloud-server.<YOUR-REPLIT-USERNAME>.repl.co
also replace <YOUR-REPLIT-USERNAME> with your actual replit username
Last edited by Chiroyce (Jan. 8, 2022 06:07:45)
- SansStudios
-
1000+ posts
How do you get a WSS server?
If you want to make your own websocket server, you can use the websockets python module.So they probably need one that is compatible with the Scratch frontend, so what god286 said is the best idea I gonna use it for scratch gameshttps://github.com/SheepTester/primitive-cloud-server can help you.so you want to make a scratch cloud server?
OP never specified that they were hosting a version of scratch, only that they needed to “get” a websocket server. It's possible that they just want to get the already existing scratch websocket server, in which case, they could use ScratchConnect + Python.
Last edited by SansStudios (Jan. 8, 2022 22:12:52)
- The_Mad_Punter
-
100+ posts
How do you get a WSS server?
I'm just making a game, not hosting a Scratch version (like turbowarp).If you want to make your own websocket server, you can use the websockets python module.So they probably need one that is compatible with the Scratch frontend, so what god286 said is the best idea I gonna use it for scratch gameshttps://github.com/SheepTester/primitive-cloud-server can help you.so you want to make a scratch cloud server?
OP never specified that they were hosting a version of scratch, only that they needed to “get” a websocket server. It's possible that they just want to get the already existing scratch websocket server, in which case, they could use ScratchConnect + Python.
- The_Mad_Punter
-
100+ posts
How do you get a WSS server?
I do know Python, by the way. However, my RPi won't work. If you want to make your own websocket server, you can use the websockets python module.
This does require knowledge of advanced python and python asyncio.
From the documentation:import asyncio import websockets async def echo(websocket): async for message in websocket: await websocket.send(message) async def main(): async with websockets.serve(echo, "localhost", 8765): await asyncio.Future() # run forever asyncio.run(main())
- SansStudios
-
1000+ posts
How do you get a WSS server?
Do you want to make a game that connects to the scratch websocket server, or do you want to host your own websocket server?
Connecting to the scratch websocket server lets you do the following:
- Set/read cloud variables
- Make projects that interface with external api projects (like this one)
Hosting your own websocket server lets you:
- Have a two-way client-server connection that transfers data
Connecting to the scratch websocket server lets you do the following:
- Set/read cloud variables
- Make projects that interface with external api projects (like this one)
Hosting your own websocket server lets you:
- Have a two-way client-server connection that transfers data
- The_Mad_Punter
-
100+ posts
How do you get a WSS server?
I got a WSS server running on Replit (finally). Now it doens't even work. Used Jeffalo's code. And doesn't let me play Griffpatch Cloud Platformer on multiple tabs.
- unknownuser-k1390
-
12 posts
How do you get a WSS server?
If you want to make your own websocket server, you can use the WebSockets python module.So they probably need one that is compatible with the Scratch frontend, so what god286 said is the best idea I gonna use it for scratch gameshttps://github.com/SheepTester/primitive-cloud-server can help you.so you want to make a scratch cloud server?
Step 1 - Make an account on https://replit.com
Step 2 - Click this link and then wait for it to finish loading…
Step 3 - Click on the “.replit” file on the left side
Step 4 - Paste this onto the fileStep 5 - Press run, then wait for this to show uplanguage = "nodejs"
run = "npm install; npm start"
Done!! Your server is now running! You can close the tab and it will still run, but if it is inactive for over an hour, it'll shut down the server, so you'll have to press run again, If you want it to run 24/7, use uptimerobot's free plan and set a pinger for this URLhttps://primitive-cloud-server.<YOUR-REPLIT-USERNAME>.repl.co
Your server's websocket URL will bewss://primitive-cloud-server.<YOUR-REPLIT-USERNAME>.repl.co
also replace <YOUR-REPLIT-USERNAME> with your actual replit username
How I do test it? I tried using TurboWarp to package a project and test it but the server does not respond and Uptime Robot says it works normally. Does it need a valid project ID to work?
- WojtekGame
-
1000+ posts
How do you get a WSS server?
Don't necropost also thanks for bumping.If you want to make your own websocket server, you can use the WebSockets python module.So they probably need one that is compatible with the Scratch frontend, so what god286 said is the best idea I gonna use it for scratch gameshttps://github.com/SheepTester/primitive-cloud-server can help you.so you want to make a scratch cloud server?
Step 1 - Make an account on https://replit.com
Step 2 - Click this link and then wait for it to finish loading…
Step 3 - Click on the “.replit” file on the left side
Step 4 - Paste this onto the fileStep 5 - Press run, then wait for this to show uplanguage = "nodejs"
run = "npm install; npm start"
Done!! Your server is now running! You can close the tab and it will still run, but if it is inactive for over an hour, it'll shut down the server, so you'll have to press run again, If you want it to run 24/7, use uptimerobot's free plan and set a pinger for this URLhttps://primitive-cloud-server.<YOUR-REPLIT-USERNAME>.repl.co
Your server's websocket URL will bewss://primitive-cloud-server.<YOUR-REPLIT-USERNAME>.repl.co
also replace <YOUR-REPLIT-USERNAME> with your actual replit username
How I do test it? I tried using TurboWarp to package a project and test it but the server does not respond and Uptime Robot says it works normally. Does it need a valid project ID to work?
- unknownuser-k1390
-
12 posts
How do you get a WSS server?
Error: ENOENT: no such file or directory, stat ‘/home/runner/static/404.html’
How I do fix this?
How I do fix this?
- ScratchCatHELLO
-
1000+ posts
How do you get a WSS server?
Error: ENOENT: no such file or directory, stat ‘/home/runner/static/404.html’
How I do fix this?
it sounds to me like you asked the server for a page that didn’t exist, it tried to redirect you to the 404 page (page to tell users the page they tried to access doesn’t exist), but then the 404 page didn’t exist either.
- Discussion Forums
- » Advanced Topics
-
» How do you get a WSS server?