Skip to content
Advertisement

Can I use PeerJS without a PeerJS Server?

I am trying to make peer-to-peer browser apps with PeerJS, which is a wrapper for the browser technology WebRTC. I spent several hours reading documentation and googling, but I still have no clue what the PeerJS Server is doing. The documentation of WebRTC mentions STUN and – in certain cases – TURN servers to be required for WebRTC, but there is nothing about additional servers like PeerJS Server. And on the GitHub site of PeerJS Server there is no explanation. I want to have as little dependencies as possible, so I would rather not use a PeerJS Server. Is there a way to use PeerJS without it? Or do I have to work with raw WebRTC?

Advertisement

Answer

Yes, You Can. If You Don’t Host Your Own PeerJS Server, then your client will connect to PeerJS cloud. PeerJS cloud is a Server Hosted by PeerJS itself.

You can read it about here: https://peerjs.com/peerserver.html

Advertisement