It is always better to use some name instead of IP. Of course, it is easier for admin to just use IPs and not worry about setting up some sort of name resolution for it to work (DNS, hosts, etc.)
I have just tried to setup a test server on my localhost and named it 127.0.0.1. I wasn’t able to login to it by specifying 127.0.0.1 as Domain. Was still getting “Certificate hostname verification failed” error, though TLS certificates are generated for 127.0.0.1 “domain”. Looks like this doesn’t work correctly when using IP addresses as Spark probably uses IP address directly in that case and not as a domain name, hence the error. Account creation also didn’t work. It looks to me it just can’t accept IP address in that dialog, so you will have to use some name for your server.
If you don’t want to setup DNS resolution, then you can go with the second option (granted, this will be more confusing for your users). Do a fresh Openfire installation and name it, say chatserver. Then a new user after running Spark for the first time would have to go to Advanced settings. Uncheck “Automatically discover host and port” and put your server’s IP there. Press OK. Then press on Accounts button and enter: username, password, password and chatserver as Domain. Should be able to create an account then. And then this user will use servername, password and chatserver to login. No need to check “Disable certificate hostname verification” option in this case.
If you will have a DNS setup to resolve chatserver into your server’s IP address, then user should be able to create new account without going into Advanced settings.