Hosting a Hugo Site

Hello everyone. I had a question I was hoping someone could answer. The one thing I am having trouble warping my head around is how would Hugo be hosted on VPS. If I can just run it from anywhere do I have to have a VPS that has like nginx or Apache running on it or can I just start it from my server at the terminal and move on to other things?

So Hugo operates in two different modes.

Mode 1: hugo

This mode will take the source files and output html files into the destination directory on your local computer. From there you can copy these files to any server in the world (nginx, apache, s3, etc).

Mode 2: hugo server
In this mode Hugo takes the source files and can serve them up over a port. There is no need for an additional server. The performance is quite good here, but not quite as good as nginx or a finely tuned apache. In my testing it’s about 20% slower. In contrast using a dynamic system like wordpress or ruby is a few magnitudes slower. hugo server will serve files, but you can’t just run that on your laptop and expect the site to be available online because of routing and firewall issues. You would need to run this on a server for it to be online.

1 Like

wow that was fast. Thanks for getting back to me so quick. This clears up a lot.