Getting started with IPns-link


quickstart guide for exposer

Make sure to check out the about page if your confused what the term "exposer" or "gateway" means.

In this tutorial, we will look at all the steps required to expose a local http server running locally on port 80 (or any other port).

Step 1 - dowload

If you have downloaded the IPNS-Link exposer already from the download page then you can skip this step. 

Run the following command to fetch the exposer code from IPNS-Link's official GitHub.

git clone https://github.com/ipns-link/ipns-link
cd ipns-link

Step 2 - Install

If you have sudo permissions, run this command:

sudo install ipns-link /usr/local/bin/

If you do not have sudo permissions, run the following commands instead:

mkdir -p ~/.bin
cp ipns-link ~/.bin
export PATH="${PATH}":"${HOME}"/.bin

Step 3 - Initialize

Run the following command and provide a terminal editor of your choice.
Provide the corresponding command or absolute path to the executable when prompted.

ipns-link init

Note: You can always change the editor later using ipns-link config.

Step 4 - use

Launch the daemon:

ipns-link daemon

Let's now generate a IPNS-key that will later expose our server. Because the key is hard to remember, we should give it a human-friendly name, e.g. "my-site".

ipns-link gen my-site

Now edit the key by using the following command:

ipns-link config my-site

Change local.endpoint to "https://localhost:80" or wherever your http server is running. 
Then run the following command to expose the server:

ipns-link expose my-site

And your all done!

Note: If you want to use a shortcut you can also run the following command instead of manually changing the config of the key:

ipns-link expose my-site localhost:80

Misc

After you finish this guide, feel free to take a look around at our other resources and leave some feedback on the installation process!