> For the complete documentation index, see [llms.txt](https://docs.sia.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sia.tech/provide-storage/setting-up-hostd/linux/debian.md).

# Debian

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 Debian versions:
  * Trixie (Debian 13)
  * Bookworm (Debian 12)
  * Bullseye (Debian 11)
* **System Updates:** Ensure that Debian 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/debian/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/debian $(. /etc/os-release && echo "$VERSION_CODENAME") main" | sudo tee /etc/apt/sources.list.d/siafoundation.list
sudo apt update
```

{% hint style="info" %}
If you use a derivative distro, such as Kali Linux, you may need to substitute the part of this command that prints the version codename with the corresponding Debian release:

```sh
$(. /etc/os-release && echo "$VERSION_CODENAME")
```

Replace this part with the codename of the corresponding Debian release, such as bookworm.
{% endhint %}

![](/files/umlysrAbmxzkEJODiBPG)

**2. Install `hostd`**

```sh
sudo apt install hostd
```

![](/files/Y2sK8ysEdb1YAYgIbGM5)

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

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

```sh
hostd version
```

![](/files/WGyywJ9M9bjRB3MhNvVX)

## 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 %}

![](/files/YceZ0IxXuDSUxy9QMkgg)

## 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
```

![](/files/qiqE2yqbPMlB4vuRDwGM)

## 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.

![](/files/0VbINMCISwGUI21nKiK9)

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sia.tech/provide-storage/setting-up-hostd/linux/debian.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
