All About Peer Deploy App – Part One

We all know that loklak is a distributed peer to peer sharing system, where in you can host your own loklak peer. The advantages of having your own server is that you have the privileges to share your search data which goes into the indexing, eventually resulting in faster search results. So how can this “peer deploy” app help loklak to get more servers up. Before going into the details, let’s discuss a bit about the peers API provided by Loklak.

Loklak provides a transparent view of its peers and server deploys through its peers API.

This API gives you the details of the loklak peers and count of the active servers.

      "class": "SuggestServlet",
      "host": "",
      "port.http": 9000,
      "port.https": 9443,
      "lastSeen": 1470365717753,
      "lastPath": "/api/suggest.json",
      "peername": "anonymous"

So you can be a part of this group and host your own search engine and share your indexed data.

There are many ways, where you can deploy a loklak peer. But this app provides you a simple one click deploy buttons.


These one click deploy buttons determine what code you are trying to deploy. If you’re not logged in or don’t have an account, you’ll go through the login flow first. For instance, Heroku uses an app.json manifest in the code repo to figure out what add-ons, config and other deployment steps are required to make the code run. This is used to configure and deploy the app. The similar flow goes with other buttons too, where you deploy to Docker containers, Bluemix and Scalingo.

This app aims at having three modules,

  1. Providing all the one click deploy buttons at one place.
  2. Display of the peers network using D3.js charts.
  3. Have a leaderboard page, counting the number deploys per user.

This app is complete upto the first two levels, the upcoming enhancement can be done using loklak_depot module.

Technology stack

  1. The buildpack is available previously, and the buttons are embedded using the html tags provided by each service provider. Here is the code to the app.
  2. The app is written in angularJS and the Force directed graph is built using the d3.js library.
  3. The app consumes the peers.json to get the data for displaying the graph.

Here is a screenshot of the app.


The upcoming enhancement is to have a leaderboard depending on the number of peers deployed per user. If you are interested you can try deploying the peer from here itself. Checkout how simple it can be to deploy.



Deploy on Scalingo

Deploy to Bluemix

Deploy to Docker Cloud

All About Peer Deploy App – Part One