Fundamentally, you should be able to take the SocketServer binary (socketserver), put it in any resource directory the widget can access, take the SocketServer.js, put it in any resource directory the widget can access (these resource directories need not be Widget Resource/ directories, but I tend to think they ought to be under the Widget directory somewhere). NB: until Konfabulator supports JavaScript includes, the SocketServer.js code is found embedded in this Widget's onload handler: onload.js. The general strategy is that at widget initialization, the event handler handling this event is expected to instance the javascript object and run startServer(): var ssObj = new SocketServer(); ssObj.startServer(); To shutdown, use the javascript object's: ssObj.stopServer() and make sure your widget's shutdown handler triggers this (don't worry: the SocketServer will know to keep running if other widgets are using it).