Figured it out: I need to set the HOME environment variable to the path of a directory which exists.
HOME