Skip to main content

Preview your site from any device on your network with these hugo server options

Published: 2019-04-23 | Lastmod: 2019-05-08

When developing your hugo site from your main computer, have you ever wished you could preview it from your phone to see how it looks on a mobile device? Well, you’re in luck: it’s possible, and can be done with any device connected to your network. Here’s the command.

hugo server --bind --baseURL http://<your-host-ip>:1313

As an example, let’s say your main computer’s IPv4 address (aka the host in this example) is After running the following command on your main computer, you’d navigate to from your phone to preview your site.

hugo server --bind --baseURL

Feels magical, right?

P.S. to get your IPv4 address on Windows run ipconfig. To get it on Mac and Linux run ifconfig.