# Ubuntu

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

* Installed the `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:

* **Operating System Compatibility:** `hostd` is supported on the following Ubuntu versions:
  * Plucky (Ubuntu 25.04)
  * Noble (Ubuntu 24.04)
  * Jammy (Ubuntu 22.04)
* **System Updates:** Ensure that ubuntu 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.

## Adjust sysctl (OPTIONAL)

These changes to sysctl are optional and may increase performance

```sh
echo "net.core.rmem_max=7500000
net.core.wmem_max=7500000
net.ipv4.tcp_congestion_control = bbr
net.core.default_qdisc = pfifo_fast
net.ipv4.tcp_shrink_window = 1" | sudo tee /etc/sysctl.d/50-hostd.conf
sudo sysctl --system
```

## Install `hostd` Using the `apt` repository

Before you install `hostd` for the first time on a new machine, you need to set up the Sia `apt` repository. Afterward, you can install and update `hostd` using `apt`.

{% hint style="warning" %}
Your system will need to have `curl` installed as well. You can check if it is installed by running `curl --version`. If it is not installed, you can install it by running `sudo apt update && sudo apt install curl`
{% endhint %}

**1. Set up the Sia `apt` repository by copying and pasting the following commands into your terminal:**

```sh
sudo curl -fsSL https://linux.sia.tech/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/siafoundation.gpg
sudo chmod 644 /usr/share/keyrings/siafoundation.gpg
echo "deb [signed-by=/usr/share/keyrings/siafoundation.gpg] https://linux.sia.tech/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") main" | sudo tee /etc/apt/sources.list.d/siafoundation.list
sudo apt update
```

![](https://3679771871-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6w9fYqdazlo30V4aFg36%2Fuploads%2Fgit-blob-ff62d8fee31890a52cfba7bdcb8bc0ca42d59d81%2F01-renterd-ubuntu-apt-repo.png?alt=media)

**2. Install `hostd`**

```sh
sudo apt install hostd
```

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

**3. Verify `hostd` was installed successfully**

Run the following command to see the version of `hostd` that was installed:

```sh
hostd version
```

## Configure `hostd`

After installing `hostd`, you will need to configure it with a wallet seed and a password to unlock the web interface. There is an interactive configuration process that you can start by running the following command.

```sh
sudo hostd config
```

This will start an interactive configuration process. You will be asked to generate or recover a wallet seed and set a password to unlock the web interface.

{% hint style="info" %}
You will not see anything when you type in your seed phrase or unlock password. Press enter after typing each one.
{% endhint %}

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

## Start `hostd`

Now that you have installed and configured `hostd`, you can start it by running the following command:

```sh
sudo systemctl enable --now hostd
```

## Verify `hostd` has started successfully

Run the following command to verify the `hostd` service has started successfully:

```sh
sudo systemctl status hostd
```

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

## Updating `hostd`

New versions of `hostd` are released regularly and contain bug fixes and performance improvements.

**To update:**

1. Stop the `hostd` service.

```sh
sudo systemctl stop hostd
```

2. Upgrade `hostd` using the `apt` package manager.

```sh
sudo apt update
sudo apt upgrade hostd
```

3. Start `hostd` service.

```sh
sudo systemctl start hostd
```

## Next Steps

Now that you have `hostd` installed and running, you can start using it to store and retrieve data on the Sia network. You can access the web interface by navigating to <http://127.0.0.1:9980> in your web browser. If you installed `hostd` on a remote machine or a server, you will need to create an SSH tunnel to access the web interface.

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

* [About Hosting on Sia](https://docs.sia.tech/provide-storage/about-hosting-on-sia)
* [Adding Storage to `hostd`](https://docs.sia.tech/provide-storage/adding-storage)
* [Announcing Your Host to the Sia Network](https://docs.sia.tech/provide-storage/announcing-your-host)
* [Transferring Siacoins to Your Host Wallet](https://docs.sia.tech/provide-storage/transferring-siacoins)
