# IPFS connection for distributed file sharing

1\. **Register your node in IPFS routing.**

```bash
ipfs register
```

<mark style="color:purple;">**OUTPUT**</mark>

{% code overflow="wrap" %}

```bash
info: Registered IPFSaddress: /ip4/127.0.0.1/udp/4001/quic/p2p/12D3KooWJPbNGRYfSJu9tQTrwMkHu6uMqC39K6qza8CzZAeaHPBw
```

{% endcode %}

**2. Check your IPFS ID.**

```bash
ipfs id
```

<mark style="color:purple;">**OUTPUT**</mark>

```bash
{
id: '12D3KooWJPbNGRYfSJu9tQTrwMkHu6uMqC39K6qza8CzZAeaHPBw',
publicKey: 'CAESIH9glfxqooHKY9DvAFPehbWQCrbx8OZfKZwZHYFhPAiC',
addresses: [
'/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWJPbNGRYfSJu9tQTrwMkHu6uMqC39K6qza8CzZAeaHPBw',
'/ip4/127.0.0.1/udp/4001/quic/p2p/12D3KooWJPbNGRYfSJu9tQTrwMkHu6uMqC39K6qza8CzZAeaHPBw',
'/ip4/192.168.65.3/tcp/4001/p2p/12D3KooWJPbNGRYfSJu9tQTrwMkHu6uMqC39K6qza8CzZAeaHPBw',
'/ip4/192.168.65.3/udp/4001/quic/p2p/12D3KooWJPbNGRYfSJu9tQTrwMkHu6uMqC39K6qza8CzZAeaHPBw',
'/ip4/201.190.254.216/udp/55467/quic/p2p/12D3KooWJPbNGRYfSJu9tQTrwMkHu6uMqC39K6qza8CzZAeaHPBw',
'/ip6/::1/tcp/4001/p2p/12D3KooWJPbNGRYfSJu9tQTrwMkHu6uMqC39K6qza8CzZAeaHPBw',
'/ip6/::1/udp/4001/quic/p2p/12D3KooWJPbNGRYfSJu9tQTrwMkHu6uMqC39K6qza8CzZAeaHPBw'
],
agentVersion: 'go-ipfs/0.7.0/',
protocolVersion: 'ipfs/0.1.0'
}
```

**3. Connect with other node.**

```bash
ipfs connect 12D3KooWKkvP2Si6nUQSmkNKELTe1TZfoa5t7yesM5u45QpFtvfT
```

<mark style="color:purple;">**OUTPUT**</mark>

Note: Look for the "successfully " line.

{% code overflow="wrap" %}

```bash
[05-12 14:16:59] info: Successfully connected to /ip4/165.227.144.202/tcp/4001/ipfs/QmSRg4CQN4aSTKDahNSjwE2BnMRjZkthS5mdmcnau85FM5.
...
```

{% endcode %}


---

# 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.truebit.io/v1docs/getting-started/ipfs-connection-for-distributed-file-sharing.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.
