5

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

1 Answer 1

3

Yes, you need a different data-dir, RPC port, and P2P port, like: --net-addr :10001 --rpc-addr :10002 --data-dir /some/path

The tezos-node executables should be compiled from each respective branch mainnet / alphamet too.

2
  • Thanks! I'm getting this now "Error: An other tezos node is probably running on one of these addresses (127.0.0.1:8372). Please choose another RPC port." I've edited my question with my startup scripts Mar 6, 2019 at 0:45
  • 2
    Your edit2 does not contain the --net-addr .. option. The 4 ports should be different.
    – Seb Mondet
    Mar 6, 2019 at 0:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.