generated from Consensys/doctools.template-site
-
Notifications
You must be signed in to change notification settings - Fork 444
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
add service file setup #410
Open
Quilamir
wants to merge
1
commit into
Consensys:main
Choose a base branch
from
Quilamir:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -125,10 +125,86 @@ geth \ | |||||
--verbosity 3 | ||||||
``` | ||||||
|
||||||
--- | ||||||
### | ||||||
|
||||||
### Step 6 | ||||||
|
||||||
Setup Linea as a Serivce | ||||||
|
||||||
Create a new service file: | ||||||
```bash | ||||||
sudo tee <<EOF >/dev/null /etc/systemd/system/linea.service | ||||||
[Unit] | ||||||
Description=Linea Node | ||||||
Wants=network-online.target | ||||||
After=network-online.target | ||||||
|
||||||
[Service] | ||||||
User=$USER # the user you want to run the node with | ||||||
Type=simple | ||||||
Restart=on-failure | ||||||
RestartSec=3 | ||||||
|
||||||
ExecStart=/usr/bin/geth \ # mkare sure the path to the geth binary is correct | ||||||
--datadir /home/$USER/geth-linea-data \ # the path to the data dir of your node | ||||||
--networkid 59144 \ | ||||||
--miner.gasprice 1000000000 \ | ||||||
--miner.gaslimit '0x3A2C940' \ | ||||||
--rpc.allow-unprotected-txs \ | ||||||
--txpool.accountqueue 50000 \ | ||||||
--txpool.globalqueue 50000 \ | ||||||
--txpool.globalslots 50000 \ | ||||||
--txpool.pricelimit 1000000000 \ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
--rpc.txfeecap 100 \ | ||||||
--gpo.maxprice 100000000000000 \ | ||||||
--txpool.nolocals \ | ||||||
--http \ | ||||||
--http.addr '0.0.0.0' \ | ||||||
--http.port 8545 \ | ||||||
--http.corsdomain '*' \ | ||||||
--http.api 'web3,eth,txpool,net' \ | ||||||
--http.vhosts='*' \ | ||||||
--ws --ws.addr '0.0.0.0' --ws.port 8546 --ws.origins '*' --ws.api 'eth,net,web3,txpool' \ | ||||||
--bootnodes "enode://ca2f06aa93728e2883ff02b0c2076329e475fe667a48035b4f77711ea41a73cf6cb2ff232804c49538ad77794185d83295b57ddd2be79eefc50a9dd5c48bbb2e@3.128.49.168:30303" \ | ||||||
--syncmode full \ | ||||||
--metrics --pprof --pprof.addr "127.0.0.1" --pprof.port 9545 \ | ||||||
--verbosity 3 | ||||||
|
||||||
[Install] | ||||||
WantedBy=multi-user.target | ||||||
|
||||||
EOF | ||||||
``` | ||||||
|
||||||
Update the systemd daemon | ||||||
```bash | ||||||
sudo systemctl daemon-reload | ||||||
``` | ||||||
|
||||||
Enable the service to run automatically at startup (optional) | ||||||
```bash | ||||||
sudo systemctl enable linea.service | ||||||
``` | ||||||
|
||||||
Start the node (this will run in the background) | ||||||
```bash | ||||||
sudo systemctl start linea.service | ||||||
``` | ||||||
|
||||||
View logs | ||||||
```bash | ||||||
journalctl -f -u linea.service -o cat | ||||||
``` | ||||||
|
||||||
Stop the node if needed | ||||||
```bash | ||||||
sudo systemctl stop linea.service | ||||||
``` | ||||||
### | ||||||
|
||||||
--- | ||||||
|
||||||
|
||||||
</TabItem> | ||||||
<TabItem value="Testnet" label="Testnet"> | ||||||
|
||||||
|
@@ -182,6 +258,73 @@ geth \ | |||||
--metrics \ | ||||||
--verbosity 3 | ||||||
``` | ||||||
### | ||||||
|
||||||
### Step 6 | ||||||
|
||||||
Setup Linea as a Serivce | ||||||
|
||||||
Create a new service file: | ||||||
```bash | ||||||
sudo tee <<EOF >/dev/null /etc/systemd/system/linea-testnet.service | ||||||
[Unit] | ||||||
Description=Linea Testnet Node | ||||||
Wants=network-online.target | ||||||
After=network-online.target | ||||||
|
||||||
[Service] | ||||||
User=$USER # the user you want to run the node with | ||||||
Type=simple | ||||||
Restart=on-failure | ||||||
RestartSec=3 | ||||||
|
||||||
ExecStart=/usr/bin/geth \ # mkare sure the path to the geth binary is correct | ||||||
--datadir /home/$USER/geth-linea-data \ # the path to the data dir of your node | ||||||
--networkid 59140 \ | ||||||
--rpc.allow-unprotected-txs \ | ||||||
--txpool.accountqueue 50000 \ | ||||||
--txpool.globalqueue 50000 \ | ||||||
--txpool.globalslots 50000 \ | ||||||
--txpool.pricelimit 1000000 \ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
--txpool.pricebump 1 \ | ||||||
--txpool.nolocals \ | ||||||
--http --http.addr '0.0.0.0' --http.port 8545 --http.corsdomain '*' --http.api 'web3,eth,txpool,net' --http.vhosts='*' \ | ||||||
--ws --ws.addr '0.0.0.0' --ws.port 8546 --ws.origins '*' --ws.api 'web3,eth,txpool,net' \ | ||||||
--bootnodes "enode://c7d29d1bbb768e73c6bd320608276dc2341670822ed1292456a7b8375de35b5348e3b6bac63783a53d697378b25c5658681683f7621e31b37c605993c5ee13bd@18.189.141.200:30303,enode://14ba040dd8c5b1ea607fabf98c3c7c398658f897c502d0ca5202dce8907e83be953995ce5c3f72def2af710c072fe38de4e9347a299370fc82d6d17819967c93@3.144.118.88:30303" \ | ||||||
--syncmode full \ | ||||||
--metrics \ | ||||||
--verbosity 3 | ||||||
|
||||||
[Install] | ||||||
WantedBy=multi-user.target | ||||||
|
||||||
EOF | ||||||
``` | ||||||
|
||||||
Update the systemd daemon | ||||||
```bash | ||||||
sudo systemctl daemon-reload | ||||||
``` | ||||||
|
||||||
Enable the service to run automatically at startup (optional) | ||||||
```bash | ||||||
sudo systemctl enable linea-testnet.service | ||||||
``` | ||||||
|
||||||
Start the node (this will run in the background) | ||||||
```bash | ||||||
sudo systemctl start linea-testnet.service | ||||||
``` | ||||||
|
||||||
View logs | ||||||
```bash | ||||||
journalctl -f -u linea-testnet.service -o cat | ||||||
``` | ||||||
|
||||||
Stop the node if needed | ||||||
```bash | ||||||
sudo systemctl stop linea-testnet.service | ||||||
``` | ||||||
### | ||||||
|
||||||
</TabItem> | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.