<p>Congratulations on getting your Lightning Node up! </p>

<p>To get your server's external IP, you could try the following command/service:</p>

<pre><code>$ curl -s http://whatismyip.akamai.com/
</code></pre>

<p>The response will be your external IP. For example <code>123.123.123.123</code>. </p>

<hr>

<p><strong>Example Configuration for C-Lightning</strong></p>

<p>Once you have the external IP, add it to the Lightning configuration. You can set the IP with the <code>ipaddr</code> command as follows:</p>

<pre><code>$ lightningd --ipaddr=123.123.123.123
</code></pre>

<p>Note: You may need to stop lightningd before making this change. </p>

<p>Additionally, you can set the 'ip' property in the <a href="https://github.com/ElementsProject/lightning#configuration-file" rel="nofollow noreferrer">'.lightning/config' file</a>. </p>

CC BY-SA 3.0
2018-04-19T05:46:22.667Z
Better to use a static IP or a hostname if you can.
surj
CC BY-SA 3.0
2018-04-19T19:30:53.643Z
Thanks, @surjikal. I completely agree, using a hostname provides coverage for a bunch of situations. However, I'm not sure that hostnames are currently supported. Are you able to confirm that hostnames work with C-Lightning?
A-Diddy
CC BY-SA 3.0
2018-04-19T23:51:43.560Z
I am not sure either, it would be cool but maybe there's some security issue with hostnames.. good question for IRC.
surj
CC BY-SA 3.0
2018-01-31T07:06:51.247Z
2018-02-14T22:42:14.273Z
2018-02-14T22:42:14.273Z
A-Diddy
<p>I want to give Ip address to my new node . I have got the pubkey for my node , on the lightning.exe application ,but could not set IP address to my node so that it can be seen publicly on the site "<a href="https://explorer.acinq.co/#/faq" rel="nofollow noreferrer">https://explorer.acinq.co/#/faq</a>". I have already created 4 channels also but need way to enter IP address.</p>

CC BY-SA 3.0
2018-01-31T06:51:18.687Z
You shouldn't spam with the same question. https://bitcoin.stackexchange.com/questions/69868/how-to-set-up-a-node-on-testnet-of-lightning-network-on-the-world-map
Roman Kiselenko
<bitcoin-core><bitcoind><bitcoin-cash><lightning-network>
How to give IP to my node on the Bitcoin Lightning Network
Mansi Gyastelwala
# How to give IP to my node on the Bitcoin Lightning Network

(Asked by: username_0 on 2018-01-31)

I want to give Ip address to my new node . I have got the pubkey for my node , on the lightning.exe application ,but could not set IP address to my node so that it can be seen publicly on the site "<https://explorer.acinq.co/#/faq>". I have already created 4 channels also but need way to enter IP address.

**Tags:** bitcoin-core, bitcoind, bitcoin-cash, lightning-network

> **Comments:**
> **username_1**: You shouldn't spam with the same question. https://bitcoin.stackexchange.com/questions/69868/how-to-set-up-a-node-on-testnet-of-lightning-network-on-the-world-map  

---

## 1 answers

### Answer by username_2 on 2018-01-31. Score: 0

Congratulations on getting your Lightning Node up!

To get your server's external IP, you could try the following command/service:

```
$ curl -s http://whatismyip.akamai.com/

```

The response will be your external IP. For example `123.123.123.123`.

---

**Example Configuration for C-Lightning**

Once you have the external IP, add it to the Lightning configuration. You can set the IP with the `ipaddr` command as follows:

```
$ lightningd --ipaddr=123.123.123.123

```

Note: You may need to stop lightningd before making this change.

Additionally, you can set the 'ip' property in the ['.lightning/config' file](https://github.com/ElementsProject/lightning#configuration-file).

> **Comments:**
> **username_3**: Better to use a static IP or a hostname if you can.  
> **username_2**: Thanks, @surjikal. I completely agree, using a hostname provides coverage for a bunch of situations. However, I'm not sure that hostnames are currently supported. Are you able to confirm that hostnames work with C-Lightning?  
> **username_3**: I am not sure either, it would be cool but maybe there's some security issue with hostnames.. good question for IRC.  

---

