HUGO-SERVER(1)

πŸ’… HUGO-SERVER(1) β€” the Hugo Manual, server edition πŸŽ€

okay so bestie, welcome to the Hugo Manual page for hugo-server(1) β€” this is the one that spins up the embedded web server. buckle up, it's actually iconic ✨


🌸 NAME 🌸

hugo-server β€” start the embedded web server 🫢


⭐ SYNOPSIS ⭐

hugo server [command] [flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: Hugo ships with its own webserver, and that server builds and serves your project. And like… yes, hugo server is genuinely high performance, but ngl it's a webserver with limited options. She's a specialist, not a generalist πŸ’…

By default, hugo server writes files to disk and serves them from disk. But you can render to memory instead by passing the --renderToMemory flag β€” that can be faster in some cases, though it will eat more memory. trade-offs, babes 😭

Also by default, Hugo watches your files for any changes you make and automatically rebuilds the project. Then it live reloads any open browser pages and pushes the latest content to them πŸ”₯ Most Hugo projects build in a fraction of a second, so you'll be able to save and see your changes nearly instantly. it's giving instant gratification and honestly? we love that for us πŸ’–


✨ OPTIONS ✨

  • --appendPort[=true] β€” append the port to baseURL
  • -b, --baseURL="" β€” hostname (and path) to the root, e.g. https://spf13.com/
  • --bind="127.0.0.1" β€” the interface the server will bind to
  • -D, --buildDrafts[=false] β€” include content marked as draft
  • -E, --buildExpired[=false] β€” include expired content
  • -F, --buildFuture[=false] β€” include content with publishdate in the future
  • --cacheDir="" β€” filesystem path to the cache directory
  • --cleanDestinationDir[=false] β€” remove stale files from the destination
  • -c, --contentDir="" β€” filesystem path to the content directory
  • --disableBrowserError[=false] β€” do not show build errors in the browser
  • --disableFastRender[=false] β€” enables full re-renders on changes
  • --disableKinds=[] β€” disable different kinds of pages (home, RSS etc.)
  • --disableLiveReload[=false] β€” watch without enabling live browser reload on rebuild
  • --enableGitInfo[=false] β€” add Git revision, date, author, and CODEOWNERS info to the pages
  • --forceSyncStatic[=false] β€” copy all files when static is changed.
  • --gc[=false] β€” enable to run some cleanup tasks (remove unused cache files) after the build
  • -h, --help[=false] β€” help for server
  • --ignoreCache[=false] β€” ignore the configured file caches
  • -l, --layoutDir="" β€” filesystem path to the layout directory
  • --liveReloadPort=-1 β€” port for live reloading (i.e. 443 in HTTPS proxy situations)
  • --minify[=false] β€” minify any supported output format (HTML, XML etc.)
  • -N, --navigateToChanged[=false] β€” navigate to the changed content file on live browser reload
  • --noChmod[=false] β€” don't sync the permission mode of files
  • --noHTTPCache[=false] β€” disable browser caching of pages served by the embedded web server
  • --noTimes[=false] β€” don't sync the modification time of files
  • -O, --openBrowser[=false] β€” open the project in a browser after server startup
  • --panicOnWarning[=false] β€” panic on the first WARNING log
  • --poll="" β€” set this to a poll interval, e.g. --poll 700ms, to use a poll based approach to watch for file system changes
  • -p, --port=1313 β€” the port on which the server will listen
  • --pprof[=false] β€” enable the pprof server (port 8080)
  • --printI18nWarnings[=false] β€” print missing translations
  • --printMemoryUsage[=false] β€” print memory usage to the screen at intervals
  • --printPathWarnings[=false] β€” print warnings on duplicate target paths etc.
  • --printUnusedTemplates[=false] β€” print warnings on unused templates.
  • --renderSegments=[] β€” named segments to render (configured in the segments config)
  • --renderStaticToDisk[=false] β€” serve static files from disk and dynamic files from memory
  • --templateMetrics[=false] β€” display metrics about template executions
  • --templateMetricsHints[=false] β€” calculate some improvement hints when combined with --templateMetrics
  • -t, --theme=[] β€” themes to use (located in /themes/THEMENAME/)
  • --tlsAuto[=false] β€” generate and use locally-trusted certificates.
  • --tlsCertFile="" β€” path to the TLS certificate file
  • --tlsKeyFile="" β€” path to the TLS key file
  • --trace="" β€” write trace to a file (not useful in general)
  • -w, --watch[=true] β€” watch the filesystem for changes and recreate as needed

πŸ‘‘ OPTIONS INHERITED FROM PARENT COMMANDS πŸ‘‘

these ones came from the parent command, so they're technically nepo babies but they still slay πŸ’œ

  • --clock="" β€” set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
  • --config="" β€” config file (default is hugo.yaml|json|toml)
  • --configDir="config" β€” config dir
  • -d, --destination="" β€” filesystem path to write files to
  • -e, --environment="" β€” build environment
  • --ignoreVendorPaths="" β€” ignores any _vendor for module paths matching the given Glob pattern
  • --logLevel="" β€” log level (debug|info|warn|error)
  • --noBuildLock[=false] β€” don't create the .hugo_build.lock file
  • --quiet[=false] β€” build in quiet mode
  • -M, --renderToMemory[=false] β€” render to memory (mostly useful when running the server)
  • -s, --source="" β€” filesystem path to read files relative from
  • --themesDir="" β€” filesystem path to the themes directory

🌈 SEE ALSO 🌈

hugo(1), hugo-server-trust(1) β€” go read those too, bestie, they're lowkey essential πŸ“š


aaaand that's the whole page, no cap 🧚 ✨ This was Hugo 0.169.0, dated Oct 2026 β€” that's HUGO-SERVER(1) in the Hugo Manual, and she ate. periodt. πŸ’…πŸ“

πŸ“¦ where this page comes from