Strange behaviour or my mistake?

If you have not already done so, I strongly encourage you to install Hugo locally, configure it, and learn how everything works. You can certainly install Hugo on a server, but it would be better if you could work out the kinks in an environment that you can control.