<!-- XE-13356 · deploy: the two shipped systemd units read the same /etc/xe/xe-node.env but expect different variables; deploy/systemd/xe-node.service has no genesis flag and always boots the placeholder genesis (Minor) · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13356>. The page is the record; this is the same page for reading.*

XE-13356 · Bounty

# deploy: the two shipped systemd units read the same /etc/xe/xe-node.env but expect different variables; deploy/systemd/xe-node.service has no genesis flag and always boots the placeholder genesis (Minor)

Closed · duplicate
—claimed Minor
[xe#501](https://github.com/xeprotocol/xe/issues/501)
filed 2026-11-12 07:24 UTC
by greenblood33333

Verdict
:   Duplicate

Tier
:   —

Claimed
:   Minor

Area
:   Ops / testnet

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 00:26 UTC

Told
:   2026-11-20 00:25 UTC

### Patches

- [xe#504](https://github.com/xeprotocol/xe/pull/504) open by arturbarszcz78
  fix(deploy): unify systemd packaging and enforce genesis and bootstrap invariants (fixes #501)

### History

- [549966](https://bounty.xe.network/log/549966) 2026-11-20 00:26 UTC github.state\_pushed
- [549962](https://bounty.xe.network/log/549962) 2026-11-20 00:26 UTC github.labels
- [549896](https://bounty.xe.network/log/549896) 2026-11-20 00:25 UTC reply.mirrored
- [549603](https://bounty.xe.network/log/549603) 2026-11-20 00:24 UTC proposal.adopted
- [549602](https://bounty.xe.network/log/549602) 2026-11-20 00:24 UTC reply.sent
- [549601](https://bounty.xe.network/log/549601) 2026-11-20 00:24 UTC ticket.status new → closed
- [548975](https://bounty.xe.network/log/548975) 2026-11-20 00:24 UTC proposal.adopted
- [548974](https://bounty.xe.network/log/548974) 2026-11-20 00:24 UTC ticket.facts area
- [548973](https://bounty.xe.network/log/548973) 2026-11-20 00:24 UTC proposal.adopted
- [548972](https://bounty.xe.network/log/548972) 2026-11-20 00:24 UTC ticket.facts
- [548971](https://bounty.xe.network/log/548971) 2026-11-20 00:24 UTC proposal.adopted
- [548970](https://bounty.xe.network/log/548970) 2026-11-20 00:24 UTC ticket.facts

[Full history](https://bounty.xe.network/log?ref=XE-13356) · [JSON](https://bounty.xe.network/v1/tickets/XE-13356) · [markdown](https://bounty.xe.network/XE-13356.md)

### Report

Payout address: ead8ad792b4452de17e897155ed6efe9f928d0c8b07bdf6a9cbf4f4d67941dd2

**Suggested severity:** Minor (deployment packaging / docs). An operator who follows the shipped packaging ends up with a node that cannot join the live network, with no error that points at the cause.
**Area:** `deploy/systemd/xe-node.service`, `deploy/systemd/xe-node.env`, `deploy/xe-node.service`, `deploy/xe-node.env.example`
**Version:** master @ `89a542e` (unchanged since `9787859`)

## Summary

The repo ships **two systemd units that read the same environment file, `/etc/xe/xe-node.env`, but expect different variable names**, and the env file that sits next to one of them cannot make a node join `testnet-0005` at all.

|  | `deploy/xe-node.service` | `deploy/systemd/xe-node.service` |
| --- | --- | --- |
| `EnvironmentFile` | `/etc/xe/xe-node.env` | `/etc/xe/xe-node.env` (same path) |
| Bootstrap peers | `--dial ${XE_BOOTSTRAP}` | `-dial ${XE_DIAL}` |
| Genesis | `--genesis-dir ${XE_GENESIS_DIR}` | **none: no genesis flag and no `$XE_EXTRA_ARGS` to add one** |
| Matching env file | `deploy/xe-node.env.example` (`XE_BOOTSTRAP`, `XE_GENESIS_DIR`) | `deploy/systemd/xe-node.env` (`XE_DIAL=` empty, no genesis variable) |

## Effects

1. **`deploy/systemd/xe-node.service` always runs the embedded placeholder genesis.** It passes no `--genesis-dir` / `--genesis`, and there is no `$XE_EXTRA_ARGS` hook to add one. Per README and `docs/run-a-node.md`, a node without `--genesis-dir` "runs the genesis compiled into the binary instead. That one is a **placeholder** (`network_id = "testnet"`) which no live network uses", and peers ban it (`CANNOT JOIN NETWORK — network_id mismatch`). An operator cannot fix this from the env file; they have to edit the unit.
2. **`deploy/systemd/xe-node.env` ships `XE_DIAL=` empty**, so even ignoring genesis the unit starts with no bootstrap peers ("No peers and no rejections" in the troubleshooting section).
3. **Cross-pairing silently empties flags.** Both units read `/etc/xe/xe-node.env`. If an operator installs `deploy/xe-node.service` (the one the Deployment page and `deploy/README.md` name) but copies `deploy/systemd/xe-node.env` (the env file that actually exists under that name, while the other is only `*.example`), `XE_BOOTSTRAP` and `XE_GENESIS_DIR` are undefined, so systemd expands them to empty strings: `--dial "" --genesis-dir ""`. The result is the same: placeholder genesis, no peers. The reverse pairing loses `-dial`, metrics and logging settings.
4. The deployment docs (`test.network/docs/deployment` → Packaging) describe the unit as "reads `/etc/xe/xe-node.env` (`deploy/xe-node.env.example` lists every knob)", which is true for only one of the two units.

## Reproduce (read-only, no node needed)

```
grep -nE 'EnvironmentFile|genesis|dial' deploy/xe-node.service deploy/systemd/xe-node.service
grep -nE '^XE_' deploy/xe-node.env.example deploy/systemd/xe-node.env
```

`deploy/systemd/xe-node.service` has no `genesis` line, and its env file has `XE_DIAL=` and no genesis variable.

## Suggested fix

1. Keep one unit and one env file. Delete or merge `deploy/systemd/` into `deploy/xe-node.service`, or make both use the same variable names.
2. Make genesis mandatory in the unit (`--genesis-dir ${XE_GENESIS_DIR}`) and add `$XE_EXTRA_ARGS` everywhere.
3. Ship the env file with the live values (`XE_GENESIS_DIR=/etc/xe/genesis`, bootstrap multiaddrs from the README) or fail fast: an `ExecStartPre` that refuses to start when `XE_GENESIS_DIR` or the bootstrap list is empty.
4. Optionally have `xe node` exit with a clear error when it starts on the embedded placeholder genesis without an explicit opt-in flag, since no live network uses it.

Related but different: XE-3188 (the units point at `/usr/local/bin/xe-node`, a binary name the build never produces). This report is about the env variables and the missing genesis flag in the same packaging.

### Thread

**Joseph Denne**team2026-11-20 00:25 UTCgithub

Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the
first verifiable submission, so this one closes as a duplicate. If you believe it is a different
bug, file a new report that links https://bounty.xe.network/XE-13356 and says what differs; it is read like any other.
