Ask coding questions

← Back to all posts
How to use sockets with repl?

How do I make it so I can put my python chatroom server on replit and access it from my client script on my network?

Answered by KeaganLandfried [earned 5 cycles]
View Answer

I would suggest reading the docs at
Or by following a tutorial like this one...

Please mark this as the answer if I answered your question :)



please do not add that at the end of your answer

Asking for cycles gets you nowhere and will most likely not get your answer accepted. Just post the answer, and if they find it helpful, they will check it as correct.

Also, since repl is a virtual linux machine, it does not have any sort of native support for host/client type applications, which is why most chat-based applications are written with websockets using flask or django(or good ol' javascript).


I'll add it on the end of my answer if I want, thanks m8
I've seen work in before, although I haven't done it personally. Just the other day I was using one native on replit. But again another approach may be easier.


I've always had trouble working with sockets on repl.

In fact, I do not think it is possible unless you use the flask module. Perhaps you could create a web-based chat application. If I do remember correctly, flask supports websockets.

You can find more information here