Skip to content

IPFS-WebDAV is a daemon that uses IPFS HTTP RPC and exposes WebDAV

License

Notifications You must be signed in to change notification settings

vlad20012/ipfs-webdav

Repository files navigation

IPFS-WebDAV

IPFS-WebDAV is a daemon that uses IPFS HTTP RPC and exposes WebDAV API. WebDAV, in turn, can be used to mount the IPFS file system in most operating systems.

Linux   -------------->   +-------------+           IPFS HTTP RPC           +------+
Mac OS  -----WebDAV-----> | IPFS-WebDAV | --------------------------------> | IPFS |
Windows -------------->   +-------------+   (e.g. http://localhost:5001)    +------+

Currently, IPFS-WebDAV exposes /ipfs and /ipns namespaces in read-only mode, and /mfs namespace (referring to MFS) in read-write mode. The read-write access for /ipns is planned.

Advantages over IPFS mount

It's no secret that IPFS can mount /ipfs and /ipns out-of-the-box. However, using ipfs-webdav has several advantages:

  • WebDAV is supported natively in most operating systems
  • You can run single IPFS + ipfs-webdav node and connect to it from multiple hosts using WebDAV. This is useful in LAN or in cloud
  • ipfs-webdav provide read-write access to MFS
  • You can use ipfs name publish along with accessing /ipns via WebDAV.

Installation

Docker

Docker Image Version (latest semver)

Follow the guide on the official docker image page.

Installation from binary distribution

You can find ipfs-webdav binaries on the releases page. Then just run it (./ipfs-webdav_linux-x86-64)

Installation From Source

Run cargo build --release, then find the binary in target/release/ipfs-webdav

Configuration

Currently, ipfs-webdav can be configured only using environment variables.

  • IPFS_WEBDAV_API_ENDPOINT_URL - specifies URL of an IPFS RPC. For example, http://localhost:5001. If not specified, ipfs-webdav tries to read the URL from ~/.ipfs/api file and falls back to http://localhost:5001 if the file is not found.
  • IPFS_WEBDAV_LISTEN - Specifies listen WebDAV address in host:port format. For example, localhost:4918 or 0.0.0.0:4918. Default value is 127.0.0.1:4918
  • IPFS_WEBDAV_LOG - specifies ipfs-webdav log level. Possible values: error, warn, info, debug, trace. Default value is info.

Example: IPFS_WEBDAV_API_ENDPOINT_URL="http://localhost:5001" IPFS_WEBDAV_LISTEN="0.0.0.0:4918" ./ipfs-webdav

Mounting WebDAV filesystem

Linux

The simplest way to connect WebDAV on Linux with GNOME is connecting from Nautilus (aka Files). Open Nautilus, select "+ Other Locations" on the left sidebar then type your server address in the "Connect to Server" field. The address is usually dav://localhost:4918/ or whatever you specified using IPFS_WEBDAV_LISTEN environment variable. Then press Connect button.

For long-living mounts and for other Linux environments I suggest using davfs2:

mount -t davfs http://127.0.0.1:4918 /mnt

It asks to enter username and then password, just press <enter> instead.

MacOS

On macOS, you can simply connect WebDAV drive from Finder. Follow the official guide. Use http://localhost:4918/ (or whatever you specified using IPFS_WEBDAV_LISTEN environment variable) as "Server Address".

Windows

On Windows, you can simply connect WebDAV drive from File Explorer using Map network drive... option. Use http://localhost:4918/ (or whatever you specified using IPFS_WEBDAV_LISTEN environment variable) as "Internet or network address".

License

The IPFS-WebDAV project is dual-licensed under Apache 2.0 and MIT terms:

About

IPFS-WebDAV is a daemon that uses IPFS HTTP RPC and exposes WebDAV

Resources

License

Stars

Watchers

Forks