# Advice needed regarding Hugo Dev environment on Mac

**URL:** <https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156>\
**Category:** support\
**Created:** [January 23, 2018, 2:00pm UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156 "2018-01-23T14:00:41Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [January 23, 2018, 2:00pm UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/1 "2018-01-23T14:00:41Z")

</div>

I am in a very difficult situation at the moment. My internal SSD died suddenly and I lost my Ubuntu installation. And non backed up work. But nothing that I cannot redo.

I am seriously thinking about purchasing a Macbook Air 2017.

But I don’t have the time to research this properly in the Hugo Docs etc (as I have a very tight deadline and I need to redo a project I lost).

My questions are these:

What is the best way to install Hugo on a Mac? Is the package from Homebrew the latest? What is the updating process? Manual or automatic?

Also I need Git and the Lets Encrypt manual certbot. How do you set up these on the Mac?

(No need for a lengthy description if you could point me to a link that would be enough.)

Any answers will be very appreciated. Obviously I will not be around in the forum while I try to sort out this mess I’m in.

---

<div class="post-metadata">

**Author:** ![Leo\_Merkel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/leo_merkel/32/3321_2.png) [@Leo\_Merkel](https://discourse.gohugo.io/u/Leo_Merkel)\
**Post date:** [January 23, 2018, 2:14pm UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/2 "2018-01-23T14:14:14Z")

</div>

I develop with Hugo on an iMac and MacBook Pro (which is no difference to MacBook Air regarding macOS) under macOS High Sierra. No problems at all.

Just open Terminal on MacBook and install Hugo with `brew install hugo`. That’s the best way because when there are updates available, Homebrew takes care. The update today was on Homebrew just 1 or 2 hours after the announcement here.

You’ll set up Git the same way as above. I use Let’s Encrypt as well. They have very good documentation on their site with regards to setup.

That’s basically it.

BTW: If you’re considerung a MacBook 2017 model look at Apples refurbished Products: [https://www.apple.com/shop/browse/home/specialdeals/mac/macbook](https://www.apple.com/shop/browse/home/specialdeals/mac/macbook)

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [January 23, 2018, 4:14pm UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/3 "2018-01-23T16:14:59Z")

</div>

I have developed on a 13 inch MacBook Retina for the last 3 years or so. Before that I was Linux and in general took whatever the clients offered me (Windows, usually). This MacBook has the right balance, and I would probably pick this over the lighter air. Apple has been messing with the ports on it lately (removed the camera card slot etc.), and I’m happy I have two “old” 2015 variants.

---

<div class="post-metadata">

**Author:** ![joelfischerr](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@joelfischerr](https://discourse.gohugo.io/u/joelfischerr)\
**Post date:** [January 23, 2018, 4:15pm UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/4 "2018-01-23T16:15:09Z")

</div>

> [@Leo\_Merkel](#):
>
> Just open Terminal on MacBook and install Hugo with brew install hugo. That’s the best way because when there are updates available, Homebrew takes care.

just a heads up: homebrew does not do automatic updates, you’ll have to run brew update to download (not install) the newest updates. But updating with homebrew is rather easy: [Radar – O’Reilly](https://www.safaribooksonline.com/blog/2014/03/18/keeping-homebrew-date/)

But working with hugo is just fine on macOS.

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [January 23, 2018, 4:45pm UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/5 "2018-01-23T16:45:11Z")

</div>

I loved Gnome and lately it was very stable.

But the problem with Ubuntu is that system updates cause regressions more often than I liked and a hard shutdown with Alt + Sysreq + o was the only way out from a system freeze.

I have reason to believe that these shutdowns in the period of a year and a half caused electrical damage to my SSD, that added up until it failed me completely with no warning.

I wish I could afford a Macbook Pro but it’s out of the question. In Greece the 13’’ model with 256 GB costs around 2650 euros. So the Air is my only option. And I need something new and not a refurbished or an older model, because I am not willing to take that risk.

I will use the Macbook Air for Hugo and general frontend development only. The laptop I have now is already back to Windows 7 for my graphic design work.

But I really don’t want to install Windows 10 with the Linux subsystem. I had enough of Windows. And web development with that OS feels convoluted.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [January 23, 2018, 4:54pm UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/6 "2018-01-23T16:54:54Z")

</div>

> [@alexandros](#):
>
> In Greece the 13’’ model with 256 GB costs around 2650 euros

That is crazy …

I bought the 128 GB version … But last week I switched the SSD with a new Samsung NVMe 250 GB for about 130 euros (had to get an adapter from Singapore).

Really fast:

 ![before-after](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/2X/b/b4620678b8ef5361d02d7f2374a2ceee0581eb11.jpg)

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [January 23, 2018, 5:24pm UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/7 "2018-01-23T17:24:43Z")

</div>

It is crazy. We have 24% VAT. And we cannot buy computers from abroad because we have capital controls… Anyway thank you for your replies.

---

<div class="post-metadata">

**Author:** ![joelfischerr](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@joelfischerr](https://discourse.gohugo.io/u/joelfischerr)\
**Post date:** [January 23, 2018, 5:26pm UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/8 "2018-01-23T17:26:31Z")

</div>

> [@alexandros](#):
>
> And I need something new and not a refurbished or an older model, because I am not willing to take that risk.

Refurbished models generally have the same warranty as the new ones, if you’re buying them from Apple. And it’s possible to extend the warranty with Apple.

---

<div class="post-metadata">

**Author:** ![Leo\_Merkel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/leo_merkel/32/3321_2.png) [@Leo\_Merkel](https://discourse.gohugo.io/u/Leo_Merkel)\
**Post date:** [January 23, 2018, 5:59pm UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/9 "2018-01-23T17:59:25Z")

</div>

> [@joelfischerr](#):
>
> homebrew does not do automatic updates

That’s true. But the beauty of macOS is that Automator is part of the OS. And I have a task which starts every morning to update the brew installs (`brew update`, `brew upgrade`, `brew cleanup` and `brew doctor`).

---

<div class="post-metadata">

**Author:** ![Leo\_Merkel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/leo_merkel/32/3321_2.png) [@Leo\_Merkel](https://discourse.gohugo.io/u/Leo_Merkel)\
**Post date:** [January 23, 2018, 6:02pm UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/10 "2018-01-23T18:02:53Z")

</div>

> [@alexandros](#):
>
> And I need something new and not a refurbished or an older model, because I am not willing to take that risk.

No risk at all. I only buy those. Example: I purchased a refurbished MacBook Pro 15" in mid 2010 with extended warranty which was around 2.000€ and sold it last year for 600€. Same with my iMac from 2011. Bought a refurbished one last year and sold the “old” one for good money.

---

<div class="post-metadata">

**Author:** ![jgreely](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jgreely/32/6796_2.png) [@jgreely](https://discourse.gohugo.io/u/jgreely)\
**Post date:** [January 24, 2018, 1:43am UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/11 "2018-01-24T01:43:37Z")

</div>

> [@Leo\_Merkel](#):
>
> No risk at all.

Seconded. Refurbs purchased directly from Apple go through a better QA process than their brand-new products.

-j

---

<div class="post-metadata">

**Author:** ![RickCogley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rickcogley/32/10269_2.png) [@RickCogley](https://discourse.gohugo.io/u/RickCogley)\
**Post date:** [January 24, 2018, 2:52am UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/12 "2018-01-24T02:52:35Z")

</div>

Unsolicited tips coming at you. Macs use the command `defaults write` or `defaults read` to write and read from the Terminal. When you set up your system, you might want to look into scripts like this, and cherry pick some settings:

> <https://github.com/mathiasbynens/dotfiles/blob/master/.macos>

I use `brew` and `brew cask` for a lot of install work, the former for Terminal-only stuff and the latter for GUI. This is irrelevant now, but maybe relevant if you keep using a Mac. You can do `brew bundle dump` to make a so-called brewfile, which can be moved to a new Mac, after which you can then do `brew bundle` to reinstall stuff.

I update my `brew` with a zsh alias:

```
 alias brewhaha='echo "Updating brew various...";brew update && brew upgrade; brew cleanup; brew cask cleanup; brew doctor'

```

Brew lets you load the bleeding edge by using the `—HEAD` option. My zsh function for a couple apps I like to keep at their freshest:

```auto
brew_reinstall_head_apps (){
    brew reinstall --HEAD neovim
    brew reinstall --HEAD fzf
    brew reinstall --HEAD tmux
}

```

The Mac App Store is convenient for installing various things but, those apps have some kind of security limitations (some sort of sandboxing or APIs that they can’t use). Some devs have stopped selling via the App Store for that reason, so, there are apps out there with both an App Store version and a “direct” version. I go for the direct version when I can, since it means a little more money for the dev, and, there’s usually some feature that is nice to have, which wouldn’t be available in the App Store version due to the security constraints.

It’s irritating that I cannot do everything via brew, but, Apple insists on certain utils being installed by XCODE, so, I always install that, run the GUI version and accept its license, and then run:

```
xcode-select --install

```

That installs the command line utils from XCODE.

Some Apps I like:

- Maintain’s Cocktail - regular maintenance and access to various settings.
- Lingon X - for controlling launchd (macOS’s “init”)
- iTerm2 v3 - Terminal replacement
- Path Finder - Finder replacement
- ImageOptim - free image optimization
- Knox - creates secure encrypted disk images that you password protect. You can do this for free with `diskutil` though.
- GPG Suite - [gpgtools.org](http://gpgtools.org)
- FontExplorer X Pro - font organization, a Font Book replacement
- Little Snitch - see (and/or block) what is connecting to you or, what you are connecting to
- Bartender - control the icons on the icon bar
- Typinator - automatically insert text snippets (e.g. type “lipsum” and get a Lorem Ipsum block)
- Hazel - control your trash (installs in System Prefs as a panel)
- Popclip - [https://pilotmoon.com/popclip/](https://pilotmoon.com/popclip/) - sometimes useful but it can be invasive
- Apps from Affinity - photoshop and illustrator replacements for a fixed price
- Photo Mechanic - for ingesting and assigning photo metadata automatically (lately I’m avoiding using Photos, which scarily bundles everything into a fragile “library”)
- App Cleaner - to really delete an app and all the various files it creates
- SmartGit - a nice git GUI
- apps from Rogue Ameba - for audio recording & editing
- Screen Flow - screen cast creation (you can do this with the included QuickTime)
- Carbon Copy Cloner - for making a hard disk block-level backup
- Napkin - screen shot annotation (you can annotate a bit with the included Preview)

Lastly, check out the little apps in `/Applications/Utilities` and `/System/Library/CoreServices/Applications`, and, Automator, which is Apple’s venerable automation solution. There are a number of nice goodies that come with macOS.

There’s so much more so don’t hesitate to ask. If I know of something useful I’ll share it.

Edit:

- also, Codebook from Zetetic [https://www.zetetic.net/codebook/](https://www.zetetic.net/codebook/). It’s a password manager, that has a nice way to paste passwords into not only websites but also apps or the Terminal.

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [January 24, 2018, 5:45am UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/13 "2018-01-24T05:45:28Z")

</div>

Thanks for the advice @RickCogley Much appreciated! 🍀

---

<div class="post-metadata">

**Author:** ![adrinux](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/adrinux/32/46_2.png) [@adrinux](https://discourse.gohugo.io/u/adrinux)\
**Post date:** [January 26, 2018, 3:49pm UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/14 "2018-01-26T15:49:13Z")

</div>

Call me old fashioned but I just download the binary, stick it in ‘/usr/local/bin’, set the ownership and perms and rename it to ‘hugo’. Hugo doesn’t update _that_ often. Also avoids hassle mid project when a feature is deprecated.

tl:dr you can make installation as complicated as you want 🙂

---

<div class="post-metadata">

**Author:** ![RickCogley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rickcogley/32/10269_2.png) [@RickCogley](https://discourse.gohugo.io/u/RickCogley)\
**Post date:** [February 4, 2018, 12:16am UTC](https://discourse.gohugo.io/t/advice-needed-regarding-hugo-dev-environment-on-mac/10156/15 "2018-02-04T00:16:00Z")

</div>

By the way @alexandros, I remembered when you use `rsync` on Mac, you need to specify `--iconv` like this:

> <https://github.com/RickCogley/dotfiles/blob/master/zsh/zshrc#L143>

That’s either from the Mac to \*nix, or from \*nix to the Mac. It takes care of any character conversions needed and has worked for me for quite a while.
