When running a non-baking mainnet node on a Mac, is it possible to start an alphanet and/or zeronet node alongside the mainnet?
Can I just build them each in their own directory? And then what about the network ports?
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Tezos Stack Exchange is a question and answer site for users, experts, and developers of the Tezos blockchain project. It only takes a minute to sign up.Sign up to join this community
As for how to run the three separate nodes, to build off of adrian's answer you could use the following options when running the node:
/home/tezos/tezos_mainnet/tezos-node run --data-dir /home/tezos/.tezos-node --rpc-addr 127.0.0.1:8732 /home/tezos/tezos_alphanet/tezos-node run --data-dir /home/tezos/.tezos-node-alpha --rpc-addr 127.0.0.1:8733 /home/tezos/tezos_zeronet/tezos-node run --data-dir /home/tezos/.tezos-node-zero --rpc-addr 127.0.0.1:8734
You'll have to generate an identity for each node:
/home/tezos/tezos_mainnet/tezos-node identity --data-dir /home/tezos/.tezos-node generate 26. /home/tezos/tezos_alphanet/tezos-node identity --data-dir /home/tezos/.tezos-node-alpha generate 26. /home/tezos/tezos_zeronet/tezos-node identity --data-dir /home/tezos/.tezos-node-zero generate 26.
Yes it is possible to run all three at the same time on the same machine.
You have to ensure that they each have a different directory. Furthermore you need to configure the ports in the config files so that they don't clash.