How to set up macOS High Sierra "wfsctl" WebDAV to use with an application that uses basic authentication?

How does one go about setting up a macOS High Sierra wfsctl WebDAV server to use with application such as Password Wallet? Does any one have a good set of notes for setting up a wfsctl server?

Use Case

wfsctl WebDAV server now ships with macOS High Sierra. The context of this question is for mainstream macOS High Sierra, and not any macOS Server software.

Applications (such as PasswordWallet) would use basic username password authentication to access a WebDAV server.

Background:

At this time, search on various apple.com urls only returned one result, "Prepare your institution for ... macOS High Sierra ...", which just states:

You won’t be able to set up file sharing with iOS devices in macOS Server 5.4. ... If you want to configure WebDAV sharing on a Mac with macOS Server 5.4, see the wfsctl(8) manual page. 

The wfsctl man page (on regular macOS High Sierra) provides technical command information. However, the man page does not provide a example setup or getting started guide.

So far, internet searches for wfsctl use on macOS High Sierra has not yielded much additional information about using wfsctl.

Finally, while there are many Apache WebDAV guides available, my initial wfsctl experimenting started with the unexpected wfsctl will start but not stop the related Apache httpd services.

So, does any one have a good set of summary notes specific to setting up a wfsctl WebDAV server and how to navigate through any "quirks" of a wfsctl system? (i.e. not general Apache WebDAV links.)


Step 1. Host Address. Know the IP address or DNS Domain Name for the host machine. A static IP address or fully qualified DNS name will allow other guest machines to bookmark the host machine. If DHCP is used for the host machine, then the dynamic TCP/IP address will need to be known each time prior to connection. The IP address can be found in the System Preferences > Network panel.

Network IP

Step 2. Create Share Point Directory.

# For example,
sudo mkdir /Library/WebServer/ExampleSharePoint
sudo chown $USER:staff /Library/WebServer/ExampleSharePoint
sudo wfsctl share Volume/HardDisk/Library/WebServer

Step 3. Configuration. Edit /etc/wfs/wfs.plist. Set SynthesizeSharePointForUserHomeDir to determine whether to allow remote WebDAV clients to see their home directory as a share point. Default is true. Use false to limit sharing to the expressly added share points.

<key>SynthesizeSharePointForUserHomeDir</key>
<false/>

Note: CreateHomeDirsForLocalUsers and ApplyUserInstanceSandbox appear to be undocumented at this time.

Step 4. Start wfsctl.

sudo wfsctl start
# Using identity with self-signed cert
sudo wfsctl diagnose # verify

Step 5. Setup Application Connection.

In the case of PasswordWallet, use the Network Sync Wizard to create a new sync. Select WebDAV as the sync type.

Sync Type

If the server does not have a fully qualified DNS name, then the IP address can be used directly.

Sync Info

Step 6. Stopping wfsctl and httpd.

Based on How to unregister “httpd” after “wfsctl stop”? ...

sudo wfsctl stop             # stops WebDAV. restarts httpd
sudo apachectl graceful-stop # if desired, stops httpd
# verify
sudo wfsctl diagnose

Addendum

The WebDAV share can also be mounted directly from macOS Finder. Menu: Finder > Go > Connect to Server… ⌘K.

Finder Connect to Server

The default auto self-generated certificate can be either temporarily or permanently accepted.

Verify Certificate

Finder Share Point Folder View

Finder Share Point Folder View

Finder Share Point Info

Finder Share Point Info

Observation: Sometimes a file transfer via a macOS Finder WebDAV mount could fail and cause a loss of connection. In these cases, so far, a second transfer attempt has succeeded OK.

At the time of this writing, the Password Wallet direct WebDAV synchronization connection has been solid and reliable for me.