# macOS

This guide will walk you through setting up `hostd` on macOS. At the end of this guide, you should have the following:

* Installed Sia `hostd` software
* Created a `hostd` wallet

***

## Pre-requisites

To ensure you will not run into any issues with running `hostd` it is recommended your system meets the following requirements:

* **System Updates:** Ensure that your macOS version is up to date with the latest system updates. These updates can contain important security fixes and improvements.
* **Hardware Requirements:** A stable setup that meets the following specifications is recommended. Not meeting these requirements may result in fewer contracts from renters or the loss of collateral.
  * A quad-core CPU
  * 8GB of RAM
  * 256 GB SSD for `hostd`
    * 10 GB per 1 TB hosted for database storage
  * At least 4TB of HDD storage for renter data
* **Network Access:** `hostd` requires a stable internet connection and open network access to store and retrieve data on the Sia network.
* **Software Requirements:** Before installing `hostd`, you will need to install the [Homebrew](https://brew.sh) package manager. This will allow you to install and upgrade `hostd` easily.

## Installing `hostd`

Press `CMD + Space` to open Spotlight search and open a `terminal`.

![](https://3679771871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6w9fYqdazlo30V4aFg36%2Fuploads%2Fgit-blob-b088aa30c0a9f0518900560d53deecd9d1acba2e%2F00-hostd-open-terminal%20\(1\).png?alt=media)

{% hint style="warning" %}
Before you install `hostd`, make sure you have the [Homebrew](https://brew.sh) package manager installed.
{% endhint %}

Once the Terminal loads, use `brew` to install `hostd`:

```console
brew install siafoundation/sia/hostd
```

![](https://3679771871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6w9fYqdazlo30V4aFg36%2Fuploads%2Fgit-blob-c0cbc7aaf6e7645df186d69ad9fa8a21f42e823d%2F01-hostd-brew-install.png?alt=media)

To confirm `hostd` has been installed, run the following:

```console
hostd version
```

![](https://3679771871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6w9fYqdazlo30V4aFg36%2Fuploads%2Fgit-blob-986c6533a9a48e458d128086b088e920f7b2e382%2Fhostd_version.gif?alt=media)

## Configuring `hostd`

Now that you have `hostd` installed, you will need to create a seed phrase and admin password. To launch the built-in configuration wizard, run the following:

```console
hostd config
```

When the configuration wizard loads, you will be asked to verify the location of your data directory. If you would like to change this, you can do so now. Otherwise, type `no` to keep the default.

![](https://3679771871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6w9fYqdazlo30V4aFg36%2Fuploads%2Fgit-blob-1b1eef0497bfc50f4c69607bb9af2008e1c035f6%2Fhostd_config.gif?alt=media)

Next, you will be asked to enter a seed phrase. If you already have one that you would like to use, you can enter it now. Otherwise, you can type `seed` to generate a new one. For the purpose of this guide, we will generate a new seed.

![](https://3679771871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6w9fYqdazlo30V4aFg36%2Fuploads%2Fgit-blob-23ef3543e6fa28781bcb915ea40d920adb094d1f%2F03-hostd-generate-seed.png?alt=media)

Next, you will be prompted to enter an admin password. This is used to unlock the `hostd` web UI.

![](https://3679771871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6w9fYqdazlo30V4aFg36%2Fuploads%2Fgit-blob-ec15c7f299574c52b84b646fd352fd17c9b5c5c9%2F04-hostd-admin-password.png?alt=media)

Finally, you will be asked if you want to configure advanced settings for `hostd`. Type `no` and hit enter to exit the configuration wizard.

![](https://3679771871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6w9fYqdazlo30V4aFg36%2Fuploads%2Fgit-blob-6d36c5a7e7fd451cc7e43ae36a742e3c1397a25d%2F05-hostd-advanced-settings.png?alt=media)

## Running `hostd`

Now that you have `hostd` successfully installed and configured, it is time to run it. Use the following command to start `hostd`:

```console
hostd
```

![](https://3679771871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6w9fYqdazlo30V4aFg36%2Fuploads%2Fgit-blob-245e39e67fdda06e7f4dc8873f95b492714f164c%2F06-hostd-startup.png?alt=media)

Once `hostd` has successfully started, the web UI should automatically open in your web browser.

{% hint style="info" %}
If the `hostd` web UI does not open. You can access it by opening your browser and going to [http://localhost:9980](http://localhost:9980/).
{% endhint %}

![](https://3679771871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6w9fYqdazlo30V4aFg36%2Fuploads%2Fgit-blob-9109bcdf8a629a69696592e04843a0b8ab338d0b%2F07-hostd-webui.png?alt=media)

{% hint style="success" %}
Congratulations, you have successfully set up `hostd`.
{% endhint %}

## Upgrading `hostd`

It is essential to keep your host up to date. New versions of `hostd` are released regularly and contain bug fixes and performance improvements.

To upgrade your `hostd` to the newest version, make sure you have shut down `hostd` and then run the following:

```console
brew upgrade siafoundation/sia/hostd
```

![](https://3679771871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6w9fYqdazlo30V4aFg36%2Fuploads%2Fgit-blob-891acd82f79b60a65fd586f4a170f2d39dced3ee%2F08-hostd-upgrade.png?alt=media)

You can confirm you have upgraded to the latest version using the following command:

```console
hostd version
```

![](https://3679771871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6w9fYqdazlo30V4aFg36%2Fuploads%2Fgit-blob-1e396545743363e99be73f4d3405401424d2c238%2F09-hostd-version.png?alt=media)

{% hint style="success" %}
Congratulations, you have successfully updated your version of `hostd`!
{% endhint %}
