-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update cjdns node installation process
- Loading branch information
Showing
3 changed files
with
31 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
$(document).ready(function() { | ||
var KEY = '?peer_id='; | ||
var idx = window.location.href.indexOf(KEY); | ||
if (idx > -1) { | ||
var peerId = window.location.href.slice(window.location.href.indexOf(KEY) + KEY.length); | ||
$('.cjdns-peer-id').text(peerId); | ||
$('.cjdns-peer-id-missing').css({ display: 'none' }); | ||
$('.cjdns-peer-id-has').css({ display: 'inline' }); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,40 @@ | ||
# Setup a Cjdns Node | ||
This guide will help you set up a cjdns node on a server. | ||
|
||
The easiest way to get a cjdns node installed is using [cjdns.sh](https://github.com/cjdelisle/cjdns.sh). | ||
|
||
## Requirements | ||
A server running debian based Linux (preferably Ubuntu 22.04) with docker installed | ||
A server running debian based Linux (preferably Ubuntu 22.04). | ||
|
||
## Steps | ||
|
||
* Create a data directory where the server configuration will be stored. | ||
* Determine your *Peer ID*. | ||
<span class="cjdns-peer-id-has" style="display:none">Your Peer ID is <code class="cjdns-peer-id">MISSING</code></span> | ||
<span class="cjdns-peer-id-missing">To get your Peer ID, first register your cjdns node on the PKT Dashboard.</span> | ||
|
||
``` | ||
mkdir vpn_data | ||
``` | ||
* Install `cjdns.sh` | ||
|
||
<code> | ||
curl https://pkt.cash/special/cjdns/cjdns.sh | CJDNS_PEERID=<span class="cjdns-peer-id"><peer-id-goes-here></span> CJDNS_ADMIN_PORT=11234 CJDNS_TUN=1 sh | ||
</code> | ||
|
||
* Get the latest docker image | ||
* Check if you have peers working | ||
|
||
``` | ||
docker pull pkteer/pkt-server | ||
cjdnstool peers show | ||
``` | ||
* Configure the server by running the following command: | ||
* Make sure your firewall is open. Port 3478 must be accessible from the public internet. | ||
``` | ||
docker run -it --rm -v $(pwd)/vpn_data:/data pkteer/pkt-server /configure.sh --novpn | ||
iptables-save | ||
nft list ruleset | ||
``` | ||
The configure process will create: `* a cjdroute.conf at data/cjdroute.conf * PKT wallet at data/pktwallet/pkt/wallet.db * store the wallet's seed phrase at data/pktwallet/pkt/seed.txt` | ||
configure.sh can take the following flags: `* --no-vpn:` To configure the server without setting up the VPN server `* --with-pktd:` To configure the server with a local PKT daemon `* --pktd-passwd= :` To set a password for the PKT daemon | ||
## Different public port | ||
Alternatively you can edit the __config.json__ file manually. | ||
If you can't expose port `3478` to the public, you can change the port by specifying `CJDNS_PORT=<port number>` when installing cjdns. | ||
## More information | ||
!!! warning "NOTE" | ||
Make sure to safely store your seed phrase in order to be able to import your wallet on your computer. And delete the __seed.txt__ file after. | ||
* Run the server by running the following commands: | ||
``` | ||
./vpn_data/start.sh | ||
``` | ||
This will start the server and may expose the following ports: | ||
`* cjdns port set from cjdroute.conf * cjdns admin rpc port set from cjdroute.conf (default 11234) * 8099 for anodevpn server * 5201 for iperf3 * 64764` for pktd | ||
To learn more, check out [https://github.com/cjdelisle/cjdns.sh](https://github.com/cjdelisle/cjdns.sh) |