you can run lightningd --help and get a list of arguments you can use to start lightning from the output there ist:
--lightning-dir=<dir> Set working directory. All other files are
relative to this
(default: "/home/user/.lightning")
this means that you can set your own lightning-dir by calling lightningd --lightning-dir=/some/path/to/some/directory
now you can either put all the config values as additional arguments to your call or you put a config file into /some/path/to/some/directory/ which sets everything. the default is to call it config but you can also use the command line argument --conf=/path/to/some/conffile from lightningd to set a different one in a different location.
One thing you need to remember that both lightning nodes need to run on different tcp/ip ports. you do this by setting the port in your accounce addr in the config file announce-addr=IP-ADDR:PORT you need to replacei IP-ADDR with your address and the port with the port.
obviously when interacting with each of the nodes you need to tell lightning-cli which one. again the --help command helps (:
lightning-cli --help
Usage: lightning-cli <command> [<params>...]
--lightning-dir=<dir> Set working directory. All other files are relative to this (default: "/home/user/.lightning")
...
this means you can for example do lightning-cli --lightning-dir=/some/path/to/somedir/ getinfo
I have setup both nodes in their respective config files with their own ports and directories: i.e....
announce-addr=x.x.x.x:9900 bind-addr=0.0.0.0:9900 ligtning-dir=/home/array/.lightning
announce-addr=x.x.x.x:9902 bind-addr=0.0.0.0:9902 ligtning-dir=/home/array/.lightning2
but when I run… lightningd --network=bitcoin --log-level=debug on either folder…they both startup in the .lightning folder where only one can run at a time… – Chris Franko Jennings – 2019-08-20T18:14:27.323
perhaps i am installing and configuring c-lightning wrong....when I setup the second c-lightning....I just used git clone https://github.com/ElementsProject/lightning.git lightning2 cd lightning2
– Chris Franko Jennings – 2019-08-20T18:22:09.767Although helpful, this doesn't solve the problem of running both at the same time. As soon as I activate the first node, the second one cannot be initiated. – Chris Franko Jennings – 2019-08-20T23:09:47.940
It just says "We seem to be missing gossip messages" – Chris Franko Jennings – 2019-08-20T23:14:20.567
you don't need to clone the source code twice! it is sufficient to download, compile and install the software once and then you can run two nodes exactly in the way how I wrote it. The error message "we seem to be missing gossip messages" seems to be a different problem (for example each node needs to peer with at least one public node in order to retrieve information about the network) – Rene Pickhardt – 2019-08-24T08:04:18.150