Where to start to use libp2p

Hi! I am a student who wants to study p2p networks using libp2p, but I am lost for where to start now.
I want to know for following resources to begin adopting the technology:

  1. Courses for peer to peer(p2p) network

  2. Resources for Kademlia

  3. Tutorials and Examples for libp2p


Let’s crowdsource resources for you!

@yusef @vasco-santos @bigs @vyzo @jacobheun @alanshaw @dirkmc @mike

1 Like

I found these slides very helpful https://docs.google.com/presentation/d/11qGZlPWu6vEAhA7p3qsQaQtWH7KofEC9dMeBFZ1gYeA/mobilepresent#slide=id.g1718cc2bc_0365

Turn on the speaker notes and read them to make sense of the slides.


I was recently linked to this course, but can’t comment on it personally: https://pdos.csail.mit.edu/6.824/schedule.html

There are lots of linked papers and notes that could be interesting.

For libp2p, there are links to example code at https://docs.libp2p.io/examples/ for several languages.

Often a good way to learn a new technology is to build a small project with it. Do you have something you want to build?


Another great resource is CS144 from Stanford: http://www.scs.stanford.edu/10au-cs144/sched/

Lectures available in video here: https://www.youtube.com/playlist?list=PLvFG2xYBrYAQCyz4Wx3NPoYJOFjvU7g2Z


Yes! I always build projects to learn something new. I want to build a private p2p chat application with these features if possible:

  1. encrypted message
  2. kademlia dht
  3. working in browser/mobile

Amazing. This is the most detailed description I have seen of how kademia works.

By default, libp2p transports are “upgraded” with a multiplexer and a security option. For the time being, that security option is our own secio. Eventually, we aim to make it TLS1.3. Off the bat, you’ve got security!

Adding high level subsystems like the DHT is actually pretty straightforward, too! Construct a new DHT object wrapping your host and you’re more or less off to the races. One thing I’d add is it’s useful to call Bootstrap to start populating your routing table with random peers! From there you can enjoy the DHT’s API for making Put, Get, and Provide calls.

As a go-libp2p contributor, I’m quite a bit less familiar with the JavaScript side of things, but they’ve got a quite complete implementation as well! Perhaps @jacobheun or @vasco-santos could provide some color!

1 Like

There’s a basic chat example for js at https://github.com/libp2p/js-libp2p/tree/v0.25.0-rc.5/examples/chat. TCP would need to get removed from the configuration in order to not break in the browsers. DHT is already added in the config, it just needs to be turned on and configured there.

1 Like

Awesome! the library really covers anything that comes with p2p communication. I should just go straight for making applications.

Thank you. I have tried the chat app. I wonder how each peer-id argument is used.
Can I have a deep look into how peer-id operate to support p2p chat?

There’s an overview of what peer ids are all about at https://docs.libp2p.io/concepts/peer-id/ - let me know if anything is confusing there or if you have other questions! Some of the links might be to stub articles - I’m working on filling in the blanks now.

1 Like

Thank you @yusef I think it would be better if there is a description on how public/private key is used to identify oneself using an example(e.g. chat).

Also, information for multiaddress(multiaddr) is scarce. even in glossary the separate link goes to the glossary itself. Can you describe more on its use or definition in the glossary? or is the link for multiaddress is in WIP?

This is pure GOLD!!!


Hi @raul , I am trying to get chat functionality in a matrimonial app ( made in Golang n Flutter) that me and my friends are trying to build… but have no idea about making chat service and using libp2p would actually be a dream come true

There are a few chat example applications in Golang using libp2p that maybe can help point you in the right direction?

in particular: chat and chat-with-rendezvous

Getting Started with go-libp2p :: libp2p Documentation is also a great start for getting libp2p into your golang app.

Hey @Sandeep, you can also go through the libp2p docs to learn the concepts first:


You’ll be in a better position to follow the chat example that @willscott posted.

@Sandeep, I’m working on a chat app (Go + Electron) for learning libp2p (and p2p concepts). You can take a look at the on-going work for the p2p node here: go-libp2p-chat/go-node at main · FelipeRosa/go-libp2p-chat · GitHub. Hope that helps too.

Also, I would love to help with what I can :slightly_smiling_face:.