{"id":49417,"library":"ssb-ws","title":"ssb-ws","description":"WebSocket and HTTP server for Secure Scuttlebutt (SSB) clients. Version 6.2.3. Provides a web server that integrates with Scuttlebot, enabling ssb clients (as in scuttle-shell) and browser-based replication via WebSocket. It also exposes an HTTP interface for plugins (e.g., blobs, emoji) using connect-style middleware. Configurable via multiserver connections with SHS authentication for security. Note: noauth mode is not recommended due to DNS rebinding risks.","status":"active","version":"6.2.3","language":"javascript","source_language":"en","source_url":"git://github.com/dominictarr/ssb-ws","tags":["javascript"],"install":[{"cmd":"npm install ssb-ws","lang":"bash","label":"npm"},{"cmd":"yarn add ssb-ws","lang":"bash","label":"yarn"},{"cmd":"pnpm add ssb-ws","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is CommonJS only; ESM import is not supported.","wrong":"import ws from 'ssb-ws'","symbol":"default","correct":"const ws = require('ssb-ws')"}],"quickstart":{"code":"const SecretStack = require('secret-stack')\nconst SSB = require('scuttlebutt')\nconst config = {\n  connections: {\n    incoming: {\n      ws: [{\n        scope: ['public', 'local', 'device'],\n        port: 9000,\n        transform: 'shs',\n        http: true\n      }]\n    }\n  }\n}\n\nconst sbot = SecretStack({appKey: '1KHLiL8i8oPHLJy4fP4HhCuahkbGUYT1I9yHjKQ='})\n  .use(require('ssb-ws'))\n  .use({\n    name: 'example',\n    version: '1.0.0',\n    init: function (sbot) {\n      sbot.ws.use(function (req, res, next) {\n        if (req.url === '/hello') {\n          res.end('Hello from ssb-ws!')\n        } else {\n          next()\n        }\n      })\n    }\n  })\n\nsbot.call('example.hello')\nsbot.close()","lang":"javascript","description":"Starts an ssb-ws server with SHS authentication, adds a custom HTTP route, and demonstrates basic usage."},"warnings":[{"fix":"Configure incoming ws connections with transform: 'shs' to enable secure handshake.","message":"Noauth mode is vulnerable to DNS rebinding attacks; do not use in production without SHS transport.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Replace 'sbot.plugins.install ssb-ws' with sbot.use(require('ssb-ws')).","message":"The plugin install syntax 'sbot.plugins.install ssb-ws' is deprecated; use .use(require('ssb-ws')) instead.","severity":"deprecated","affected_versions":">=6.0.0"}],"env_vars":null,"search_vec":"'6.2.3':14 'also':39 'authent':60 'base':34 'blob':47 'browser':33 'browser-bas':32 'client':12,25 'configur':54 'connect':51,57 'connect-styl':50 'dns':71 'due':69 'e.g':46 'emoji':48 'enabl':23 'expos':40 'http':6,42 'integr':20 'interfac':43 'javascript':74 'middlewar':53 'mode':65 'multiserv':56 'noauth':64 'note':63 'plugin':45 'provid':15 'rebind':72 'recommend':68 'replic':35 'risk':73 'scuttl':29 'scuttle-shel':28 'scuttlebot':22 'scuttlebutt':10 'secur':9,62 'server':7,18 'shell':30 'shs':59 'ssb':2,11,24 'ssb-ws':1 'style':52 'use':49 'version':13 'via':36,55 'web':17 'websocket':4,37 'ws':3","created_at":"2026-06-07T17:01:40.998023+00:00","updated_at":"2026-06-07T17:01:40.998023+00:00","problems":[{"fix":"Run 'npm install ssb-ws' in your project directory.","cause":"Package is not installed or incorrect path.","error":"Error: Cannot find module 'ssb-ws'"},{"fix":"Ensure you call .use(require('ssb-ws')) before accessing sbot.ws.","cause":"ssb-ws plugin not properly loaded into sbot.","error":"TypeError: sbot.ws is undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/dominictarr/ssb-ws","github":"git://github.com/dominictarr/ssb-ws","docs":null,"changelog":null,"pypi":null,"npm":"ssb-ws","openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}