Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5defbaf

Browse files
committedDec 19, 2024··
Update core node documentation
* add information about debian package signing * add information about adding apt repo to Ubuntu systems * add list of packages and install instructions * clarify "Network Access" section name to make it explicit this it's specific to the stellar network * refresh various commands and ensure they will work by default on a package based installation
1 parent 230e45a commit 5defbaf

10 files changed

+72
-27
lines changed
 

‎docs/validators/admin-guide/commands.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ Additionally, while the commands on this page are _CLI_ commands, there is an ad
2020
The `--help` (aliases: `-h` or `-?`) option can be specified at _any place_ in the command line. It will show you the help message for the relevant command. Some example useage is as follows:
2121

2222
```bash
23-
stellar-core --help
24-
stellar-core run --help
25-
stellar-core --help new-db
26-
stellar-core catchup --help
23+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg --help
24+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg run --help
25+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg --help new-db
26+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg catchup --help
2727
```
2828

2929
## Essential Commands

‎docs/validators/admin-guide/configuring.mdx

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ Before attempting to configure stellar-core, it is highly recommended to first t
1515

1616
After you've [installed](./installation.mdx) Stellar Core, your next step is to complete a configuration file that specifies crucial things about your node — like whether it connects to the Testnet or the Mainnet public network, what database it writes to, and which other nodes are in its [quorum set](#choosing-your-quorum-set).
1717

