I tend to link the following page, which is official documentation, but unfortunately not where most people would look:
Note that there are two main ways of setting up a broker (Broker Thing) and (device) Things via files:
- Your device Things are nested within the Broker Thing. This has a specific syntax.
- The Broker Thing is separate (can even be in a separate file), and the device Things reference the Broker Thing. This has a different specific syntax.
Both options have examples in the link above.
If your server itself is appropriately secured then not using a password is not an issue.
I made a generic-ish MQTT tutorial based on a Tasmota flashed Sonoff Basic - see if anything from there would fit for examples in your post.