Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local moonbeam setup #2600

Closed
Neoblock8 opened this issue Dec 27, 2023 · 10 comments
Closed

Local moonbeam setup #2600

Neoblock8 opened this issue Dec 27, 2023 · 10 comments

Comments

@Neoblock8
Copy link

Neoblock8 commented Dec 27, 2023

Hi,
Trying to setup a local moonbeam node.
Running command:
docker run --rm --name moonbeam_development --network host moonbeamfoundation/moonbeam:v0.34.1 --dev --rpc-external --sealing 3000 --rpc-port 9944
when i connected my server ip [ws://ip:9944] in "https://polkadot.js.org/" , it does not connect. Why?

@crystalin
Copy link
Collaborator

Hi @Neoblock8 ,

It is hard to tell as we don't know the setup you are using, It is very likely because your docker is not opening the ports correctly.
You can try to do
docker run -p 9944:9944 --rm --name moonbeam_development --network host moonbeamfoundation/moonbeam:v0.34.1 --dev --rpc-external --sealing 3000 --rpc-port 9944

@Neoblock8
Copy link
Author

Hi @Neoblock8 ,

It is hard to tell as we don't know the setup you are using, It is very likely because your docker is not opening the ports correctly. You can try to do docker run -p 9944:9944 --rm --name moonbeam_development --network host moonbeamfoundation/moonbeam:v0.34.1 --dev --rpc-external --sealing 3000 --rpc-port 9944

Can we modify chainid in dev mode?

@crystalin
Copy link
Collaborator

I don't think you can change it with the dev mode directly.

Your options are either:

  1. modify the dev mode code to use a different chain_id and rebuild moonbeam
  2. generate the genesis plain spec and modify the chain id and relaunch moonbeam with this local chain

@Neoblock8
Copy link
Author

I don't think you can change it with the dev mode directly.

Your options are either:

  1. modify the dev mode code to use a different chain_id and rebuild moonbeam
  2. generate the genesis plain spec and modify the chain id and relaunch moonbeam with this local chain

Modified chain id in the below file and rebuild moonbeam. But the chainid remains same
https://github.com/moonbeam-foundation/moonbeam/blob/v0.34.1/node/service/src/chain_spec/moonbeam.rs

@crystalin
Copy link
Collaborator

the development network is using the moonbase runtime, so I think you change it there: https://github.com/moonbeam-foundation/moonbeam/blob/v0.34.1/node/service/src/chain_spec/moonbase.rs#L91

@Neoblock8
Copy link
Author

Neoblock8 commented Dec 28, 2023 via email

@crystalin
Copy link
Collaborator

crystalin commented Dec 28, 2023

After doing a cargo build --release
you can run it with:
./target/release/moonbeam --dev --rpc-external --sealing 3000 --rpc-port 9944

@Neoblock8
Copy link
Author

./target/release/moonbeam --dev --rpc-external --sealing 3000 --rpc-port 9944

Hi @crystalin,
The above command works. But can't connect local node in https://polkadot.js.org/apps

The error is Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.

How to connect?

@Neoblock8
Copy link
Author

After doing a cargo build --release you can run it with: ./target/release/moonbeam --dev --rpc-external --sealing 3000 --rpc-port 9944

Hi @crystalin,

Where to modify the currency name?

@RomarQ
Copy link
Contributor

RomarQ commented Mar 26, 2024

The "currency" symbol can be modified by changing the tokenSymbol property in the chain spec.

@RomarQ RomarQ closed this as completed Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants