Did a Finder search, including system files, and found the following files containing the hostname:
/Users/<username>/Pictures/Photos Library.photoslibrary/database/Photos.sqlite.lock
and
/Users/<username>/Library/Photos/Libraries/Syndication.photoslibrary/database/Photos.sqlite.lock
Contents look something like this, with your own hostname and UUID values in the appropriate key strings:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>hostname</key>
<string>actual_hostname.lan</string>
<key>hostuuid</key>
<string>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</string>
<key>pid</key>
<integer>1173</integer>
<key>processname</key>
<string>photolibraryd</string>
<key>uid</key>
<integer>501</integer>
</dict>
</plist>
There may be other files that Finder doesn't search. You might try using the grep command. See man grep for more info, or try the ideas suggested in the SO question: How to find all files containing a specific text (string) on Linux?.