hugo-server
starts a local development server with live reload
TLDR
SYNOPSIS
hugo server [options]
DESCRIPTION
hugo server starts a local development server with live reload. It watches for file changes and automatically rebuilds the site, then signals connected browsers to refresh via injected JavaScript.The server renders content to memory by default for speed. It defaults to localhost:1313 and enables watching/live reload automatically.
PARAMETERS
-D, --buildDrafts
Include draft content.-E, --buildExpired
Include expired content.-F, --buildFuture
Include content with future publish dates.-p, --port PORT
Server port (default: 1313).--bind ADDR
Listen address (default: 127.0.0.1).-b, --baseURL URL
Hostname and path to the root.--disableLiveReload
Disable automatic live reloading of browser.--navigateToChanged
Navigate to changed content file on live reload.--poll DURATION
Use polling with this period for file change detection (e.g., 700ms).-w, --watch
Watch for changes and rebuild (default: true).--noHTTPCache
Prevent HTTP caching.--renderStaticToDisk
Serve static files from disk and dynamic files from memory.--help
Display help information.
CAVEATS
Intended for development only, not production use. The --bind 0.0.0.0 option exposes the server on all network interfaces. Memory usage can be significant with large sites since content is rendered to memory. Use --poll in environments where filesystem events are unreliable (e.g., Docker, network mounts).
HISTORY
hugo server is the built-in development server for Hugo, the open-source static site generator written in Go.
SEE ALSO
hugo(1), live-server(1)
