Yes but not by default.
C-lightning uses a pluggable Bitcoin backend. The default one,
bcli, will use the
bitcoin-cli executable to make requests to a
rpcconnect startup option to
lightningd which does not not support onion hosts. And you probably don’t want it to as it is not meant to be exposed.
If you want to run C-lightning without having the full block chain locally you’d probably opt for a light backend solution, such as:
- A pruned
bitcoind(beware of misconfiguration)
- An explorer-backed backend.
For example, the Sauron plugin which you could connect to an external
Esplora instance you would run on a machine with more space. It supports onion services.
If you really want to remotely access
bitcoind‘s RPC, you should probably opt for an SSH tunnel.