Skip to content

A mostly automated way to set up an IPFS Gateway with HTTPS in Docker Containers

License

Notifications You must be signed in to change notification settings

Mithrandir2k18/dockerized-https-ipfs-gateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

HTTPS IPFS Gateway in Docker

A mostly automated way to set up an IPFS Gateway with HTTPS in Docker Containers
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

IPFS is a decentralized protocol that aims to serve content not by addressing it by where it comes from (URI), but instead replacing the central authority and use Content IDentifiers to find content and retrieve it from the closest peer that has content with the same hash.

To make IPFS more accessible, similarly to how IPv6 is/was tunneled in IPv4, IPFS can deliver content via the HTTP protocol by addressing a gateway that has an IPFS node set up.

Having more public gateways helps to share the load of the main ipfs.io gateway and it can make sharing content with others a lot faster, as you can seed data from your own gateway, guaranteeing that it is located quickly.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Install Docker and docker-compose as instructed by the linked resources. Make sure to add your user to the docker group!

Furthermore, if you're behind a NAT, you'll need to set up port-forwarding to the device that'll run the gateway. Required are port 80(for incoming HTTP; it will be upgraded to HTTPS via a 301 response), 443(for HTTPS) and 4001(for IPFS).

And lastly, your device needs to have a DNS entry that points to your (static) IP address. If you don't have either, I recommend a service like DuckDNS.

Installation

  1. Clone the repo
    git clone https://github.com/Mithrandir2k18/dockerized-https-ipfs-gateway.git
  2. If you're not on the amd64/x86_64 architecture:
    1. Execute the build_go-ipfs.sh script.
    2. Edit the docker-compose.yaml and add an image tag to the service "certbot" that matches your system. Find the tags here and it like this: certbot/certbot:TAGNAME
  3. Edit the nginx.conf file and replace every mention of mydomain.com with your registered domain.
  4. Edit the setup_configs.sh script and change the first two variables to match your registered domain and email.
  5. Execute the setup_configs.sh script. If any errors are shown, cancel it, using CTRL+C, debug it, delete the created data directory and try again.
  6. At the end of the script you'll be asked some questions. After that your dockerized HTTPS IPFS Gateway should be up and running!
  7. If you want to start the gateway on each reboot of your device add sleep 10 && cd /path/to/repo/ && docker-compose up -d to your crontab!

Usage

Once your gateway is up and running and publicly reachable, you can use and share HTTPS Gateway links like https://ipfs.io/ipfs/QmPChd2hVbrJ6bfo3WBcTW4iZnpHm8TEzWkLHmLpXhF68A, but instead of using the ipfs.io gateway you can now use links using yours like this: https://mydomain.com/ipfs/QmPChd2hVbrJ6bfo3WBcTW4iZnpHm8TEzWkLHmLpXhF68A!

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

The license may be subject to change in the future.

Contact

Mithrandir2k18 - themithrandir09@gmail.com

Project Link: https://github.com/Mithrandir2k18/dockerized-https-ipfs-gateway

Acknowledgements

About

A mostly automated way to set up an IPFS Gateway with HTTPS in Docker Containers

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages