Access Hugo Dev Server From Any Device On The Same Network

Published On: Jun 18, 2019

A quick blog post explaining how to make Hugo server accessible across multiple devices on the same network for testing or development.

So while developing themes or testing different layouts we might need to test the website on multiple devices and different form-factors. Running command Hugo server by default is not accessible over the network on different devices like your smartphone or tablet.

In order to access the website from other devices we need to bind the server to its network interface IP (instead of the loopback IP i.e. using the –bind argument. Also pass the –baseURL argument to make sure all pages and links work as expected.

hugo server --bind=<IP-Of-Dev-Machine> --baseURL=http://<IP-Of-Dev-Machine>:<PORT>  
# eg. hugo serve --bind= --baseURL=

This blog post is based on below thread from hugo discourse thread:

See Also