Installing and Configuring CJDNS on Ubuntu Linux

This was adapted from https://wiki.projectmeshnet.org/Install_on_Ubuntu

Installation

The standard CJDNS install information is good, but doesn't have any support for restarting when your server restarts. The Debian build method handles things better overall.

  1. Install dependencies:

    sudo apt-get install nodejs git build-essential devscripts debhelper dh-systemd
    
  2. Check out source code:

    git clone https://github.com/cjdelisle/cjdns.git && cd cjdns
    
  3. Build the .deb files. You will need to prevent signing the .deb files since you don't have the private key available.

    debuild -uc -us
    
  4. Install the created .deb files (3 in total).

    sudo dpkg -i ../cjdns*.deb
    

Configuration

You need a peer to connect to! CJDNS requires some sort of explicit relationship between peers in order to connect properly.

Although you can use public peers, it is best to only use them until you can specifically connect to other peers. Hopping on the IRC channel after you get on the network to find a peer is a good idea.

Public Peers:

Configuration Steps:

  1. Open up your firewall. Look up the port provided in /etc/cjdroute.conf (look for line "bind":"0.0.0.0:<PORT>")

    sudo ufw allow <PORT>/udp 
    

    Look up how to do it if you're still using IPTables. Remember, you will need to forward your port from your router as well (UDP, not TCP!).

  2. In the connectTo section, add peers to connect to, and save the file.

  3. Start the CJDNS service

    sudo start cjdns && sudo status cjdns
    
  4. Confirm that the interface has been created and you can access the network.

    • Running ifconfig tun0 should reveal an entry similar to:

      tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
                inet6 addr: fc12:70dc:a0e4:1909:xxxx:xxxx:xxxx:xxxx/8 Scope:Global
                UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1304  Metric:1
                RX packets:9056 errors:0 dropped:0 overruns:0 frame:0
                TX packets:567 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:500
                RX bytes:488744 (488.7 KB)  TX bytes:48774 (48.7 KB)
      
    • You should be able to ping some specific sites:

      ping6 fc9d:2ef7:3fb4:70e1:847c:d810:d5e3:fe21
      
    • You should be able to use lynx to connect to some sites:

      lynx https://h.diasp.ca
      lynx http://uppit.us/
      

Peering

I have nodes available in Canada and the eastern United States that I am interested in having others peer with. Contact me if you're interested.