In this guide, I’ll take you through the steps to install and use Hugo on Ubuntu 18.04 / Debian 10 Desktop and Server editions. Hugo has been confirmed to be the fastest open-source static site generator written in Go. Hugo is capable of generating a static site at a speed of <1 ms per page, the average site builds in less than a second. It ships with pre-made templates to make quick work of SEO, commenting, analytics and other functions.

hugo site generator

Hugo supports unlimited content types, taxonomies, menus, dynamic API-driven content, and more, all without plugins. Additionally, you can output your content in multiple formats, including JSON or AMP

Install Hugo On Ubuntu 18.04 / Debian 10

Hugo can be installed on Ubuntu 18.04 / Debian 10 by downloading a .deb package or from apt repository.

Installing Hugo On Ubuntu 18.04 / Debian 10 from apt repository

Update your system apt index and install Hugo:

sudo apt update
sudo apt -y install hugo

You can confirm the location of hugo binary after installation using which

$ which hugo

Installing Hugo On Ubuntu 18.04 / Debian 10 from .deb package

To install Hugo on Ubuntu 18.04 / Debian 10 from Debian package, first, download the latest release from Github releases page Select a version that matches your CPU architecture:

curl -s \
 | grep  browser_download_url \
 | grep Linux-64bit.deb \
 | grep -v extended \
 | cut -d '"' -f 4 \
 | wget -i -

Then install the package using:

$ sudo dpkg -i hugo*_Linux-64bit.deb
 Selecting previously unselected package hugo.
 (Reading database … 187292 files and directories currently installed.)
 Preparing to unpack hugo_0.58.3_Linux-64bit.deb …
 Unpacking hugo (0.58.3) …
 Setting up hugo (0.58.3) …

If the installation was successful, you should be able to use hugo command:

$ hugo --help

Use Hugo on Ubuntu 18.04 / Debian 10 Linux

Now that Hugo is installed, you can start creating website content. Before that, you’ll need to create new content for your site. In this example, my site is called

$ hugo new site
Congratulations! Your new Hugo site is created in /home/jmutai/

Just a few more steps and you're ready to go:

1. Download a theme into the same-named folder.
   Choose a theme from, or
   create your own with the "hugo new theme " command.
2. Perhaps you want to add some content. You can add single files
   with "hugo new /.".
3. Start the built-in live server via "hugo server".

Visit for quickstart guide and full documentation.

To create a test page, cd to site directory and use



$ cd
$ ls
archetypes config.toml content data layouts static themes

Site content is placed inside content directory

$ hugo new posts/
/home/jmutai/ created

Add dummy content for test:

$ vim content/posts/


title: "Test Page"
date: 2018-07-12T10:17:29Z
draft: true

# Hello World

This is my first hugo site, wooo!!

if [[ $hugo_install == "success" ]]; then
  echo "Happy me"


Build site:

$ hugo

                   | EN  
  Pages            |  3  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     |  0  
  Processed images |  0  
  Aliases          |  0  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 9 ms

This will create public folder and add content to it. To serve website using hugo build-in server, use:

$ hugo server

                   | EN  
  Pages            |  3  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     |  0  
  Processed images |  0  
  Aliases          |  0  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 10 ms
Watching for changes in /root/{content,data,layouts,static}
Watching for config changes in /root/
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address
Press Ctrl+C to stop

For self hosting on a web server like Nginx or Apache, copy content inside public directory to your Web server document root.

Also check:

Install and Configure Drupal with Apache on CentOS 8

Install Drupal on Debian 10 (Buster) Linux

How to Install Jekyll on Ubuntu 18.04

How to Install and configure Ghost CMS on Ubuntu 16.04 / Debian 9

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here