IPFS Primer
ipfs.ioIPFS Docs
  • Introduction
  • Tutorial: Install and Initialize IPFS
    • Lesson: Download and Install IPFS
    • Lesson: Initialize your IPFS Repository
  • Tutorial: Files on IPFS
    • Lesson: Add Content to IPFS and Retrieve It
    • Lesson: Wrap Filenames and Directory Info around Content
    • Lesson: Pinning - Tell IPFS to Keep a File
  • Tutorial: Going Online - Joining the Distributed Web
    • Lesson: Connect your node to the IPFS network
    • Lesson: Find Peers on the Network
    • Lesson: Retrieve content from a Peer
  • Tutorial: Interacting with the Classical (HTTP) Web
    • Lesson: Use an HTTP browser to retrieve files from local IPFS gateway
    • Lesson: Get content through the public ipfs.io gateway
    • Lesson: Access IPFS content through any IPFS gateway
  • Tutorial: The Myriad ways to Access and Distribute IPFS Content
    • The Power of Content-addressing
    • Retrieving content from a peer
    • Review these lessons from the Tutorial on Interacting with the Classical (HTTP) Web
      • Review: Using an HTTP browser to retrieve files from local IPFS gateway
      • Review: Using the public IPFS gateways at ipfs.io
      • Review: Access IPFS content through any IPFS gateway
    • Lesson: Access IPFS content through Tor gateways (experimental)
    • Lesson: Run IPFS over Tor transport (experimental)
    • Lesson: Access IPFS content through a browser extension
    • Lesson: Sneakernets - moving the data on USB Drives and other Hardware
  • Tutorial: Making Changes on the Permanent Web
    • Lesson: Create a Simple Webpage and Add It to IPFS
    • Lesson: View Your Webpage with IPFS and Publish to IPNS
    • Lesson: Modify Your Webpage and Republish to IPNS
    • Lesson: Generate and Use a New IPNS Name Keypair
  • Tutorial: Merkle Trees and the IPFS DAG
    • Lesson: Turn a File into a Tree of Hashes
    • Lesson: The Cryptographic Hash
    • Lesson: Build a Tree of Data in IPFS Using Cryptographic Hashes to Link the Pieces (a Merkle DAG)
    • Lesson: Explore the types of software that use hash trees to track data (to come)
  • Tutorial: Dynamic Content on IPFS
    • Disclaimer: Dynamic content on IPFS is a Work in Progress (to come)
    • Lesson: Add data to the DAG (locally) (to come)
    • Lesson: Tell peers about your Changes (to come)
    • Lesson: Use hashes to get someone's changes from IPFS (to come)
    • Lesson: Use a pub/sub strategy to pass around messages about changes (to come)
    • Lesson: Resolve conflicts with a merge strategy (CRDTs) (to come)
  • Privacy and Access Controls on the Distributed Web (to come)
    • Reader Privacy & Writer Privacy (to come)
    • Private Networks (to come)
    • Encrypting Content (to come)
    • More dynamic encryption: capabilities-based encryption (to come)
    • Comparing with the classic HTTP web (feudal security, etc) (to come)
  • Keeping Data Alive: Durable Data on the Permanent Web (to come)
    • IPFS Cluster (to come)
    • Filecoin (to come)
  • Distributed Computation (to come)
Powered by GitBook
On this page
  • Prerequisites
  • Goals
  • Steps
  • Step 1: Start the IPFS daemon
  • Step 2: Read request content through your IPFS node's HTTP gateway
  • Explanation
  • Next Steps

Was this helpful?

Export as PDF
  1. Tutorial: The Myriad ways to Access and Distribute IPFS Content
  2. Review these lessons from the Tutorial on Interacting with the Classical (HTTP) Web

Review: Using an HTTP browser to retrieve files from local IPFS gateway

PreviousReview these lessons from the Tutorial on Interacting with the Classical (HTTP) WebNextReview: Using the public IPFS gateways at ipfs.io

Last updated 3 years ago

Was this helpful?

This lesson shows some of the different ways to access content through an IPFS node that you have installed locally on your computer. Some of the underlying topics are covered in greater depth in the tutorials about and .

Prerequisites

To do the steps in this lesson you must:

  • on your local machine

Goals

After doing this Lesson you will be able to

  • Access any content through your local IPFS node's HTTP gateway

Steps

Step 1: Start the IPFS daemon

Start the IPFS daemon by running

$ ipfs daemon

If the daemon is not running, your IPFS node won't be able to retrieve content from other nodes on the network. It also won't start the HTTP gateway that you're going to use in Step 2.

Step 2: Read request content through your IPFS node's HTTP gateway

You must tell the gateway whether you're requesting content with an IPFS hash or an IPNS hash. If you're using the hash of a specific snapshot of content -- for example a file that someone added to IPFS, use a path that starts with /ipfs/. If you're using an IPNS hash to get the latest version of some content that gets updated over time, for example a website that gets fresh content every day, use a path that starts with /ipns/.

Explanation

You can use a local IPFS node to read content from the worldwide IPFS network. The two ways of interacting with your local node are 1) through the command line and 2) through the HTTP gateway. You can use either of those interfaces to pass IPFS the content-addressed (hash) identifiers of the content you want. The IPFS node will use those identifiers to find that content on the network and retrieve it for you.

Next Steps

To view the wikipedia page we're using as an example in all of the lessons in the , use these links:

2017-04-30 snapshot:

latest (IPNS): [correct example though this link may be stale]

latest (DNS):

If you want to learn about the many other ways you can use IPFS to access the same content using the same content-addressed link, go to the .

Otherwise proceed to the next lesson to learn how to

Files on IPFS
Going Online - Joining the Distributed Web
Install and Initialize IPFS
Tutorial on The Myriad Ways to Access and Distribute IPFS Content
http://localhost:8080/ipfs/Qme2sLfe9ZMdiuWsEtajWMDzx6B7VbjzpSC2VWhtB6GoB1/wiki/Anasayfa.html
http://localhost:8080/ipns/QmQP99yW82xNKPxXLroxj1rMYMGF6Grwjj2o4svsdmGh7S/wiki/Anasayfa.html
http://localhost:8080/ipns/ipfs.io
Tutorial on The Myriad Ways to Access and Distribute IPFS Content
Get content through the public ipfs.io gateway