# Operation on Docker

{% hint style="info" %}
The [Releases](https://github.com/Titannet-dao/titan-node/releases) section on our GitHub is the best place to get the latest binary releases and view the source code.
{% endhint %}

{% hint style="danger" %}
**🚨Important Note🚨**

If you have participated in Herschel testnet earlier, you need to mannually clear previous node data. Otherwise the node will not be able to start. 🚨
{% endhint %}

```bash
rm -r ~/.titanedge
```

If you have never operated Titan node before, just follow the steps below.

## Step 1: Download the image

```
docker pull nezha123/titan-edge
```

## Step 2: Create your own storage volume

```
mkdir ~/.titanedge
```

<mark style="color:red;">`$storage`</mark> <mark style="color:red;"></mark><mark style="color:red;">is the storage path you want to configure.</mark>

## Step 3: Run the application

```
docker run --network=host -d -v ~/.titanedge:/root/.titanedge nezha123/titan-edge
```

## Step 4: [Bind the identification code](https://app.gitbook.com/o/asXLGZ9srI9ohwLLgXoB/s/6MWUoQBijnrc0tNWtAzG/~/changes/47/cassini-testnet/frequently-asked-questions/bind-the-identity-code)

```
docker run --rm -it -v ~/.titanedge:/root/.titanedge nezha123/titan-edge bind --hash=your-hash-here https://api-test1.container1.titannet.io/api/v2/device/binding
```

### Docker Tutorial: Impact and Handling of NAT Types When Running Docker on Machines with Public IP Addresses

#### Impact Description:

Operating Docker on machines with a public IP can result in a Nonat NAT type. This may hinder the capability to run multiple Docker instances. To mitigate this, consider the following steps.

#### Handling Methods:

#### 1. Removing Network Host Mode:

By default, using `--network=host` integrates the container directly with the host's network, leading to a Nonat NAT type. You can avoid this issue by removing this parameter, which restores the NAT type to its previous state.

#### 2. Modify Port Configuration:

To maintain use of a public IP, manually adjust the default port, changing it from 1234 to another suitable for your network setup.

#### Considerations:

* Before executing commands, ensure your network settings or port configurations are appropriately adjusted.&#x20;
* Post-adjustment, validate that the Docker container's performance aligns with expectations.


---

# 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://titannet.gitbook.io/titan-network-en/resource-network-test/operate-nodes/l2-edge-node/installation-and-earnings/operation-on-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.
