How might I go about running alphanet and mainnet on the same server, without docker images? Here is my current setup:
~/alphanet/tezos-node is where I have the tezos binaries for what I intend to be the alphanet instance. I execute this using pm2 process manager with tezos-node run --rpc-addr 127.0.0.1:8373
~/mainnet/tezos-node is where I have the tezos binaries for what I intend to be the mainnet instance. I execute this using pm2 process manager with tezos-node run --rpc-addr 127.0.0.1:8372
I also have nginx configured to serve proxypasses via https mapping alphanet and mainnet independently, so my applications can access the RCP methods via https.
Sidenote: I am also interested in securing my internet-facing nodes with a secure token. Would I have to implement a custom solution for this, or is there a config option or something similar to handle this within the node itself?
Edit: I have alphanet running fine, but when I try to fireup my mainnet instance, it fails because the chain data directory (~/.tezos-node) is locked to alphanet. So I am guessing I just need a config option to tell my mainnet instance to use a different data directory and identity.
Edit2 startup scripts:
alphanet:
/home/xyz/alphanet/tezos-node run --rpc-addr 127.0.0.1:8733 --data-dir /home/xyz/.tezos-node-alphanet
mainnet:
/home/xyz/mainnet/tezos-node run --rpc-addr 127.0.0.1:8732 --data-dir /home/xyz/.tezos-node-mainnet