1. Don’t run the webserver on your Lightning Node
I use the woocommerce plugin towards a lightning node that is running on another server. Between the webserver and the Lightning Node there is a firewall, making sure only the ports the webserver needs to be able to generate payment requests is open.
2. Make sure the credentials stored on the web server is as little as you need!
The above plugin supports using invoice macaroon. With this macaroon, you can only generate invoices and check if invoices are paid. This is all you need. You can’t perform any payments! This means any intruder basically will have enough information to make it possible for him to pay me. It’s my hope that he’d rather use my site to pay me.
For on-chain, all you need is the public key that makes it possible to generate new payment addresses and watch for payments. Security-wise, these two methods are very similar, but for Lightning Network, your web server will have to talk to your node, while on-chain payments will not.
3. Run your whole site on SSL and make non-SSL redirect to SSL automatically
This is pretty easy to achieve in most web servers. In apache, you’ll need to have a separate virtual host for non-SSL, and add:
Redirect / permanent https://random.engen.priv.no/
Do not add a document root for that virtual host, that’s not necessary.
4. Enable 2-factor authentication for your administration account(s).
Passwords are guessable. Passwords leak. Keyloggers exists. Don’t believe that you can be totally secure if you make your password good enough. 2FA is almost a must!
5. Keep wordpress and the plugins you use updated,
WordPress is very well-known software. Any vulnerabilities will be quickly scanned for. Even if they can’t steal your money if you follow the steps in 1 and 2, you still don’t want your site to be down or be used to attack others.