Note-55390-5

Token ID: 1

ERC-721 1 Transfers

Metadata

{
  "title": "自建ipfs节点保存博客内容",
  "tags": [
    "post",
    "ipfs",
    "docker"
  ],
  "summary": "部署 ipfs 节点 Copy\nversion: '3'\nservices:\n  ipfs_host:\n    image: ipfs/kubo:latest\n    container_name: ipfs_host\n    ports:\n      - \"4001:4001\"…",
  "sources": [
    "xlog"
  ],
  "external_urls": [
    "https://x.limour.top/zi-jian-ipfs-jie-dian-bao-cun-bo-ke-nei-rong"
  ],
  "date_published": "2023-05-11T15:21:03.870Z",
  "content": "## 部署 ipfs 节点\n```yaml\nversion: '3'\nservices:\n  ipfs_host:\n    image: ipfs/kubo:latest\n    container_name: ipfs_host\n    ports:\n      - \"4001:4001\"\n    volumes:\n      - ./export:/export\n      - ./ipfs:/data/ipfs\n    restart: always\n\nnetworks:\n  default:\n    external: true\n    name: ngpm\n```\n```bash\nmkdir -p ~/app/kubo && cd ~/app/kubo && nano docker-compose.yml\nsudo docker-compose up -d && sudo docker-compose logs\n```\n## pin 测试\n```bash\n# 查询某一个 Hash 是否被 pin\ndocker exec ipfs_host ipfs pin ls bafkreidhatzot43igolwbadmdhmzjqxi37putjaiqx6ud726apuoquof54\n# pin 一个文件\ndocker exec ipfs_host ipfs pin add bafkreidhatzot43igolwbadmdhmzjqxi37putjaiqx6ud726apuoquof54\n```\n## 反代网关\n![image](ipfs://bafkreigqd572ldiqkmy27db5jqkbzzmexfg2ygyfvc4h2so4ww4cqjawwu)\n路径的 **limour_ipfs** 需要保密\n+ webui: `https://limour.top/ipfs/bafybeic4gops3d3lyrisqku37uio33nvt6fqxvkxihrwlqsuvf76yln4fm`\n+ 访问上面的地址,limour.top 换成自己反代的域名\n+ 按下图,设置里换成自己的API端点:`https://limour.top/limour_ipfs/api/v0/`\n![image](ipfs://bafkreigkcl5l56puzeltc3m63nqc4mypdegkmzcaneokqeolhw5ktmu6ke)\n## 测试节点\n+ 按下图,上传一个独特的文件到自己的节点\n+ 通过 xLog的ipfs节点访问,确认自己的节点接入了ipfs网络:`https://ipfs.4everland.xyz/ipfs/QmQJFdy9BecCM4ncudXG96dpvFB3yTiZNH9r1Md5t1db9s`\n![image](ipfs://bafkreiebjohtnl7nnngrrjz473f5g6fn5264w6unucfaxobhqdbguspyui)\n## 搭建环境\n+ 安装好 [docker](https://x.limour.top/DOCKER-an-zhuang-liu-cheng-ji-lu)\n+ [Nginx Proxy Manager](https://x.limour.top/Docker-bu-shu-Nginx-Proxy-Manager)",
  "attributes": [
    {
      "value": "zi-jian-ipfs-jie-dian-bao-cun-bo-ke-nei-rong",
      "trait_type": "xlog_slug"
    }
  ]
}