<p>In C-Lightning it is fairly easy. Just shutdown the server and make a full backup of the <code>~/.lightning</code> folder. This folder contains in particular the HSM secret which is used for key derivation of later keys and it also has the sqlite3 database which is used to store all current states. This means that there is no need to close channels or anything.</p>

CC BY-SA 4.0
2018-08-12T09:27:19.077Z
2019-04-19T03:54:32.493Z
2019-04-19T03:54:32.493Z
Rene Pickhardt
<p>I am wondering what steps to take to migrate a lighting node to a different server, keeping the pubkey/identity. The safest option is obviously to close the channels first. How is the identitiy pubkey created? From the 24 seed, random, or other means?
In case I want to tranfer the node with opened channels, which files would I have to make sure to backup / transmit?</p>

CC BY-SA 4.0
2018-08-12T09:25:35.967Z
which lightning implmentation are you talking about?
Rene Pickhardt
<lightning-network><nodes><backup>
How to migrate lightning nodes?
S van Staa
# How to migrate lightning nodes?

(Asked by: username_0 on 2018-07-21)

I am wondering what steps to take to migrate a lighting node to a different server, keeping the pubkey/identity. The safest option is obviously to close the channels first. How is the identitiy pubkey created? From the 24 seed, random, or other means?
In case I want to tranfer the node with opened channels, which files would I have to make sure to backup / transmit?

**Tags:** lightning-network, nodes, backup

> **Comments:**
> **username_1**: which lightning implmentation are you talking about?  

---

## 1 answers

### Answer by username_1 on 2018-08-12. Score: 1

In C-Lightning it is fairly easy. Just shutdown the server and make a full backup of the `~/.lightning` folder. This folder contains in particular the HSM secret which is used for key derivation of later keys and it also has the sqlite3 database which is used to store all current states. This means that there is no need to close channels or anything.


---