18-
All configuration for stellar-core is done with a [TOML](https://github.com/toml-lang/toml) file. By default, Stellar Core loads that file from `./stellar-core.cfg`, but you can specify a different file to load on the command line:
18+
All configuration for stellar-core is done with a [TOML](https://github.com/toml-lang/toml) file. By default, Stellar Core loads that file from `./stellar-core.cfg` and Debian packages will use the `/etc/stellar/stellar-core.cfg` file. You can specify a different file to load on the command line:
1919

2020
```bash
2121
stellar-core --conf betterfile.cfg <COMMAND>
2222
```
2323

24+
When installing using official Debian packages systemd unit file is configured to use `/etc/stellar/stellar-core.cfg` file
2425
The examples in these docs don't specify `--conf betterfile.cfg` for the sake of brevity.
2526

2627
This page will walk you through the key fields you'll need to include in your config file to get your node up and runninig.

‎docs/validators/admin-guide/environment-preparation.mdx

+11
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@ The very first time you want to use your archive, _before starting your node_, y
7979
stellar-core new-hist <historyarchive>
8080
```
8181

82+
:::note
83+
84+
In a secure, production, environment Stellar Core should be run as a dedicated user. Debian packages will ensure the `stellar` user exists on the system.
85+
For this reason you may need to run commands as the stellar user, for example:
86+
```bash
87+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg new-hist <historyarchive>
88+
```
89+
90+
:::
91+
92+
8293
More detailed guidance and strategies for publishing history archives can be found in the [publishing history archives](./publishing-history-archives.mdx) page. Please check there for more information.
8394

8495
:::info IMPORTANT:

‎docs/validators/admin-guide/installation.mdx

+36-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,42 @@ The version number scheme that we follow is `protocol_version.release_number.pat
2525

2626
## Package-Based Installation
2727

28-
If you are using a recent LTS version of Ubuntu, we provide the latest stable releases of [`stellar-core`](https://github.com/stellar/stellar-core) and [`stellar-horizon`](https://github.com/stellar/go/tree/master/services/horizon) in Debian binary package format.
28+
If you are using a recent LTS version of Ubuntu, we provide [`stellar-core`](https://github.com/stellar/stellar-core) and [`stellar-horizon`](https://github.com/stellar/go/tree/master/services/horizon) in Debian binary package format. The packages are cryptographically signed by the Stellar Development Foundation and files can be validated on the system to confirm they were not tampered with. Debian packages utilize operating system built-in cryptographic verification during upgrades which mitigates many supply chain attacks.
2929

30-
You may choose to install these packages individually, which offers the greatest flexibility, but requires **manual** creation of the relevant configuration files and configuration of a **PostgreSQL** database.
30+
SDF package signing key fingerprint is **AEAF 01EE A6CA FCEF DDAE 8AA7 0463 8272 A136 B5A6** (A136B5A6)
31+
32+
### Configure SDF Apt Repository On The System
33+
34+
```bash
35+
sudo install -d /etc/apt/keyrings
36+
sudo curl -fsSL https://apt.stellar.org/SDF.asc -o /etc/apt/keyrings/SDF.asc
37+
sudo chmod a+r /etc/apt/keyrings/SDF.asc
38+
echo "deb [signed-by=/etc/apt/keyrings/SDF.asc] https://apt.stellar.org $(lsb_release -cs) stable" | sudo tee -a /etc/apt/sources.list.d/SDF.list
39+
```
40+
41+
Optionally you can add testing repository. This is not recommended for production systems but may be useful for non-production systems using testnet:
42+
```bash
43+
echo "deb [signed-by=/etc/apt/keyrings/SDF.asc] https://apt.stellar.org $(lsb_release -cs) stable" | sudo tee -a /etc/apt/sources.list.d/SDF.list
44+
```
45+
46+
### Install packages
47+
48+
We publish multiple packages for convenience.
49+
50+
| Package | Dependencies | Comments |
51+
| --- | --- | --- |
52+
| stellar-core | none | installs stellar-core binary, systemd service, logrotate script, documentation |
53+
| stellar-core-utils | none | installs useful command line tools (stellar-core-cmd, stellar-core-gap-detect) |
54+
| stellar-core-prometheus-exporter | none | installs a Prometheus exporter to facilitate ingesting stellar-core metrics |
55+
| stellar-core-postgres | stellar-core, PostgreSQL | configures a PostgreSQL server, creates a stellar db,role and system user, the default stellar-core configuration contained in this package will connect to the Testnet|
56+
| stellar-archivist | none | installs stellar-archivist cli tool for managing stellar-core History archives |
57+
58+
To install a chosen package run:
59+
60+
```bash
61+
# To install stellar-core
62+
sudo apt-get update && apt-get install <package_name>
63+
```
3164

3265
## Installing From Source
3366

@@ -65,7 +98,7 @@ docker run -v "/path/to/config/dir:/etc/stellar/" stellar/stellar-core:latest ne
6598
docker run -d -v "/path/to/config/dir:/etc/stellar/" stellar/stellar-core:latest run
6699
```
67100

68-
The image utilizes deb packages so it's possible to confirm the checksum of the `stellar-core` binary in the docker image matches what is in the cryptographically signed deb package. See [packages documentation](https://github.com/stellar/packages/) for information on installing Ubuntu packages. To calculate this checksum in the docker image you can run:
101+
The image utilizes deb packages so it's possible to confirm the checksum of the `stellar-core` binary in the docker image matches what is in the cryptographically signed deb package. See [package based installation section](#package-based-installation) for information. To calculate this checksum in the docker image you can run:
69102

70103
```bash
71104
docker run --entrypoint=/bin/sha256sum stellar/stellar-core:latest /usr/bin/stellar-core

‎docs/validators/admin-guide/logging.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Log messages at different priority levels can be color-coded on standard error b
1414
The log level can be controlled by configuration, the `--ll` command-line flag, or adjusted dynamically by administrative (HTTP) commands. To do so, run:
1515

1616
```bash
17-
$ stellar-core http-command "ll?level=debug"
17+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command "ll?level=debug"
1818
```
1919

2020
while your node is running.
2121

2222
Log levels can also be adjusted on a partition-by-partition basis through the administrative interface. For example the history system can be set to `DEBUG`-level logging by running:
2323

2424
```bash
25-
stellar-core http-command "ll?level=debug&partition=history"
25+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command "ll?level=debug&partition=history"
2626
```
2727

2828
Against a running system.

‎docs/validators/admin-guide/monitoring.mdx

+11-11
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ However you decide to monitor, the most important thing is that you have a syste
1919

2020
## General Node Information
2121

22-
If you run `$ stellar-core http-command 'info'`, the output will look something like this:
22+
If you run `sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command 'info'`, the output will look something like this:
2323

2424
```json
2525
{
@@ -90,7 +90,7 @@ The `peers` command returns information on the peers your node is connected to.
9090
This list is the result of both inbound connections from other peers and outbound connections from this node to other peers. If `compact=false` is used in the command, then it also returns some extra metrics on each peer such as the number of dropped messages.
9191

9292
```bash
93-
stellar-core http-command 'peers'
93+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command 'peers'
9494
```
9595

9696
The output will look something like:
@@ -233,15 +233,15 @@ In this example, we have three nodes `GBBN`, `GDEX`, and `GBUI` (we'll refer to
233233

234234
```bash
235235
# 1. Begin the surveyor collecting phase
236-
stellar-core http-command 'startsurveycollecting?nonce=1234'
236+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command 'startsurveycollecting?nonce=1234'
237237
# 2. Stop the surveyor collecting phase, and begin the reporting phase
238-
stellar-core http-command 'stopsurveycollecting?nonce=1234'
238+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command 'stopsurveycollecting?nonce=1234'
239239
# 3. Request survey results from the `GBBN` node
240-
stellar-core http-command 'surveytopologytimesliced?node=GBBNXPPGDFDUQYH6RT5VGPDSOWLZEXXFD3ACUPG5YXRHLTATTUKY42CL&inboundpeerindex=0&outboundpeerindex=0'
240+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command 'surveytopologytimesliced?node=GBBNXPPGDFDUQYH6RT5VGPDSOWLZEXXFD3ACUPG5YXRHLTATTUKY42CL&inboundpeerindex=0&outboundpeerindex=0'
241241
# 4. Request survey results from the `GDEX` node
242-
stellar-core http-command 'surveytopologytimesliced?node=GDEXJV6XKKLDUWKTSXOOYVOYWZGVNIKKQ7GVNR5FOV7VV5K4MGJT5US4&inboundpeerindex=0&outboundpeerindex=0'
242+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command 'surveytopologytimesliced?node=GDEXJV6XKKLDUWKTSXOOYVOYWZGVNIKKQ7GVNR5FOV7VV5K4MGJT5US4&inboundpeerindex=0&outboundpeerindex=0'
243243
# 3. Retrieve and display the results of issued survey commands
244-
stellar-core http-command 'getsurveyresult'
244+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command 'getsurveyresult'
245245
```
246246

247247
Once the responses are received, the `getsurveyresult` command will return a result like this:
@@ -350,7 +350,7 @@ The `quorum` command allows you to diagnose problems with the quorum set of the
350350
If you run:
351351

352352
```bash
353-
stellar-core http-command 'quorum'
353+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command 'quorum'
354354
```
355355

356356
The output will look something like:
@@ -429,9 +429,9 @@ You can get a sense of the quorum set health of a different node using using:
429429

430430
```bash
431431
# the `NAME` of a validator
432-
stellar-core http-command 'quorum?node=$sdf1'
432+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command 'quorum?node=$sdf1'
433433
# OR the `PUBLIC_KEY` of a validator
434-
stellar-core http-command 'quorum?node=@GABCDE'
434+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command 'quorum?node=@GABCDE'
435435
```
436436

437437
Overall network health can be evaluated by walking through all nodes and looking at their health. Note that this is only an approximation, as remote nodes may not have received the same messages (in particular: `missing` for other nodes is not reliable).
@@ -452,7 +452,7 @@ When showing quorum-set information about the local node rather than some other
452452
The quorum endpoint can also retrieve detailed information about the transitive quorum. This is a format that's easier to process than what `scp` returns, as it doesn't contain all SCP messages.
453453

454454
```bash
455-
stellar-core http-command 'quorum?transitive=true'
455+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command 'quorum?transitive=true'
456456
```
457457

458458
The output looks something like:

‎docs/validators/admin-guide/network-upgrades.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ By way of example, here is the `upgrades` command used to upgrade the protocol v
5252

5353
```bash
5454
# arm the node to vote for the upgrade
55-
stellar-core http-command 'upgrades?mode=set&upgradetime=2018-01-31T20:00:00Z&protocolversion=9'
55+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command 'upgrades?mode=set&upgradetime=2018-01-31T20:00:00Z&protocolversion=9'
5656
# view the status of the node
57-
stellar-core http-command info
57+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command info
5858
```
5959

6060
At this point `info` will tell you that the node is setup to vote for this upgrade:

‎docs/validators/admin-guide/prerequisites.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Stellar Core is designed to run on relatively modest hardware so that a whole ra
2323

2424
_\* Assuming a 30-day retention window for data storage._
2525

26-
## Network Access
26+
## Stellar Network Access
2727

2828
Stellar Core interacts with the peer-to-peer network to keep a distributed ledger in sync, which means that your node needs to make certain [TCP ports](https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_ports) available for inbound and outbound communication.
2929

‎docs/validators/admin-guide/running-node.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Once you've [set up your environment](./prerequisites.mdx), [configured your nod
1010
Use a command equivalent to:
1111

1212
```bash
13-
stellar-core run
13+
sudo systemctl start stellar-core
1414
```
1515

1616
At this point, you're ready to observe your core node's activity as it joins the network.
@@ -22,7 +22,7 @@ You may want to skip ahead and review the [Logging](./logging.mdx) page to famil
2222
When your node is running, you can interact with Stellar Core via an administrative HTTP endpoint. Commands can be issued using command-line HTTP tools such as `curl`, or by running a CLI command such as
2323

2424
```bash
25-
stellar-core http-command <http-command>
25+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg http-command <http-command>
2626
```
2727

2828
The HTTP endpoint is [not intended to be exposed to the public internet](./prerequisites.mdx#internal-system-access). It's typically accessed by administrators, or by a mid-tier application to submit transactions to the Stellar network.

‎docs/validators/admin-guide/soroban-settings.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ You're required to provide four arguments for this command:
6969
For example, the command for the phase 2 upgrade might have looked like this:
7070

7171
```bash
72-
stellar-core get-settings-upgrade-txs \
72+
sudo -u stellar stellar-core --conf /etc/stellar/stellar-core.cfg get-settings-upgrade-txs \
7373
GAUQW73V52I2WLIPKCKYXZBHIYFTECS7UPSG4OSVUHNDXEZJJWFXZG56 \
7474
73014444032 \
7575
"Public Global Stellar Network ; September 2015" \

0 commit comments

Comments
 (0)
Please sign in to comment.