Synology: Install IPFS With Portainer

Synology Install IPFS With Portainer

My previous guide for IPFS involved the use of Task Scheduler and the IPFS linuxserver image that is now deprecated. Today I’m offering a recommended and excellent alternative for installing the latest IPFS version via Portainer. The Interplanetary File System “IPFS” is a distributed file storage protocol that allows computers all over the globe to store and serve files as part of a giant peer-to-peer network. Any computer, anywhere in the world, can download the IPFS software and start hosting and serving files. In this step by step guide I will show you how to install IPFS on your Synology NAS using DockerPortainer.

💡Note: This guide works perfectly with the latest IPFS v.4.2.0 release.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 3

Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it ipfs. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

IPFS Synology NAS Set up 1 new 2024

  • STEP 4

Now create three new folders inside the ipfs folder that you created at STEP 3 and name them data, ipfs, ipns. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

IPFS Synology NAS Set up 2 new 2024

  • STEP 5

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.

1 Synology Portainer Add Stack

  • STEP 6

In the Name field type in ipfs. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

version: "3.9"
services:
  ipfs:
    image: ipfs/kubo:latest
    container_name: IPFS
    hostname: ipfs
    mem_limit: 4g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    read_only: true
    user: 1026:100
    ports:
      - 192.168.1.18:8122:8080      # Gateway
      - 192.168.1.18:5005:5001      # RPC API - includes admin operations - never open to the public internet
      - 4001:4001                # P2P TCP/QUIC transports
      - 4001:4001/udp            # P2P TCP/QUIC transports
    volumes:
      - /volume1/docker/ipfs/data:/data/ipfs:rw
      - /volume1/docker/ipfs/ipfs:/ipfs:rw
      - /volume1/docker/ipfs/ipns:/ipns:rw
    environment:
      IPFS_PATH: /data/ipfs
    restart: on-failure:5
    
#    Container console - ash
#    To access the WebUI type in http://yourNASIP:5005/webui in the browser
#    
#    ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://YOURNASIP:5005", "http://localhost:3000", "http://127.0.0.1:5005", "https://webui.ipfs.io"]'
#    ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'
#
#    Restart IPFS Container

Note: Before you paste the code above in the Web editor area below, change the value numbers for user with your own values. (Follow my step by step guide on how to do this.1026 is my personal UID value and 100 is my personal GID value. You have to type in your own values.
Note: Before you paste the code above in the Web editor area below, change the value for ports and add your own Synology Local NAS IP. 192.168.1.18 is my own Synology Local NAS IP. You should add your own Synology Local NAS IP.

  • STEP 7

Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

IPFS Synology NAS Set up 4 new 2024

  • STEP 8

If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.

IPFS Synology NAS Set up 4 Success new 2024

  • STEP 9

Go back to STEP 1 or you will deal with karma 🙂

  • STEP 10

The installation process can take up to a few seconds/minutes. It will depend on your Internet speed connection. Now open your browser and type in http://Synology-IP-address:5005/webui Copy the code you find in the UNIX & MACOS area; you will need it later at STEP 13. Follow the instructions in the image below.

IPFS Synology NAS Set up 5 new 2024

  • STEP 11

On the left sidebar in Portainer, click Containers. Identify your IPFS instance, then click on the little terminal icon. Follow the instructions in the image below.

IPFS Synology NAS Set up 6 new 2024

  • STEP 12

After you click on the little terminal icon at STEP 11, a new page will open. Select from the Command list /bin/ash then click Connect. Follow the instructions in the image below.

IPFS Synology NAS Set up 7 new 2024

  • STEP 13

In the terminal, paste the code you have previously copied at STEP 10. Once the code is inserted, confirm by pressing Enter on your keyboard. Follow the instructions in the image below.

IPFS Synology NAS Set up 8 new 2024

  • STEP 14

On the left sidebar in Portainer, click Containers. Identify your IPFS instance, select it then click Restart. Follow the instructions in the image below.

IPFS Synology NAS Set up 9 new 2024

  • STEP 15

Delete the cache on your browser. ⚠️Warning: If you forget this step, you will not be able to properly see if IPFS is connected.

  • STEP 16

After you restart the container at STEP 14, wait 2-3 minutes. Now open your browser and type in http://Synology-IP-address:5005/webui You should see “Connected to IPFS“.

IPFS Synology NAS Set up 10 new 2024

  • STEP 17

You can now import some files. On the left sidebar go to Files then click Import. Select/Check your file, then click Share link. Follow the instructions in the image below.

IPFS Synology NAS Set up 11 new 2024

  • STEP 18

Copy the link. Follow the instructions in the image below.

IPFS Synology NAS Set up 12 new 2024

  • STEP 19

Paste your link into the browser or share it anonymously.

IPFS Synology NAS Set up 13 new 2024

  • STEP 20

You can see all PEERS connected to the InterPlanetary File System.

IPFS Synology NAS Set up 14 new 2024

Enjoy IPFS!

💡 Good to know: During the block of Wikipedia in Turkey (29 April 2017 to 15 January 2020), IPFS was used to create a mirror of Wikipedia, which allowed access to the content of Wikipedia despite the ban.

🆘TROUBLESHOOTING

If you encounter issues by using this container, make sure to check out the Common Docker issues article.

Note: If you want to run IPFS over HTTPS, check How to Run Docker Containers Over HTTPS.
Note: Can I run Docker on my Synology NAS? See the supported models.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Find out how to update the IPFS container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.

This post was updated on Saturday / February 24th, 2024 at 6:11 AM