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.
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.
Follow the guide on the official docker image page.
You can find ipfs-webdav
binaries on the releases page.
Then just run it (./ipfs-webdav_linux-x86-64
)
Run cargo build --release
, then find the binary in target/release/ipfs-webdav
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 tohttp://localhost:5001
if the file is not found.IPFS_WEBDAV_LISTEN
- Specifies listen WebDAV address inhost:port
format. For example,localhost:4918
or0.0.0.0:4918
. Default value is127.0.0.1:4918
IPFS_WEBDAV_LOG
- specifiesipfs-webdav
log level. Possible values:error
,warn
,info
,debug
,trace
. Default value isinfo
.
Example: IPFS_WEBDAV_API_ENDPOINT_URL="http://localhost:5001" IPFS_WEBDAV_LISTEN="0.0.0.0:4918" ./ipfs-webdav
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.
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".
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".
The IPFS-WebDAV project is dual-licensed under Apache 2.0 and MIT terms:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)