Need help with wsify?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

454 Stars 36 Forks MIT License 44 Commits 4 Opened issues


Just a tiny, simple and real-time self-hosted pub/sub messaging service

Services available


Need anything else?

Contributors list

Websocketify (wsify) v2.0 StackShare

Just a tiny, simple and realtime pub/sub messaging service

Quick Demo


I wanted to create a tiny solution that can replace

and similar services and learning more about the realtime world, so I dispatched this project.


  • No dependencies, just a single binary !
  • Light and Tiny.
  • Event-Driven Design
  • A client can listen on any resource.
  • You control whether a client is allowed to
    using any programming language !.
  • A client defines itself using
    via the url query param i.e
  • Send messages to only certain users.


  • Docker ? >
    docker run --network host alash3al/wsify -listen :8080 -webhook "http://localhost/wsify.php"

  • Binary ? > goto the releases page and download yours.
  • From Source ? >
    go get -u


(1)- How can a client/device connect to the websocket service?

by simply connecting to the following endpoint


(2)- How can a client subscribe to a certain channel(s)/topic(s)?

after connecting to the main websocket service

, you can send a simple json payload
to ask wsify to
you to/from any channel/topic you want!

(3)- What is the commands format?

    "action": "subscribe",
    "value": "testchan"
### (4)- Can I control the client command so I can allow/disallow certain users?
> Yes, each client can define itself using a query param `?key=client1`, this key will be passed to the `webhook` endpoint
as well as the event being executed, and here is the event format:
    // one of the following: connect|subscribe|unsubscribe|disconnect
    "action": "subscribe",

// the channel if provided
"value": "testchan",

// the key provided by the client
"key": "client1"


(5)- How can I publish message to i.e

Just a post request to

with the following format: ```javascript { // the channel you want to publish to "channel": "testchan",
// the data to be send (any format)
"payload": "testchan",

// array of clients "keys" (if you want certain clients only to receive the message) "to": []


bash curl -X POST \ -H "Content-Type: application/json" \ -d '{"payload": "hi from the terminal", "channel": "testchan"}' \ http://localhost:4040/publish ```

(6)- Can I skip the webhook events for testing?


wsify --events=""
empty events means "NO WEBHOOK, WSIFY!"

(7)- How can I secure the publish endpoint, so no one except me can publish ?!!

Easy :), Just change the endpoint to something more secure and hard to guess it is an alternative to access tokens .. etc,

wsify --publish="/broadcasteiru6chefoh1Yee0MohJ2um5eepaephies3zonai0Cae7quaeb"

(8)- What about other options?

wsify --help
will help you !

(9)- What is the websocket client used in demos?

Simple Websocket Client

(10)- How I can use it over SSl/TLS with Nginx?

You can use proxy, add this lines on your Nginx configration

    location /websocket/subscribe {
        proxy_pass http://localhost:4040/subscribe;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
Now you can call websocket by

Quick Demo2


This project has been created by Mohamed Al Ashaal a Crazy Gopher ^^!


  • Fork the Repo
  • Create a feature branch
  • Push your changes to the created branch
  • Create a pull request.


Wsify is open-sourced software licensed under the MIT License.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.