How to Serve Your Hugo Site on a Local Network 0 ▲ Nelson Figueroa 1 day ago · Tech · hide Sometimes it’s useful to check how a Hugo site looks on a real mobile device before deploying. That requires serving the site on a local network so other devices on that network can access it. Here’s the command to serve a Hugo site on a local network: hugo server --bind 0.0.0.0 --baseURL <local-IP-address>Then open http://<local-IP-address>:1313 on your phone. The site should load and work as expected. The --bind 0.0.0.0 option is necessary because Hugo binds itself to 127.0.0.1 by default, which means no other devices except the one serving the site would be able to reach said site. The --baseURL <local-IP-address> option is needed so that links generated in the Hugo site all point to the local IP address the site is being served from. Otherwise, the links will be generated with localhost:1313. Note that if you’re on public wifi this command may not work due to client isolation! If you need to get your local IP address, here are a few methods depending on your operating system. On… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town