user47827: If I wanted to move my c-lightning node to an other machine, is there a way to do that (and how)? Specifically, without changing my node key or closing my channels?
This question was asked by plant-boy on IRC.

user47827: This question was answered by Christian Decker on IRC.

Yes, it's a bit tricky, because you never want to start the old copy
once you started the new one, but absolutely doable. 1) stop the old
node, 2) rename the .lightning directory so you can't accidentally
restart the old node (maybe verify that starting will create a new
node), 3) copy the renamed .lightning to new host in the place where
you'll be running from, and 4) point lightningd to the copied
directory and start it.
I'd also delete any copy remaining on the old host for safety
(starting that one may lead to loss of funds). While you're at it,
make a backup of hsm_secret files in the directory (those are static
and safe to copy)


47827: <p>If I wanted to move my c-lightning node to an other machine, is there a way to do that (and how)? Specifically, without changing my node key or closing my channels?</p>
<p>This question was asked by plant-boy on IRC.</p>
 47827: <p>This question was answered by Christian Decker on IRC.</p>
<blockquote>
<p>Yes, it's a bit tricky, because you never want to start the old copy
once you started the new one, but absolutely doable. 1) stop the old
node, 2) rename the <code>.lightning</code> directory so you can't accidentally
restart the old node (maybe verify that starting will create a new
node), 3) copy the renamed <code>.lightning</code> to new host in the place where
you'll be running from, and 4) point lightningd to the copied
directory and start it.</p>
<p>I'd also delete any copy remaining on the old host for safety
(starting that one may lead to loss of funds). While you're at it,
make a backup of <code>hsm_secret</code> files in the directory (those are static
and safe to copy)</p>
</blockquote>
