# Docker

This guide will walk you through setting up `walletd` using Docker compose. At the end of this guide, you should have the following:

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

***

## Pre-requisites

To run `walletd` with Docker Compose, your system should meet the following specifications:

* **Software Requirements:** Before installing `walletd`, you will need to install [Docker](https://www.docker.com/get-started/).
* **Hardware Requirements:** A stable setup that meets the following specifications is recommended.
  * A quad-core CPU
  * 8GB of RAM
  * 256 GB SSD for `walletd`
* **Network Access:** `walletd` interacts with the Sia network, so you need a stable internet connection and open network access to connect to the Sia blockchain.

## Create the compose file

Create a new file named `docker-compose.yml`. You can use the following as a template. The `/data` mount is where consensus data is stored and is required.

```yml
services:
  walletd:
    container_name: walletd
    image: ghcr.io/siafoundation/walletd:latest
    restart: unless-stopped
    ports:
      - 127.0.0.1:9980:9980/tcp
      - 9981:9981/tcp
    volumes:
      - walletd-data:/data

volumes:
  walletd-data:
```

{% hint style="warning" %}
Be careful with port 9980 as Docker will expose it publicly by default. It is recommended to bind it to 127.0.0.1 to prevent unauthorized access. If you need to expose it to a LAN, ensure the port is not accessible publicly.
{% endhint %}

## Getting the `walletd` image

To get the latest `walletd` image run the following command:

```
docker compose pull
```

![](/files/SD9X76UOUEmTlzrzYCJ5)

## Configuring `walletd`

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

```console
docker compose run --rm -it walletd config
```

![](/files/zrJhqx2RoxUp0VYHzb8p)

When the configuration wizard loads, you will be asked to verify the location of your data directory. Type `no` to keep the default.

![](/files/etOtEok2r9I5hoGuKPuh)

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

![](/files/ZMHwhd7NbtGmv8XICmzE)

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

![](/files/UA0gDGaq5XgwAItQ6UG4)

## Running `walletd`

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

```console
docker compose up -d
```

![](/files/GGqa9dVHp9lU0nOPsFfw)

Once `walletd` has successfully started, you can access the web UI by opening your browser and going to [http://localhost:9980](http://localhost:9980/).

![](/files/YTECKkThitPFajgTYlXF)

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

## Checking the container status

To check the status of the container run:

```
docker ps -a
```

If the container is not running, it will show in the `STATUS` column

![](/files/7D7S7zRgWMdp7pKTYTFn)

## Checking the logs

To check the container logs run:

```
docker compose logs walletd
```

![](/files/BVGihS53v9rxgf7qP2xQ)

## Upgrading `walletd`

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

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

```console
docker compose pull && docker compose up -d
```

![](/files/Xj11ZlCcdr5KfVnDWStO)

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


---

# Agent Instructions: 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/wallet/setting-up-walletd/docker.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.
