> For the complete documentation index, see [llms.txt](https://electrum-docs.gitbook.io/electrum-bitcoin-wallet-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://electrum-docs.gitbook.io/electrum-bitcoin-wallet-documentation/daemon-and-command-line/setting-up-a-watchtower.md).

# Setting Up a Watchtower

This tutorial will show you how to configure your Electrum daemon as a watchtower for your lightning wallet. It is written for Electrum 4.0.

A watchtower is a separate Electrum process, that runs on another computer. To setup a watchtower, you need to configure an Electrum daemon, and enter its URL in your preferences.

### How to configure a watchtower

You want to run your watchtower on a machine that is regularly connected to the internet.

First install Electrum, and add a SSL certificate to your Electrum configuration:

```
electrum -o setconfig ssl_keyfile /path/to/ssl/privkey.pem
electrum -o setconfig ssl_certfile /path/to/ssl/fullchain.pem
```

For details see How to add SSL

Second, configure your watchtower with an address, username and password:

```
electrum setconfig -o run_watchtower true
electrum setconfig -o watchtower_user myusername
electrum setconfig -o watchtower_password mypassword
electrum setconfig -o watchtower_address example.com:12345
```

Then start the daemon:

```
electrum daemon -d
```

The watchtower database contains presigned transactions, and is in \~/.electrum/watchtower\_db

Note that the daemon does not need to contain a wallet, nor to have Lightning enabled; the watchtower is only about watching onchain addresses and broadcasting onchain transactions.

If you run Electrum’s Qt GUI on the machine that is configured as a watchtower, you can view the database size and number of transactions per channel if you open the watchtower window:

<figure><img src="https://184681609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQkdBWqsJGCoQg6fcwFWU%2Fuploads%2FVRZWezLDL2oxDZQCmuHE%2Fimage.png?alt=media&amp;token=f619d15b-14f8-4830-a69c-29984c3d26ef" alt=""><figcaption></figcaption></figure>

### Configure the watchtower in your client

In your client preferences, tick ‘use a remote watchtower’ and enter the url:

```
https://myusername:mypassword@example.com:12345
```
