From 949617f60115badc40e2ad347be5feca3eb7d468 Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Tue, 28 Jul 2026 03:01:59 -0700 Subject: [PATCH] docs(run-a-node): correct the install-and-run path to the commands that work MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every command on the install path was executed against the live artifacts and verified against the shipped installer and packaging sources. Four documented claims did not hold, and the corrections differ per install route: - The one-line install needs elevation. The default plan registers the dig-node and dig-dns services and writes into a protected install root, so an unelevated run is refused before anything is downloaded, and the bootstrap script does not elevate itself. Document `| sudo sh` and, on Windows, an elevated PowerShell. - The systemd unit id depends on the route: the apt package registers `dig-node.service`, the native .deb/.pkg/.msi register `net.dignetwork.dig-node`, and the DIG Installer registers `dignetwork-dig-node` in the user scope. Replace the single wrong id with a per-route table, and note that a user-scope unit needs a login session. - The `dign` and `digd` aliases come only from the DIG Installer. The apt packages and the native OS packages carry neither, so the apt page no longer promises them and instead states exactly what it installs. - apt trails the current releases and publishes no arm64 dig-node, so the apt page leads with what it serves today and points elsewhere for a current node. Also drops the stale not-yet-provisioned notes now that install.sh, install.ps1 and apt.dig.net all serve real artifacts; removes the claims that the installer runs the native OS packages and that the apt package registers the chia:// scheme handler; adds a first-fetch check against a live store plus the scriptable `dign status --json` alternative; and documents the X-Dig-Store response header as a machine-readable way to resolve a subdomain to its store. A new unit lint pins each corrected command across every page and all fourteen locale copies. Its rules are universally quantified on purpose: a single missed occurrence fails, rather than being masked by a corrected occurrence elsewhere, which is how several of these claims survived earlier passes. Version: patch. Documentation corrections with no new site capability — the X-Dig-Store section documents a header that already ships. Co-Authored-By: Claude --- docs/build-a-dapp/deploy-existing-app.md | 24 +++ docs/run-a-node/apt.md | 45 +++-- docs/run-a-node/configure.md | 8 +- docs/run-a-node/index.md | 51 ++++-- docs/run-a-node/run-a-relay.md | 2 +- docs/run-a-node/universal-installer.md | 77 +++++--- .../build-a-dapp/deploy-existing-app.md | 24 +++ .../current/run-a-node/apt.md | 45 +++-- .../current/run-a-node/configure.md | 8 +- .../current/run-a-node/index.md | 51 ++++-- .../current/run-a-node/run-a-relay.md | 4 +- .../current/run-a-node/universal-installer.md | 116 ++++++++++-- .../build-a-dapp/deploy-existing-app.md | 24 +++ .../current/run-a-node/apt.md | 45 +++-- .../current/run-a-node/configure.md | 8 +- .../current/run-a-node/index.md | 51 ++++-- .../current/run-a-node/run-a-relay.md | 4 +- .../current/run-a-node/universal-installer.md | 116 ++++++++++-- .../build-a-dapp/deploy-existing-app.md | 24 +++ .../current/run-a-node/apt.md | 45 +++-- .../current/run-a-node/configure.md | 8 +- .../current/run-a-node/index.md | 51 ++++-- .../current/run-a-node/run-a-relay.md | 4 +- .../current/run-a-node/universal-installer.md | 116 ++++++++++-- .../build-a-dapp/deploy-existing-app.md | 24 +++ .../current/run-a-node/apt.md | 45 +++-- .../current/run-a-node/configure.md | 8 +- .../current/run-a-node/index.md | 51 ++++-- .../current/run-a-node/run-a-relay.md | 4 +- .../current/run-a-node/universal-installer.md | 116 ++++++++++-- .../build-a-dapp/deploy-existing-app.md | 24 +++ .../current/run-a-node/apt.md | 45 +++-- .../current/run-a-node/configure.md | 8 +- .../current/run-a-node/index.md | 51 ++++-- .../current/run-a-node/run-a-relay.md | 4 +- .../current/run-a-node/universal-installer.md | 116 ++++++++++-- .../build-a-dapp/deploy-existing-app.md | 24 +++ .../current/run-a-node/apt.md | 45 +++-- .../current/run-a-node/configure.md | 8 +- .../current/run-a-node/index.md | 51 ++++-- .../current/run-a-node/run-a-relay.md | 4 +- .../current/run-a-node/universal-installer.md | 116 ++++++++++-- .../build-a-dapp/deploy-existing-app.md | 24 +++ .../current/run-a-node/apt.md | 45 +++-- .../current/run-a-node/configure.md | 8 +- .../current/run-a-node/index.md | 51 ++++-- .../current/run-a-node/run-a-relay.md | 4 +- .../current/run-a-node/universal-installer.md | 116 ++++++++++-- .../build-a-dapp/deploy-existing-app.md | 24 +++ .../current/run-a-node/apt.md | 45 +++-- .../current/run-a-node/configure.md | 8 +- .../current/run-a-node/index.md | 51 ++++-- .../current/run-a-node/run-a-relay.md | 4 +- .../current/run-a-node/universal-installer.md | 116 ++++++++++-- .../build-a-dapp/deploy-existing-app.md | 24 +++ .../current/run-a-node/apt.md | 45 +++-- .../current/run-a-node/configure.md | 8 +- .../current/run-a-node/index.md | 51 ++++-- .../current/run-a-node/run-a-relay.md | 4 +- .../current/run-a-node/universal-installer.md | 116 ++++++++++-- .../build-a-dapp/deploy-existing-app.md | 24 +++ .../current/run-a-node/apt.md | 45 +++-- .../current/run-a-node/configure.md | 8 +- .../current/run-a-node/index.md | 51 ++++-- .../current/run-a-node/run-a-relay.md | 4 +- .../current/run-a-node/universal-installer.md | 116 ++++++++++-- .../build-a-dapp/deploy-existing-app.md | 24 +++ .../current/run-a-node/apt.md | 45 +++-- .../current/run-a-node/configure.md | 8 +- .../current/run-a-node/index.md | 51 ++++-- .../current/run-a-node/run-a-relay.md | 4 +- .../current/run-a-node/universal-installer.md | 116 ++++++++++-- .../build-a-dapp/deploy-existing-app.md | 24 +++ .../current/run-a-node/apt.md | 45 +++-- .../current/run-a-node/configure.md | 8 +- .../current/run-a-node/index.md | 51 ++++-- .../current/run-a-node/run-a-relay.md | 4 +- .../current/run-a-node/universal-installer.md | 116 ++++++++++-- .../build-a-dapp/deploy-existing-app.md | 24 +++ .../current/run-a-node/apt.md | 45 +++-- .../current/run-a-node/configure.md | 8 +- .../current/run-a-node/index.md | 51 ++++-- .../current/run-a-node/run-a-relay.md | 4 +- .../current/run-a-node/universal-installer.md | 116 ++++++++++-- package.json | 2 +- static/openrpc-node.json | 2 +- static/openrpc.json | 2 +- tests/unit/install-path-lint.test.mjs | 172 ++++++++++++++++++ 88 files changed, 2954 insertions(+), 655 deletions(-) create mode 100644 tests/unit/install-path-lint.test.mjs diff --git a/docs/build-a-dapp/deploy-existing-app.md b/docs/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/docs/build-a-dapp/deploy-existing-app.md +++ b/docs/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/docs/run-a-node/apt.md b/docs/run-a-node/apt.md index 4664db9..afec318 100644 --- a/docs/run-a-node/apt.md +++ b/docs/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,23 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. ## 4. Check the service -Installing `dig-node` registers a **systemd** unit — `net.dignetwork.dig-node.service` (shown as **"DIG NETWORK: NODE"**) — and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. Check it's running and watch its logs: ```sh -systemctl status net.dignetwork.dig-node # is it active? when did it start? -journalctl -u net.dignetwork.dig-node -f # follow the node's logs live +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -`systemctl status` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. -The package also registers the OS **`chia://` scheme handler**, so clicking a `chia://…` link opens it through your node — see [Open `chia://` links from anywhere](./universal-installer.md#chia-scheme-handler). (`apt.dig.net` serves the same native `.deb` described in [Native OS packages](./universal-installer.md#native-os-packages).) +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: + +```sh +sudo systemctl edit dig-node +``` + +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -84,14 +99,16 @@ sudo apt update && sudo apt upgrade # picks up new dig-node / dig-store r To restart after a config change, or stop the service: ```sh -sudo systemctl restart net.dignetwork.dig-node -sudo systemctl stop net.dignetwork.dig-node # stop serving (does not uninstall) -sudo systemctl disable net.dignetwork.dig-node # don't start on boot +sudo systemctl restart dig-node +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/docs/run-a-node/configure.md b/docs/run-a-node/configure.md index 008855d..9fdcb8e 100644 --- a/docs/run-a-node/configure.md +++ b/docs/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart net.dignetwork.dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/docs/run-a-node/index.md b/docs/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/docs/run-a-node/index.md +++ b/docs/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/docs/run-a-node/run-a-relay.md b/docs/run-a-node/run-a-relay.md index d1f35a0..317ddf2 100644 --- a/docs/run-a-node/run-a-relay.md +++ b/docs/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell diff --git a/docs/run-a-node/universal-installer.md b/docs/run-a-node/universal-installer.md index df13f19..5c1c31e 100644 --- a/docs/run-a-node/universal-installer.md +++ b/docs/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -29,25 +29,42 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. ## Short aliases: `dign` and `digd` {#short-aliases} -Every install also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. ## GUI installer {#gui-installer} @@ -64,26 +81,46 @@ Re-running the installer over an already-installed `dig-node` or `dig-relay` — ## Native OS packages {#native-os-packages} -Under the hood, the install is a set of **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`** for `dig-node`, and the same three for `dig-dns`. The DIG Installer above just downloads and runs the right one for your machine; you can also install a package directly with your OS's own tooling: +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): | OS | Install a package directly | |---|---| -| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi`. | -| **macOS** | Double-click the `.pkg`, or `sudo installer -pkg dig-node-.pkg -target /`. | -| **Linux** | `sudo apt install ./dig-node-.deb` — the same `.deb` the [apt repository](./apt.md) serves. | +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} -Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. The services are registered under stable ids so you can find them in your OS's service manager: +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: -| Service | Id | Display name | +| How you installed | OS | Ask for it as | |---|---|---| -| `dig-node` | `net.dignetwork.dig-node` | **DIG NETWORK: NODE** | -| `dig-dns` | `net.dignetwork.dig-dns` | **DIG NETWORK: DNS** | +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | -Each runs as a Windows service / macOS LaunchDaemon / Linux systemd unit. Download the packages from the [dig-node](https://github.com/DIG-Network/dig-node/releases) and [dig-dns](https://github.com/DIG-Network/dig-dns/releases) Releases pages. +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` ## Open `chia://` links from anywhere {#chia-scheme-handler} -Installing `dig-node` also registers **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. @@ -108,10 +145,6 @@ dig-node open --json chia:/// The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -122,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -139,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the diff --git a/i18n/de/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md b/i18n/de/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/apt.md b/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/apt.md index 138c193..afec318 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/apt.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,25 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. + +## 4. Check the service -## 4. Start and enable the service +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. -Installing `dig-node` registers a **systemd** unit. Enable it (start now **and** on every boot): +Check it's running and watch its logs: ```sh -sudo systemctl enable --now dig-node +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -Check it's running and watch its logs: +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. + +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: ```sh -systemctl status dig-node # is it active? when did it start? -journalctl -u dig-node -f # follow the node's logs live +sudo systemctl edit dig-node ``` -`systemctl status dig-node` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -87,13 +100,15 @@ To restart after a config change, or stop the service: ```sh sudo systemctl restart dig-node -sudo systemctl stop dig-node # stop serving (does not uninstall) -sudo systemctl disable dig-node # don't start on boot +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/configure.md b/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/configure.md index 587840f..9fdcb8e 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/configure.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/index.md b/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/index.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md b/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md index d1d70b2..317ddf2 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell @@ -159,5 +159,5 @@ By default the relay speaks plain `ws://` and expects TLS to be terminated in fr - [Configure a node](./configure.md) — all node settings, including the relay - [Install anywhere — the universal installer](./universal-installer.md) -- [Installation über den GUI-Assistenten](./universal-installer.md#gui-installer) — eine geführte Alternative zu den obigen Flags +- [Install via the GUI wizard](./universal-installer.md#gui-installer) — a guided alternative to the flags above - [Run a DIG node](./index.md) — what a node is and why you'd run one diff --git a/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md b/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md index b5e4842..5c1c31e 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -12,6 +12,14 @@ keywords: - Windows service - launchd - systemd + - native OS package + - msi + - pkg + - deb + - chia:// scheme handler + - dig-node open + - dign + - digd tags: - dig-node - dig-dns @@ -21,22 +29,43 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. +## Short aliases: `dign` and `digd` {#short-aliases} + +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. + ## GUI installer {#gui-installer} Prefer a guided setup over flags? Download the desktop wizard — @@ -50,14 +79,72 @@ If a component isn't available yet for your platform, it's skipped automatically Re-running the installer over an already-installed `dig-node` or `dig-relay` — to upgrade, for example — needs no manual steps: it stops the running service, replaces the binary with the new version, then starts it again, so the service ends up in the same running or stopped state it was in before. +## Native OS packages {#native-os-packages} + +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): + +| OS | Install a package directly | +|---|---| +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} + +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: + +| How you installed | OS | Ask for it as | +|---|---|---| +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | + +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` + +## Open `chia://` links from anywhere {#chia-scheme-handler} + +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. + +Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. + +### `dig-node open` + +The handler runs one command, which you can also use yourself to open a DIG address: + +```sh +dig-node open chia://[:]/ +dig-node open urn:dig:chia:[:]/ +``` + +It **validates the link strictly** — only `chia://` and `urn:dig:chia:` are accepted, the store id must be a valid 64-hex value, and every other scheme (`file:`, `javascript:`, `http:`, …) is rejected — then opens your local node's address for it in the default browser. Add `--json` for a machine-readable result: + +```sh +dig-node open --json chia:/// +# { "ok": true, "action": "open", "opened": true, +# "url": "http://localhost:9778/s//", "store_id": "", … } +``` + ## `dig.local` The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -68,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -85,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the @@ -94,7 +181,9 @@ wires OS split-DNS (or an NRPT rule on Windows) and, as a fallback, a PAC proxy for browsers that bypass the OS resolver (e.g. a browser forcing DNS-over-HTTPS) — either path alone is enough for `.dig` URLs to load. It never edits `/etc/hosts`, never rewrites URLs, and never intercepts TLS. Run `dig-dns doctor` any time to check -which path is live and get a fix hint for what isn't. +which path is live and get a fix hint for what isn't. → See [DIG and your +DNS](./dns.md) for what dig-dns does and doesn't touch, and how it protects its own +lookup. The [extension](../audiences/content-consumers.md) already opens content directly from a reachable node as a real page — see [Reading from your own @@ -112,6 +201,9 @@ Prefer the signed, `apt upgrade`-able native path: → [Install on Ubuntu/Debian ## Related - [Run a node — overview](./index.md) +- [Install on Ubuntu/Debian via apt](./apt.md) — the same `.deb`, signed and `apt upgrade`-able +- [The chia:// protocol](../browser/chia-protocol.md) — what a `chia://` address is and how it resolves +- [DIG and your DNS](./dns.md) — dig-dns's split-DNS scope + its own encrypted upstream lookup - [Installing the CLI](../digstore/cli/install.md) — the raw `dig-store` binary on its own - [Configure dig-node](./configure.md) — ports, listeners, cache cap, upstream - [Point a consumer at your node](./point-a-consumer.md) — shared `.dig` cache diff --git a/i18n/es/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md b/i18n/es/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/apt.md b/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/apt.md index 138c193..afec318 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/apt.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,25 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. + +## 4. Check the service -## 4. Start and enable the service +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. -Installing `dig-node` registers a **systemd** unit. Enable it (start now **and** on every boot): +Check it's running and watch its logs: ```sh -sudo systemctl enable --now dig-node +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -Check it's running and watch its logs: +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. + +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: ```sh -systemctl status dig-node # is it active? when did it start? -journalctl -u dig-node -f # follow the node's logs live +sudo systemctl edit dig-node ``` -`systemctl status dig-node` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -87,13 +100,15 @@ To restart after a config change, or stop the service: ```sh sudo systemctl restart dig-node -sudo systemctl stop dig-node # stop serving (does not uninstall) -sudo systemctl disable dig-node # don't start on boot +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/configure.md b/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/configure.md index 587840f..9fdcb8e 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/configure.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/index.md b/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/index.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md b/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md index 53d262d..317ddf2 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell @@ -159,5 +159,5 @@ By default the relay speaks plain `ws://` and expects TLS to be terminated in fr - [Configure a node](./configure.md) — all node settings, including the relay - [Install anywhere — the universal installer](./universal-installer.md) -- [Instalar mediante el asistente gráfico](./universal-installer.md#gui-installer) — una alternativa guiada a los flags anteriores +- [Install via the GUI wizard](./universal-installer.md#gui-installer) — a guided alternative to the flags above - [Run a DIG node](./index.md) — what a node is and why you'd run one diff --git a/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md b/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md index b5e4842..5c1c31e 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -12,6 +12,14 @@ keywords: - Windows service - launchd - systemd + - native OS package + - msi + - pkg + - deb + - chia:// scheme handler + - dig-node open + - dign + - digd tags: - dig-node - dig-dns @@ -21,22 +29,43 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. +## Short aliases: `dign` and `digd` {#short-aliases} + +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. + ## GUI installer {#gui-installer} Prefer a guided setup over flags? Download the desktop wizard — @@ -50,14 +79,72 @@ If a component isn't available yet for your platform, it's skipped automatically Re-running the installer over an already-installed `dig-node` or `dig-relay` — to upgrade, for example — needs no manual steps: it stops the running service, replaces the binary with the new version, then starts it again, so the service ends up in the same running or stopped state it was in before. +## Native OS packages {#native-os-packages} + +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): + +| OS | Install a package directly | +|---|---| +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} + +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: + +| How you installed | OS | Ask for it as | +|---|---|---| +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | + +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` + +## Open `chia://` links from anywhere {#chia-scheme-handler} + +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. + +Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. + +### `dig-node open` + +The handler runs one command, which you can also use yourself to open a DIG address: + +```sh +dig-node open chia://[:]/ +dig-node open urn:dig:chia:[:]/ +``` + +It **validates the link strictly** — only `chia://` and `urn:dig:chia:` are accepted, the store id must be a valid 64-hex value, and every other scheme (`file:`, `javascript:`, `http:`, …) is rejected — then opens your local node's address for it in the default browser. Add `--json` for a machine-readable result: + +```sh +dig-node open --json chia:/// +# { "ok": true, "action": "open", "opened": true, +# "url": "http://localhost:9778/s//", "store_id": "", … } +``` + ## `dig.local` The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -68,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -85,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the @@ -94,7 +181,9 @@ wires OS split-DNS (or an NRPT rule on Windows) and, as a fallback, a PAC proxy for browsers that bypass the OS resolver (e.g. a browser forcing DNS-over-HTTPS) — either path alone is enough for `.dig` URLs to load. It never edits `/etc/hosts`, never rewrites URLs, and never intercepts TLS. Run `dig-dns doctor` any time to check -which path is live and get a fix hint for what isn't. +which path is live and get a fix hint for what isn't. → See [DIG and your +DNS](./dns.md) for what dig-dns does and doesn't touch, and how it protects its own +lookup. The [extension](../audiences/content-consumers.md) already opens content directly from a reachable node as a real page — see [Reading from your own @@ -112,6 +201,9 @@ Prefer the signed, `apt upgrade`-able native path: → [Install on Ubuntu/Debian ## Related - [Run a node — overview](./index.md) +- [Install on Ubuntu/Debian via apt](./apt.md) — the same `.deb`, signed and `apt upgrade`-able +- [The chia:// protocol](../browser/chia-protocol.md) — what a `chia://` address is and how it resolves +- [DIG and your DNS](./dns.md) — dig-dns's split-DNS scope + its own encrypted upstream lookup - [Installing the CLI](../digstore/cli/install.md) — the raw `dig-store` binary on its own - [Configure dig-node](./configure.md) — ports, listeners, cache cap, upstream - [Point a consumer at your node](./point-a-consumer.md) — shared `.dig` cache diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md b/i18n/fr/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/apt.md b/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/apt.md index 138c193..afec318 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/apt.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,25 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. + +## 4. Check the service -## 4. Start and enable the service +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. -Installing `dig-node` registers a **systemd** unit. Enable it (start now **and** on every boot): +Check it's running and watch its logs: ```sh -sudo systemctl enable --now dig-node +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -Check it's running and watch its logs: +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. + +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: ```sh -systemctl status dig-node # is it active? when did it start? -journalctl -u dig-node -f # follow the node's logs live +sudo systemctl edit dig-node ``` -`systemctl status dig-node` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -87,13 +100,15 @@ To restart after a config change, or stop the service: ```sh sudo systemctl restart dig-node -sudo systemctl stop dig-node # stop serving (does not uninstall) -sudo systemctl disable dig-node # don't start on boot +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/configure.md b/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/configure.md index 587840f..9fdcb8e 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/configure.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/index.md b/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/index.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md b/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md index 21dac3f..317ddf2 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell @@ -159,5 +159,5 @@ By default the relay speaks plain `ws://` and expects TLS to be terminated in fr - [Configure a node](./configure.md) — all node settings, including the relay - [Install anywhere — the universal installer](./universal-installer.md) -- [Installer via l'assistant graphique](./universal-installer.md#gui-installer) — une alternative guidée aux options ci-dessus +- [Install via the GUI wizard](./universal-installer.md#gui-installer) — a guided alternative to the flags above - [Run a DIG node](./index.md) — what a node is and why you'd run one diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md b/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md index b5e4842..5c1c31e 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -12,6 +12,14 @@ keywords: - Windows service - launchd - systemd + - native OS package + - msi + - pkg + - deb + - chia:// scheme handler + - dig-node open + - dign + - digd tags: - dig-node - dig-dns @@ -21,22 +29,43 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. +## Short aliases: `dign` and `digd` {#short-aliases} + +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. + ## GUI installer {#gui-installer} Prefer a guided setup over flags? Download the desktop wizard — @@ -50,14 +79,72 @@ If a component isn't available yet for your platform, it's skipped automatically Re-running the installer over an already-installed `dig-node` or `dig-relay` — to upgrade, for example — needs no manual steps: it stops the running service, replaces the binary with the new version, then starts it again, so the service ends up in the same running or stopped state it was in before. +## Native OS packages {#native-os-packages} + +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): + +| OS | Install a package directly | +|---|---| +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} + +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: + +| How you installed | OS | Ask for it as | +|---|---|---| +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | + +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` + +## Open `chia://` links from anywhere {#chia-scheme-handler} + +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. + +Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. + +### `dig-node open` + +The handler runs one command, which you can also use yourself to open a DIG address: + +```sh +dig-node open chia://[:]/ +dig-node open urn:dig:chia:[:]/ +``` + +It **validates the link strictly** — only `chia://` and `urn:dig:chia:` are accepted, the store id must be a valid 64-hex value, and every other scheme (`file:`, `javascript:`, `http:`, …) is rejected — then opens your local node's address for it in the default browser. Add `--json` for a machine-readable result: + +```sh +dig-node open --json chia:/// +# { "ok": true, "action": "open", "opened": true, +# "url": "http://localhost:9778/s//", "store_id": "", … } +``` + ## `dig.local` The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -68,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -85,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the @@ -94,7 +181,9 @@ wires OS split-DNS (or an NRPT rule on Windows) and, as a fallback, a PAC proxy for browsers that bypass the OS resolver (e.g. a browser forcing DNS-over-HTTPS) — either path alone is enough for `.dig` URLs to load. It never edits `/etc/hosts`, never rewrites URLs, and never intercepts TLS. Run `dig-dns doctor` any time to check -which path is live and get a fix hint for what isn't. +which path is live and get a fix hint for what isn't. → See [DIG and your +DNS](./dns.md) for what dig-dns does and doesn't touch, and how it protects its own +lookup. The [extension](../audiences/content-consumers.md) already opens content directly from a reachable node as a real page — see [Reading from your own @@ -112,6 +201,9 @@ Prefer the signed, `apt upgrade`-able native path: → [Install on Ubuntu/Debian ## Related - [Run a node — overview](./index.md) +- [Install on Ubuntu/Debian via apt](./apt.md) — the same `.deb`, signed and `apt upgrade`-able +- [The chia:// protocol](../browser/chia-protocol.md) — what a `chia://` address is and how it resolves +- [DIG and your DNS](./dns.md) — dig-dns's split-DNS scope + its own encrypted upstream lookup - [Installing the CLI](../digstore/cli/install.md) — the raw `dig-store` binary on its own - [Configure dig-node](./configure.md) — ports, listeners, cache cap, upstream - [Point a consumer at your node](./point-a-consumer.md) — shared `.dig` cache diff --git a/i18n/hi/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md b/i18n/hi/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/i18n/hi/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md +++ b/i18n/hi/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/apt.md b/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/apt.md index 138c193..afec318 100644 --- a/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/apt.md +++ b/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,25 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. + +## 4. Check the service -## 4. Start and enable the service +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. -Installing `dig-node` registers a **systemd** unit. Enable it (start now **and** on every boot): +Check it's running and watch its logs: ```sh -sudo systemctl enable --now dig-node +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -Check it's running and watch its logs: +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. + +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: ```sh -systemctl status dig-node # is it active? when did it start? -journalctl -u dig-node -f # follow the node's logs live +sudo systemctl edit dig-node ``` -`systemctl status dig-node` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -87,13 +100,15 @@ To restart after a config change, or stop the service: ```sh sudo systemctl restart dig-node -sudo systemctl stop dig-node # stop serving (does not uninstall) -sudo systemctl disable dig-node # don't start on boot +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/configure.md b/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/configure.md index 587840f..9fdcb8e 100644 --- a/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/configure.md +++ b/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/index.md b/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/index.md +++ b/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md b/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md index db58c05..317ddf2 100644 --- a/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md +++ b/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell @@ -159,5 +159,5 @@ By default the relay speaks plain `ws://` and expects TLS to be terminated in fr - [Configure a node](./configure.md) — all node settings, including the relay - [Install anywhere — the universal installer](./universal-installer.md) -- [GUI विज़ार्ड से इंस्टॉल करें](./universal-installer.md#gui-installer) — ऊपर दिए फ़्लैग्स का एक गाइडेड विकल्प +- [Install via the GUI wizard](./universal-installer.md#gui-installer) — a guided alternative to the flags above - [Run a DIG node](./index.md) — what a node is and why you'd run one diff --git a/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md b/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md index b5e4842..5c1c31e 100644 --- a/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md +++ b/i18n/hi/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -12,6 +12,14 @@ keywords: - Windows service - launchd - systemd + - native OS package + - msi + - pkg + - deb + - chia:// scheme handler + - dig-node open + - dign + - digd tags: - dig-node - dig-dns @@ -21,22 +29,43 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. +## Short aliases: `dign` and `digd` {#short-aliases} + +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. + ## GUI installer {#gui-installer} Prefer a guided setup over flags? Download the desktop wizard — @@ -50,14 +79,72 @@ If a component isn't available yet for your platform, it's skipped automatically Re-running the installer over an already-installed `dig-node` or `dig-relay` — to upgrade, for example — needs no manual steps: it stops the running service, replaces the binary with the new version, then starts it again, so the service ends up in the same running or stopped state it was in before. +## Native OS packages {#native-os-packages} + +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): + +| OS | Install a package directly | +|---|---| +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} + +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: + +| How you installed | OS | Ask for it as | +|---|---|---| +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | + +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` + +## Open `chia://` links from anywhere {#chia-scheme-handler} + +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. + +Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. + +### `dig-node open` + +The handler runs one command, which you can also use yourself to open a DIG address: + +```sh +dig-node open chia://[:]/ +dig-node open urn:dig:chia:[:]/ +``` + +It **validates the link strictly** — only `chia://` and `urn:dig:chia:` are accepted, the store id must be a valid 64-hex value, and every other scheme (`file:`, `javascript:`, `http:`, …) is rejected — then opens your local node's address for it in the default browser. Add `--json` for a machine-readable result: + +```sh +dig-node open --json chia:/// +# { "ok": true, "action": "open", "opened": true, +# "url": "http://localhost:9778/s//", "store_id": "", … } +``` + ## `dig.local` The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -68,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -85,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the @@ -94,7 +181,9 @@ wires OS split-DNS (or an NRPT rule on Windows) and, as a fallback, a PAC proxy for browsers that bypass the OS resolver (e.g. a browser forcing DNS-over-HTTPS) — either path alone is enough for `.dig` URLs to load. It never edits `/etc/hosts`, never rewrites URLs, and never intercepts TLS. Run `dig-dns doctor` any time to check -which path is live and get a fix hint for what isn't. +which path is live and get a fix hint for what isn't. → See [DIG and your +DNS](./dns.md) for what dig-dns does and doesn't touch, and how it protects its own +lookup. The [extension](../audiences/content-consumers.md) already opens content directly from a reachable node as a real page — see [Reading from your own @@ -112,6 +201,9 @@ Prefer the signed, `apt upgrade`-able native path: → [Install on Ubuntu/Debian ## Related - [Run a node — overview](./index.md) +- [Install on Ubuntu/Debian via apt](./apt.md) — the same `.deb`, signed and `apt upgrade`-able +- [The chia:// protocol](../browser/chia-protocol.md) — what a `chia://` address is and how it resolves +- [DIG and your DNS](./dns.md) — dig-dns's split-DNS scope + its own encrypted upstream lookup - [Installing the CLI](../digstore/cli/install.md) — the raw `dig-store` binary on its own - [Configure dig-node](./configure.md) — ports, listeners, cache cap, upstream - [Point a consumer at your node](./point-a-consumer.md) — shared `.dig` cache diff --git a/i18n/id/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md b/i18n/id/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/i18n/id/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md +++ b/i18n/id/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/apt.md b/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/apt.md index 138c193..afec318 100644 --- a/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/apt.md +++ b/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,25 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. + +## 4. Check the service -## 4. Start and enable the service +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. -Installing `dig-node` registers a **systemd** unit. Enable it (start now **and** on every boot): +Check it's running and watch its logs: ```sh -sudo systemctl enable --now dig-node +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -Check it's running and watch its logs: +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. + +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: ```sh -systemctl status dig-node # is it active? when did it start? -journalctl -u dig-node -f # follow the node's logs live +sudo systemctl edit dig-node ``` -`systemctl status dig-node` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -87,13 +100,15 @@ To restart after a config change, or stop the service: ```sh sudo systemctl restart dig-node -sudo systemctl stop dig-node # stop serving (does not uninstall) -sudo systemctl disable dig-node # don't start on boot +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/configure.md b/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/configure.md index 587840f..9fdcb8e 100644 --- a/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/configure.md +++ b/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/index.md b/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/index.md +++ b/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md b/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md index 0b297de..317ddf2 100644 --- a/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md +++ b/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell @@ -159,5 +159,5 @@ By default the relay speaks plain `ws://` and expects TLS to be terminated in fr - [Configure a node](./configure.md) — all node settings, including the relay - [Install anywhere — the universal installer](./universal-installer.md) -- [Instal lewat wizard GUI](./universal-installer.md#gui-installer) — alternatif terpandu untuk flag di atas +- [Install via the GUI wizard](./universal-installer.md#gui-installer) — a guided alternative to the flags above - [Run a DIG node](./index.md) — what a node is and why you'd run one diff --git a/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md b/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md index b5e4842..5c1c31e 100644 --- a/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md +++ b/i18n/id/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -12,6 +12,14 @@ keywords: - Windows service - launchd - systemd + - native OS package + - msi + - pkg + - deb + - chia:// scheme handler + - dig-node open + - dign + - digd tags: - dig-node - dig-dns @@ -21,22 +29,43 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. +## Short aliases: `dign` and `digd` {#short-aliases} + +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. + ## GUI installer {#gui-installer} Prefer a guided setup over flags? Download the desktop wizard — @@ -50,14 +79,72 @@ If a component isn't available yet for your platform, it's skipped automatically Re-running the installer over an already-installed `dig-node` or `dig-relay` — to upgrade, for example — needs no manual steps: it stops the running service, replaces the binary with the new version, then starts it again, so the service ends up in the same running or stopped state it was in before. +## Native OS packages {#native-os-packages} + +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): + +| OS | Install a package directly | +|---|---| +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} + +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: + +| How you installed | OS | Ask for it as | +|---|---|---| +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | + +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` + +## Open `chia://` links from anywhere {#chia-scheme-handler} + +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. + +Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. + +### `dig-node open` + +The handler runs one command, which you can also use yourself to open a DIG address: + +```sh +dig-node open chia://[:]/ +dig-node open urn:dig:chia:[:]/ +``` + +It **validates the link strictly** — only `chia://` and `urn:dig:chia:` are accepted, the store id must be a valid 64-hex value, and every other scheme (`file:`, `javascript:`, `http:`, …) is rejected — then opens your local node's address for it in the default browser. Add `--json` for a machine-readable result: + +```sh +dig-node open --json chia:/// +# { "ok": true, "action": "open", "opened": true, +# "url": "http://localhost:9778/s//", "store_id": "", … } +``` + ## `dig.local` The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -68,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -85,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the @@ -94,7 +181,9 @@ wires OS split-DNS (or an NRPT rule on Windows) and, as a fallback, a PAC proxy for browsers that bypass the OS resolver (e.g. a browser forcing DNS-over-HTTPS) — either path alone is enough for `.dig` URLs to load. It never edits `/etc/hosts`, never rewrites URLs, and never intercepts TLS. Run `dig-dns doctor` any time to check -which path is live and get a fix hint for what isn't. +which path is live and get a fix hint for what isn't. → See [DIG and your +DNS](./dns.md) for what dig-dns does and doesn't touch, and how it protects its own +lookup. The [extension](../audiences/content-consumers.md) already opens content directly from a reachable node as a real page — see [Reading from your own @@ -112,6 +201,9 @@ Prefer the signed, `apt upgrade`-able native path: → [Install on Ubuntu/Debian ## Related - [Run a node — overview](./index.md) +- [Install on Ubuntu/Debian via apt](./apt.md) — the same `.deb`, signed and `apt upgrade`-able +- [The chia:// protocol](../browser/chia-protocol.md) — what a `chia://` address is and how it resolves +- [DIG and your DNS](./dns.md) — dig-dns's split-DNS scope + its own encrypted upstream lookup - [Installing the CLI](../digstore/cli/install.md) — the raw `dig-store` binary on its own - [Configure dig-node](./configure.md) — ports, listeners, cache cap, upstream - [Point a consumer at your node](./point-a-consumer.md) — shared `.dig` cache diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md b/i18n/ja/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/apt.md b/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/apt.md index 138c193..afec318 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/apt.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,25 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. + +## 4. Check the service -## 4. Start and enable the service +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. -Installing `dig-node` registers a **systemd** unit. Enable it (start now **and** on every boot): +Check it's running and watch its logs: ```sh -sudo systemctl enable --now dig-node +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -Check it's running and watch its logs: +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. + +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: ```sh -systemctl status dig-node # is it active? when did it start? -journalctl -u dig-node -f # follow the node's logs live +sudo systemctl edit dig-node ``` -`systemctl status dig-node` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -87,13 +100,15 @@ To restart after a config change, or stop the service: ```sh sudo systemctl restart dig-node -sudo systemctl stop dig-node # stop serving (does not uninstall) -sudo systemctl disable dig-node # don't start on boot +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/configure.md b/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/configure.md index 587840f..9fdcb8e 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/configure.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/index.md b/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/index.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md b/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md index e127248..317ddf2 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell @@ -159,5 +159,5 @@ By default the relay speaks plain `ws://` and expects TLS to be terminated in fr - [Configure a node](./configure.md) — all node settings, including the relay - [Install anywhere — the universal installer](./universal-installer.md) -- [GUIウィザードでインストール](./universal-installer.md#gui-installer) — 上記のフラグに代わるガイド付きの方法 +- [Install via the GUI wizard](./universal-installer.md#gui-installer) — a guided alternative to the flags above - [Run a DIG node](./index.md) — what a node is and why you'd run one diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md b/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md index b5e4842..5c1c31e 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -12,6 +12,14 @@ keywords: - Windows service - launchd - systemd + - native OS package + - msi + - pkg + - deb + - chia:// scheme handler + - dig-node open + - dign + - digd tags: - dig-node - dig-dns @@ -21,22 +29,43 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. +## Short aliases: `dign` and `digd` {#short-aliases} + +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. + ## GUI installer {#gui-installer} Prefer a guided setup over flags? Download the desktop wizard — @@ -50,14 +79,72 @@ If a component isn't available yet for your platform, it's skipped automatically Re-running the installer over an already-installed `dig-node` or `dig-relay` — to upgrade, for example — needs no manual steps: it stops the running service, replaces the binary with the new version, then starts it again, so the service ends up in the same running or stopped state it was in before. +## Native OS packages {#native-os-packages} + +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): + +| OS | Install a package directly | +|---|---| +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} + +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: + +| How you installed | OS | Ask for it as | +|---|---|---| +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | + +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` + +## Open `chia://` links from anywhere {#chia-scheme-handler} + +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. + +Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. + +### `dig-node open` + +The handler runs one command, which you can also use yourself to open a DIG address: + +```sh +dig-node open chia://[:]/ +dig-node open urn:dig:chia:[:]/ +``` + +It **validates the link strictly** — only `chia://` and `urn:dig:chia:` are accepted, the store id must be a valid 64-hex value, and every other scheme (`file:`, `javascript:`, `http:`, …) is rejected — then opens your local node's address for it in the default browser. Add `--json` for a machine-readable result: + +```sh +dig-node open --json chia:/// +# { "ok": true, "action": "open", "opened": true, +# "url": "http://localhost:9778/s//", "store_id": "", … } +``` + ## `dig.local` The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -68,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -85,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the @@ -94,7 +181,9 @@ wires OS split-DNS (or an NRPT rule on Windows) and, as a fallback, a PAC proxy for browsers that bypass the OS resolver (e.g. a browser forcing DNS-over-HTTPS) — either path alone is enough for `.dig` URLs to load. It never edits `/etc/hosts`, never rewrites URLs, and never intercepts TLS. Run `dig-dns doctor` any time to check -which path is live and get a fix hint for what isn't. +which path is live and get a fix hint for what isn't. → See [DIG and your +DNS](./dns.md) for what dig-dns does and doesn't touch, and how it protects its own +lookup. The [extension](../audiences/content-consumers.md) already opens content directly from a reachable node as a real page — see [Reading from your own @@ -112,6 +201,9 @@ Prefer the signed, `apt upgrade`-able native path: → [Install on Ubuntu/Debian ## Related - [Run a node — overview](./index.md) +- [Install on Ubuntu/Debian via apt](./apt.md) — the same `.deb`, signed and `apt upgrade`-able +- [The chia:// protocol](../browser/chia-protocol.md) — what a `chia://` address is and how it resolves +- [DIG and your DNS](./dns.md) — dig-dns's split-DNS scope + its own encrypted upstream lookup - [Installing the CLI](../digstore/cli/install.md) — the raw `dig-store` binary on its own - [Configure dig-node](./configure.md) — ports, listeners, cache cap, upstream - [Point a consumer at your node](./point-a-consumer.md) — shared `.dig` cache diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md b/i18n/ko/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/i18n/ko/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md +++ b/i18n/ko/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/apt.md b/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/apt.md index 138c193..afec318 100644 --- a/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/apt.md +++ b/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,25 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. + +## 4. Check the service -## 4. Start and enable the service +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. -Installing `dig-node` registers a **systemd** unit. Enable it (start now **and** on every boot): +Check it's running and watch its logs: ```sh -sudo systemctl enable --now dig-node +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -Check it's running and watch its logs: +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. + +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: ```sh -systemctl status dig-node # is it active? when did it start? -journalctl -u dig-node -f # follow the node's logs live +sudo systemctl edit dig-node ``` -`systemctl status dig-node` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -87,13 +100,15 @@ To restart after a config change, or stop the service: ```sh sudo systemctl restart dig-node -sudo systemctl stop dig-node # stop serving (does not uninstall) -sudo systemctl disable dig-node # don't start on boot +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/configure.md b/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/configure.md index 587840f..9fdcb8e 100644 --- a/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/configure.md +++ b/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/index.md b/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/index.md +++ b/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md b/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md index 185e69d..317ddf2 100644 --- a/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md +++ b/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell @@ -159,5 +159,5 @@ By default the relay speaks plain `ws://` and expects TLS to be terminated in fr - [Configure a node](./configure.md) — all node settings, including the relay - [Install anywhere — the universal installer](./universal-installer.md) -- [GUI 마법사로 설치하기](./universal-installer.md#gui-installer) — 위 플래그의 안내형 대안 +- [Install via the GUI wizard](./universal-installer.md#gui-installer) — a guided alternative to the flags above - [Run a DIG node](./index.md) — what a node is and why you'd run one diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md b/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md index b5e4842..5c1c31e 100644 --- a/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md +++ b/i18n/ko/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -12,6 +12,14 @@ keywords: - Windows service - launchd - systemd + - native OS package + - msi + - pkg + - deb + - chia:// scheme handler + - dig-node open + - dign + - digd tags: - dig-node - dig-dns @@ -21,22 +29,43 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. +## Short aliases: `dign` and `digd` {#short-aliases} + +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. + ## GUI installer {#gui-installer} Prefer a guided setup over flags? Download the desktop wizard — @@ -50,14 +79,72 @@ If a component isn't available yet for your platform, it's skipped automatically Re-running the installer over an already-installed `dig-node` or `dig-relay` — to upgrade, for example — needs no manual steps: it stops the running service, replaces the binary with the new version, then starts it again, so the service ends up in the same running or stopped state it was in before. +## Native OS packages {#native-os-packages} + +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): + +| OS | Install a package directly | +|---|---| +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} + +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: + +| How you installed | OS | Ask for it as | +|---|---|---| +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | + +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` + +## Open `chia://` links from anywhere {#chia-scheme-handler} + +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. + +Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. + +### `dig-node open` + +The handler runs one command, which you can also use yourself to open a DIG address: + +```sh +dig-node open chia://[:]/ +dig-node open urn:dig:chia:[:]/ +``` + +It **validates the link strictly** — only `chia://` and `urn:dig:chia:` are accepted, the store id must be a valid 64-hex value, and every other scheme (`file:`, `javascript:`, `http:`, …) is rejected — then opens your local node's address for it in the default browser. Add `--json` for a machine-readable result: + +```sh +dig-node open --json chia:/// +# { "ok": true, "action": "open", "opened": true, +# "url": "http://localhost:9778/s//", "store_id": "", … } +``` + ## `dig.local` The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -68,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -85,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the @@ -94,7 +181,9 @@ wires OS split-DNS (or an NRPT rule on Windows) and, as a fallback, a PAC proxy for browsers that bypass the OS resolver (e.g. a browser forcing DNS-over-HTTPS) — either path alone is enough for `.dig` URLs to load. It never edits `/etc/hosts`, never rewrites URLs, and never intercepts TLS. Run `dig-dns doctor` any time to check -which path is live and get a fix hint for what isn't. +which path is live and get a fix hint for what isn't. → See [DIG and your +DNS](./dns.md) for what dig-dns does and doesn't touch, and how it protects its own +lookup. The [extension](../audiences/content-consumers.md) already opens content directly from a reachable node as a real page — see [Reading from your own @@ -112,6 +201,9 @@ Prefer the signed, `apt upgrade`-able native path: → [Install on Ubuntu/Debian ## Related - [Run a node — overview](./index.md) +- [Install on Ubuntu/Debian via apt](./apt.md) — the same `.deb`, signed and `apt upgrade`-able +- [The chia:// protocol](../browser/chia-protocol.md) — what a `chia://` address is and how it resolves +- [DIG and your DNS](./dns.md) — dig-dns's split-DNS scope + its own encrypted upstream lookup - [Installing the CLI](../digstore/cli/install.md) — the raw `dig-store` binary on its own - [Configure dig-node](./configure.md) — ports, listeners, cache cap, upstream - [Point a consumer at your node](./point-a-consumer.md) — shared `.dig` cache diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/apt.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/apt.md index 138c193..afec318 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/apt.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,25 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. + +## 4. Check the service -## 4. Start and enable the service +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. -Installing `dig-node` registers a **systemd** unit. Enable it (start now **and** on every boot): +Check it's running and watch its logs: ```sh -sudo systemctl enable --now dig-node +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -Check it's running and watch its logs: +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. + +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: ```sh -systemctl status dig-node # is it active? when did it start? -journalctl -u dig-node -f # follow the node's logs live +sudo systemctl edit dig-node ``` -`systemctl status dig-node` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -87,13 +100,15 @@ To restart after a config change, or stop the service: ```sh sudo systemctl restart dig-node -sudo systemctl stop dig-node # stop serving (does not uninstall) -sudo systemctl disable dig-node # don't start on boot +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/configure.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/configure.md index 587840f..9fdcb8e 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/configure.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/index.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/index.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md index ab6b48c..317ddf2 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell @@ -159,5 +159,5 @@ By default the relay speaks plain `ws://` and expects TLS to be terminated in fr - [Configure a node](./configure.md) — all node settings, including the relay - [Install anywhere — the universal installer](./universal-installer.md) -- [Instalar pelo assistente gráfico](./universal-installer.md#gui-installer) — uma alternativa guiada às flags acima +- [Install via the GUI wizard](./universal-installer.md#gui-installer) — a guided alternative to the flags above - [Run a DIG node](./index.md) — what a node is and why you'd run one diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md index b5e4842..5c1c31e 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -12,6 +12,14 @@ keywords: - Windows service - launchd - systemd + - native OS package + - msi + - pkg + - deb + - chia:// scheme handler + - dig-node open + - dign + - digd tags: - dig-node - dig-dns @@ -21,22 +29,43 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. +## Short aliases: `dign` and `digd` {#short-aliases} + +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. + ## GUI installer {#gui-installer} Prefer a guided setup over flags? Download the desktop wizard — @@ -50,14 +79,72 @@ If a component isn't available yet for your platform, it's skipped automatically Re-running the installer over an already-installed `dig-node` or `dig-relay` — to upgrade, for example — needs no manual steps: it stops the running service, replaces the binary with the new version, then starts it again, so the service ends up in the same running or stopped state it was in before. +## Native OS packages {#native-os-packages} + +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): + +| OS | Install a package directly | +|---|---| +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} + +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: + +| How you installed | OS | Ask for it as | +|---|---|---| +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | + +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` + +## Open `chia://` links from anywhere {#chia-scheme-handler} + +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. + +Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. + +### `dig-node open` + +The handler runs one command, which you can also use yourself to open a DIG address: + +```sh +dig-node open chia://[:]/ +dig-node open urn:dig:chia:[:]/ +``` + +It **validates the link strictly** — only `chia://` and `urn:dig:chia:` are accepted, the store id must be a valid 64-hex value, and every other scheme (`file:`, `javascript:`, `http:`, …) is rejected — then opens your local node's address for it in the default browser. Add `--json` for a machine-readable result: + +```sh +dig-node open --json chia:/// +# { "ok": true, "action": "open", "opened": true, +# "url": "http://localhost:9778/s//", "store_id": "", … } +``` + ## `dig.local` The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -68,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -85,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the @@ -94,7 +181,9 @@ wires OS split-DNS (or an NRPT rule on Windows) and, as a fallback, a PAC proxy for browsers that bypass the OS resolver (e.g. a browser forcing DNS-over-HTTPS) — either path alone is enough for `.dig` URLs to load. It never edits `/etc/hosts`, never rewrites URLs, and never intercepts TLS. Run `dig-dns doctor` any time to check -which path is live and get a fix hint for what isn't. +which path is live and get a fix hint for what isn't. → See [DIG and your +DNS](./dns.md) for what dig-dns does and doesn't touch, and how it protects its own +lookup. The [extension](../audiences/content-consumers.md) already opens content directly from a reachable node as a real page — see [Reading from your own @@ -112,6 +201,9 @@ Prefer the signed, `apt upgrade`-able native path: → [Install on Ubuntu/Debian ## Related - [Run a node — overview](./index.md) +- [Install on Ubuntu/Debian via apt](./apt.md) — the same `.deb`, signed and `apt upgrade`-able +- [The chia:// protocol](../browser/chia-protocol.md) — what a `chia://` address is and how it resolves +- [DIG and your DNS](./dns.md) — dig-dns's split-DNS scope + its own encrypted upstream lookup - [Installing the CLI](../digstore/cli/install.md) — the raw `dig-store` binary on its own - [Configure dig-node](./configure.md) — ports, listeners, cache cap, upstream - [Point a consumer at your node](./point-a-consumer.md) — shared `.dig` cache diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md b/i18n/ru/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md +++ b/i18n/ru/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/apt.md b/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/apt.md index 138c193..afec318 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/apt.md +++ b/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,25 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. + +## 4. Check the service -## 4. Start and enable the service +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. -Installing `dig-node` registers a **systemd** unit. Enable it (start now **and** on every boot): +Check it's running and watch its logs: ```sh -sudo systemctl enable --now dig-node +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -Check it's running and watch its logs: +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. + +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: ```sh -systemctl status dig-node # is it active? when did it start? -journalctl -u dig-node -f # follow the node's logs live +sudo systemctl edit dig-node ``` -`systemctl status dig-node` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -87,13 +100,15 @@ To restart after a config change, or stop the service: ```sh sudo systemctl restart dig-node -sudo systemctl stop dig-node # stop serving (does not uninstall) -sudo systemctl disable dig-node # don't start on boot +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/configure.md b/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/configure.md index 587840f..9fdcb8e 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/configure.md +++ b/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/index.md b/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/index.md +++ b/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md b/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md index dae3518..317ddf2 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md +++ b/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell @@ -159,5 +159,5 @@ By default the relay speaks plain `ws://` and expects TLS to be terminated in fr - [Configure a node](./configure.md) — all node settings, including the relay - [Install anywhere — the universal installer](./universal-installer.md) -- [Установка через графический мастер](./universal-installer.md#gui-installer) — управляемая альтернатива флагам выше +- [Install via the GUI wizard](./universal-installer.md#gui-installer) — a guided alternative to the flags above - [Run a DIG node](./index.md) — what a node is and why you'd run one diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md b/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md index b5e4842..5c1c31e 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md +++ b/i18n/ru/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -12,6 +12,14 @@ keywords: - Windows service - launchd - systemd + - native OS package + - msi + - pkg + - deb + - chia:// scheme handler + - dig-node open + - dign + - digd tags: - dig-node - dig-dns @@ -21,22 +29,43 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. +## Short aliases: `dign` and `digd` {#short-aliases} + +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. + ## GUI installer {#gui-installer} Prefer a guided setup over flags? Download the desktop wizard — @@ -50,14 +79,72 @@ If a component isn't available yet for your platform, it's skipped automatically Re-running the installer over an already-installed `dig-node` or `dig-relay` — to upgrade, for example — needs no manual steps: it stops the running service, replaces the binary with the new version, then starts it again, so the service ends up in the same running or stopped state it was in before. +## Native OS packages {#native-os-packages} + +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): + +| OS | Install a package directly | +|---|---| +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} + +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: + +| How you installed | OS | Ask for it as | +|---|---|---| +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | + +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` + +## Open `chia://` links from anywhere {#chia-scheme-handler} + +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. + +Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. + +### `dig-node open` + +The handler runs one command, which you can also use yourself to open a DIG address: + +```sh +dig-node open chia://[:]/ +dig-node open urn:dig:chia:[:]/ +``` + +It **validates the link strictly** — only `chia://` and `urn:dig:chia:` are accepted, the store id must be a valid 64-hex value, and every other scheme (`file:`, `javascript:`, `http:`, …) is rejected — then opens your local node's address for it in the default browser. Add `--json` for a machine-readable result: + +```sh +dig-node open --json chia:/// +# { "ok": true, "action": "open", "opened": true, +# "url": "http://localhost:9778/s//", "store_id": "", … } +``` + ## `dig.local` The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -68,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -85,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the @@ -94,7 +181,9 @@ wires OS split-DNS (or an NRPT rule on Windows) and, as a fallback, a PAC proxy for browsers that bypass the OS resolver (e.g. a browser forcing DNS-over-HTTPS) — either path alone is enough for `.dig` URLs to load. It never edits `/etc/hosts`, never rewrites URLs, and never intercepts TLS. Run `dig-dns doctor` any time to check -which path is live and get a fix hint for what isn't. +which path is live and get a fix hint for what isn't. → See [DIG and your +DNS](./dns.md) for what dig-dns does and doesn't touch, and how it protects its own +lookup. The [extension](../audiences/content-consumers.md) already opens content directly from a reachable node as a real page — see [Reading from your own @@ -112,6 +201,9 @@ Prefer the signed, `apt upgrade`-able native path: → [Install on Ubuntu/Debian ## Related - [Run a node — overview](./index.md) +- [Install on Ubuntu/Debian via apt](./apt.md) — the same `.deb`, signed and `apt upgrade`-able +- [The chia:// protocol](../browser/chia-protocol.md) — what a `chia://` address is and how it resolves +- [DIG and your DNS](./dns.md) — dig-dns's split-DNS scope + its own encrypted upstream lookup - [Installing the CLI](../digstore/cli/install.md) — the raw `dig-store` binary on its own - [Configure dig-node](./configure.md) — ports, listeners, cache cap, upstream - [Point a consumer at your node](./point-a-consumer.md) — shared `.dig` cache diff --git a/i18n/tr/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md b/i18n/tr/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/i18n/tr/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md +++ b/i18n/tr/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/apt.md b/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/apt.md index 138c193..afec318 100644 --- a/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/apt.md +++ b/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,25 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. + +## 4. Check the service -## 4. Start and enable the service +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. -Installing `dig-node` registers a **systemd** unit. Enable it (start now **and** on every boot): +Check it's running and watch its logs: ```sh -sudo systemctl enable --now dig-node +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -Check it's running and watch its logs: +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. + +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: ```sh -systemctl status dig-node # is it active? when did it start? -journalctl -u dig-node -f # follow the node's logs live +sudo systemctl edit dig-node ``` -`systemctl status dig-node` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -87,13 +100,15 @@ To restart after a config change, or stop the service: ```sh sudo systemctl restart dig-node -sudo systemctl stop dig-node # stop serving (does not uninstall) -sudo systemctl disable dig-node # don't start on boot +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/configure.md b/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/configure.md index 587840f..9fdcb8e 100644 --- a/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/configure.md +++ b/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/index.md b/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/index.md +++ b/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md b/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md index 0fafef8..317ddf2 100644 --- a/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md +++ b/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell @@ -159,5 +159,5 @@ By default the relay speaks plain `ws://` and expects TLS to be terminated in fr - [Configure a node](./configure.md) — all node settings, including the relay - [Install anywhere — the universal installer](./universal-installer.md) -- [GUI sihirbazıyla kur](./universal-installer.md#gui-installer) — yukarıdaki bayraklara rehberli bir alternatif +- [Install via the GUI wizard](./universal-installer.md#gui-installer) — a guided alternative to the flags above - [Run a DIG node](./index.md) — what a node is and why you'd run one diff --git a/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md b/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md index b5e4842..5c1c31e 100644 --- a/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md +++ b/i18n/tr/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -12,6 +12,14 @@ keywords: - Windows service - launchd - systemd + - native OS package + - msi + - pkg + - deb + - chia:// scheme handler + - dig-node open + - dign + - digd tags: - dig-node - dig-dns @@ -21,22 +29,43 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. +## Short aliases: `dign` and `digd` {#short-aliases} + +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. + ## GUI installer {#gui-installer} Prefer a guided setup over flags? Download the desktop wizard — @@ -50,14 +79,72 @@ If a component isn't available yet for your platform, it's skipped automatically Re-running the installer over an already-installed `dig-node` or `dig-relay` — to upgrade, for example — needs no manual steps: it stops the running service, replaces the binary with the new version, then starts it again, so the service ends up in the same running or stopped state it was in before. +## Native OS packages {#native-os-packages} + +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): + +| OS | Install a package directly | +|---|---| +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} + +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: + +| How you installed | OS | Ask for it as | +|---|---|---| +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | + +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` + +## Open `chia://` links from anywhere {#chia-scheme-handler} + +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. + +Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. + +### `dig-node open` + +The handler runs one command, which you can also use yourself to open a DIG address: + +```sh +dig-node open chia://[:]/ +dig-node open urn:dig:chia:[:]/ +``` + +It **validates the link strictly** — only `chia://` and `urn:dig:chia:` are accepted, the store id must be a valid 64-hex value, and every other scheme (`file:`, `javascript:`, `http:`, …) is rejected — then opens your local node's address for it in the default browser. Add `--json` for a machine-readable result: + +```sh +dig-node open --json chia:/// +# { "ok": true, "action": "open", "opened": true, +# "url": "http://localhost:9778/s//", "store_id": "", … } +``` + ## `dig.local` The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -68,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -85,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the @@ -94,7 +181,9 @@ wires OS split-DNS (or an NRPT rule on Windows) and, as a fallback, a PAC proxy for browsers that bypass the OS resolver (e.g. a browser forcing DNS-over-HTTPS) — either path alone is enough for `.dig` URLs to load. It never edits `/etc/hosts`, never rewrites URLs, and never intercepts TLS. Run `dig-dns doctor` any time to check -which path is live and get a fix hint for what isn't. +which path is live and get a fix hint for what isn't. → See [DIG and your +DNS](./dns.md) for what dig-dns does and doesn't touch, and how it protects its own +lookup. The [extension](../audiences/content-consumers.md) already opens content directly from a reachable node as a real page — see [Reading from your own @@ -112,6 +201,9 @@ Prefer the signed, `apt upgrade`-able native path: → [Install on Ubuntu/Debian ## Related - [Run a node — overview](./index.md) +- [Install on Ubuntu/Debian via apt](./apt.md) — the same `.deb`, signed and `apt upgrade`-able +- [The chia:// protocol](../browser/chia-protocol.md) — what a `chia://` address is and how it resolves +- [DIG and your DNS](./dns.md) — dig-dns's split-DNS scope + its own encrypted upstream lookup - [Installing the CLI](../digstore/cli/install.md) — the raw `dig-store` binary on its own - [Configure dig-node](./configure.md) — ports, listeners, cache cap, upstream - [Point a consumer at your node](./point-a-consumer.md) — shared `.dig` cache diff --git a/i18n/vi/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md b/i18n/vi/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/i18n/vi/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md +++ b/i18n/vi/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/apt.md b/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/apt.md index 138c193..afec318 100644 --- a/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/apt.md +++ b/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,25 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. + +## 4. Check the service -## 4. Start and enable the service +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. -Installing `dig-node` registers a **systemd** unit. Enable it (start now **and** on every boot): +Check it's running and watch its logs: ```sh -sudo systemctl enable --now dig-node +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -Check it's running and watch its logs: +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. + +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: ```sh -systemctl status dig-node # is it active? when did it start? -journalctl -u dig-node -f # follow the node's logs live +sudo systemctl edit dig-node ``` -`systemctl status dig-node` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -87,13 +100,15 @@ To restart after a config change, or stop the service: ```sh sudo systemctl restart dig-node -sudo systemctl stop dig-node # stop serving (does not uninstall) -sudo systemctl disable dig-node # don't start on boot +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/configure.md b/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/configure.md index 587840f..9fdcb8e 100644 --- a/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/configure.md +++ b/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/index.md b/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/index.md +++ b/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md b/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md index bc0ca24..317ddf2 100644 --- a/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md +++ b/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell @@ -159,5 +159,5 @@ By default the relay speaks plain `ws://` and expects TLS to be terminated in fr - [Configure a node](./configure.md) — all node settings, including the relay - [Install anywhere — the universal installer](./universal-installer.md) -- [Cài đặt qua trình hướng dẫn GUI](./universal-installer.md#gui-installer) — một cách thay thế có hướng dẫn cho các cờ ở trên +- [Install via the GUI wizard](./universal-installer.md#gui-installer) — a guided alternative to the flags above - [Run a DIG node](./index.md) — what a node is and why you'd run one diff --git a/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md b/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md index b5e4842..5c1c31e 100644 --- a/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md +++ b/i18n/vi/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -12,6 +12,14 @@ keywords: - Windows service - launchd - systemd + - native OS package + - msi + - pkg + - deb + - chia:// scheme handler + - dig-node open + - dign + - digd tags: - dig-node - dig-dns @@ -21,22 +29,43 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. +## Short aliases: `dign` and `digd` {#short-aliases} + +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. + ## GUI installer {#gui-installer} Prefer a guided setup over flags? Download the desktop wizard — @@ -50,14 +79,72 @@ If a component isn't available yet for your platform, it's skipped automatically Re-running the installer over an already-installed `dig-node` or `dig-relay` — to upgrade, for example — needs no manual steps: it stops the running service, replaces the binary with the new version, then starts it again, so the service ends up in the same running or stopped state it was in before. +## Native OS packages {#native-os-packages} + +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): + +| OS | Install a package directly | +|---|---| +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} + +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: + +| How you installed | OS | Ask for it as | +|---|---|---| +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | + +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` + +## Open `chia://` links from anywhere {#chia-scheme-handler} + +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. + +Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. + +### `dig-node open` + +The handler runs one command, which you can also use yourself to open a DIG address: + +```sh +dig-node open chia://[:]/ +dig-node open urn:dig:chia:[:]/ +``` + +It **validates the link strictly** — only `chia://` and `urn:dig:chia:` are accepted, the store id must be a valid 64-hex value, and every other scheme (`file:`, `javascript:`, `http:`, …) is rejected — then opens your local node's address for it in the default browser. Add `--json` for a machine-readable result: + +```sh +dig-node open --json chia:/// +# { "ok": true, "action": "open", "opened": true, +# "url": "http://localhost:9778/s//", "store_id": "", … } +``` + ## `dig.local` The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -68,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -85,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the @@ -94,7 +181,9 @@ wires OS split-DNS (or an NRPT rule on Windows) and, as a fallback, a PAC proxy for browsers that bypass the OS resolver (e.g. a browser forcing DNS-over-HTTPS) — either path alone is enough for `.dig` URLs to load. It never edits `/etc/hosts`, never rewrites URLs, and never intercepts TLS. Run `dig-dns doctor` any time to check -which path is live and get a fix hint for what isn't. +which path is live and get a fix hint for what isn't. → See [DIG and your +DNS](./dns.md) for what dig-dns does and doesn't touch, and how it protects its own +lookup. The [extension](../audiences/content-consumers.md) already opens content directly from a reachable node as a real page — see [Reading from your own @@ -112,6 +201,9 @@ Prefer the signed, `apt upgrade`-able native path: → [Install on Ubuntu/Debian ## Related - [Run a node — overview](./index.md) +- [Install on Ubuntu/Debian via apt](./apt.md) — the same `.deb`, signed and `apt upgrade`-able +- [The chia:// protocol](../browser/chia-protocol.md) — what a `chia://` address is and how it resolves +- [DIG and your DNS](./dns.md) — dig-dns's split-DNS scope + its own encrypted upstream lookup - [Installing the CLI](../digstore/cli/install.md) — the raw `dig-store` binary on its own - [Configure dig-node](./configure.md) — ports, listeners, cache cap, upstream - [Point a consumer at your node](./point-a-consumer.md) — shared `.dig` cache diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/apt.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/apt.md index 138c193..afec318 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/apt.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,25 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. + +## 4. Check the service -## 4. Start and enable the service +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. -Installing `dig-node` registers a **systemd** unit. Enable it (start now **and** on every boot): +Check it's running and watch its logs: ```sh -sudo systemctl enable --now dig-node +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -Check it's running and watch its logs: +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. + +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: ```sh -systemctl status dig-node # is it active? when did it start? -journalctl -u dig-node -f # follow the node's logs live +sudo systemctl edit dig-node ``` -`systemctl status dig-node` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -87,13 +100,15 @@ To restart after a config change, or stop the service: ```sh sudo systemctl restart dig-node -sudo systemctl stop dig-node # stop serving (does not uninstall) -sudo systemctl disable dig-node # don't start on boot +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/configure.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/configure.md index 587840f..9fdcb8e 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/configure.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/index.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/index.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md index 43da852..317ddf2 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell @@ -159,5 +159,5 @@ By default the relay speaks plain `ws://` and expects TLS to be terminated in fr - [Configure a node](./configure.md) — all node settings, including the relay - [Install anywhere — the universal installer](./universal-installer.md) -- [通过图形向导安装](./universal-installer.md#gui-installer) —— 上述参数的一种引导式替代方案 +- [Install via the GUI wizard](./universal-installer.md#gui-installer) — a guided alternative to the flags above - [Run a DIG node](./index.md) — what a node is and why you'd run one diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md index b5e4842..5c1c31e 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -12,6 +12,14 @@ keywords: - Windows service - launchd - systemd + - native OS package + - msi + - pkg + - deb + - chia:// scheme handler + - dig-node open + - dign + - digd tags: - dig-node - dig-dns @@ -21,22 +29,43 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. +## Short aliases: `dign` and `digd` {#short-aliases} + +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. + ## GUI installer {#gui-installer} Prefer a guided setup over flags? Download the desktop wizard — @@ -50,14 +79,72 @@ If a component isn't available yet for your platform, it's skipped automatically Re-running the installer over an already-installed `dig-node` or `dig-relay` — to upgrade, for example — needs no manual steps: it stops the running service, replaces the binary with the new version, then starts it again, so the service ends up in the same running or stopped state it was in before. +## Native OS packages {#native-os-packages} + +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): + +| OS | Install a package directly | +|---|---| +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} + +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: + +| How you installed | OS | Ask for it as | +|---|---|---| +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | + +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` + +## Open `chia://` links from anywhere {#chia-scheme-handler} + +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. + +Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. + +### `dig-node open` + +The handler runs one command, which you can also use yourself to open a DIG address: + +```sh +dig-node open chia://[:]/ +dig-node open urn:dig:chia:[:]/ +``` + +It **validates the link strictly** — only `chia://` and `urn:dig:chia:` are accepted, the store id must be a valid 64-hex value, and every other scheme (`file:`, `javascript:`, `http:`, …) is rejected — then opens your local node's address for it in the default browser. Add `--json` for a machine-readable result: + +```sh +dig-node open --json chia:/// +# { "ok": true, "action": "open", "opened": true, +# "url": "http://localhost:9778/s//", "store_id": "", … } +``` + ## `dig.local` The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -68,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -85,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the @@ -94,7 +181,9 @@ wires OS split-DNS (or an NRPT rule on Windows) and, as a fallback, a PAC proxy for browsers that bypass the OS resolver (e.g. a browser forcing DNS-over-HTTPS) — either path alone is enough for `.dig` URLs to load. It never edits `/etc/hosts`, never rewrites URLs, and never intercepts TLS. Run `dig-dns doctor` any time to check -which path is live and get a fix hint for what isn't. +which path is live and get a fix hint for what isn't. → See [DIG and your +DNS](./dns.md) for what dig-dns does and doesn't touch, and how it protects its own +lookup. The [extension](../audiences/content-consumers.md) already opens content directly from a reachable node as a real page — see [Reading from your own @@ -112,6 +201,9 @@ Prefer the signed, `apt upgrade`-able native path: → [Install on Ubuntu/Debian ## Related - [Run a node — overview](./index.md) +- [Install on Ubuntu/Debian via apt](./apt.md) — the same `.deb`, signed and `apt upgrade`-able +- [The chia:// protocol](../browser/chia-protocol.md) — what a `chia://` address is and how it resolves +- [DIG and your DNS](./dns.md) — dig-dns's split-DNS scope + its own encrypted upstream lookup - [Installing the CLI](../digstore/cli/install.md) — the raw `dig-store` binary on its own - [Configure dig-node](./configure.md) — ports, listeners, cache cap, upstream - [Point a consumer at your node](./point-a-consumer.md) — shared `.dig` cache diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md b/i18n/zh-TW/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md index 68e9e28..bcf942e 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/build-a-dapp/deploy-existing-app.md @@ -71,6 +71,30 @@ The publish-success screen shows every way to reach it, all free: - **A `.dig` address** (`http://.dig/`) — opens in *any* browser once [dig-dns](../run-a-node/universal-installer.md#browse-dig-names-directly) is installed on that device. - A **`*.on.dig.net`** friendly subdomain is an **optional** upgrade (a separate, paid registration) — never required to view or share what you just published. +## Find the store behind a subdomain {#x-dig-store} + +Any `*.on.dig.net` subdomain will tell you which store it serves. A `HEAD` request on its root answers with two response headers: + +| Header | Value | +|---|---| +| `X-Dig-Store` | The 64-hex store id | +| `X-Dig-URN` | The full `urn:dig:chia:` address | + +```sh +curl -sI https://chia-offer.on.dig.net/ | grep -i '^x-dig-' +# X-Dig-Urn: urn:dig:chia:6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +# X-Dig-Store: 6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f +``` + +Both are listed in `Access-Control-Expose-Headers`, so in-browser code can read them cross-origin too: + +```js +const response = await fetch('https://chia-offer.on.dig.net/', {method: 'HEAD'}); +const storeId = response.headers.get('X-Dig-Store'); +``` + +That turns a friendly domain into a verifiable address: hand the store id to `dign open chia:///`, or to any [dig RPC](../rpc/what-is-the-dig-rpc.md) read call, and the content is checked against the chain rather than trusted because of the domain it came from. A subdomain pinned to one root also returns `X-Dig-Root`. + ## Related - [Quickstart](../quickstart.md) — the shorter end-to-end "ship a site" path (web and CLI) diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/apt.md b/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/apt.md index 138c193..afec318 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/apt.md +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/apt.md @@ -19,9 +19,18 @@ tags: On Ubuntu, Debian, and other Debian-family distributions, install the DIG ecosystem from the **`apt.dig.net`** repository. You get the `dig-node` service and the `dig-store` CLI as ordinary apt packages — signed, and upgraded with `apt upgrade` like anything else on the box. Installing `dig-node` sets up and **enables a systemd service** so your node starts on boot and stays running. -:::note Pre-release — infrastructure being provisioned -`apt.dig.net` is still being stood up, so these commands may not resolve yet. They are the **real, intended** flow — bookmark this page. In the meantime, use the cross-platform [universal installer](./index.md#universal-installer-any-os) or grab a binary from the [Releases page](https://github.com/DIG-Network/dig-node/releases). -::: +## What apt serves today {#what-apt-serves-today} + +Check this before you choose apt, because the repository trails the current releases: + +| Package | apt serves | Current release | Architectures | +|---|---|---|---| +| `dig-node` | 0.43.0 | 0.64.0 | `amd64` only | +| `dig-store` | 0.17.0 | 0.19.3 | `amd64`, `arm64` | + +**Choose apt** when you want `dig-node` managed by your package manager on an x86-64 Debian-family box and an older node is acceptable. + +**Choose the [DIG Installer](./universal-installer.md)** when you want the current `dig-node`, or you are on `arm64`, or you want the `dign` and `digd` short aliases, `dig-dns`, `dig.local`, and the `chia://` scheme handler — none of which are part of these apt packages. ## 1. Add the signing key @@ -45,25 +54,29 @@ echo "deb [signed-by=/usr/share/keyrings/dig.gpg] https://apt.dig.net stable mai sudo apt update && sudo apt install dig-node dig-store ``` -- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). -- **`dig-store`** — the CLI for creating, committing, and reading stores. Optional if you only want to serve, but usually wanted alongside. +- **`dig-node`** — the headless node service (serves the [dig RPC](../rpc/what-is-the-dig-rpc.md), hosts capsules, keeps the local `.dig` cache). Installs `/usr/bin/dig-node`. +- **`dig-store`** — the CLI for creating, committing, and reading stores. Installs `dig-store` plus its `digs` alias. Optional if you only want to serve, but usually wanted alongside. + +## 4. Check the service -## 4. Start and enable the service +Installing `dig-node` registers the **systemd** unit `dig-node.service` and **enables + starts it for you**, so it's already running and will come back on every boot. No manual enable step is needed. -Installing `dig-node` registers a **systemd** unit. Enable it (start now **and** on every boot): +Check it's running and watch its logs: ```sh -sudo systemctl enable --now dig-node +systemctl status dig-node # is it active? when did it start? +journalctl -u dig-node -f # follow the node's logs live ``` -Check it's running and watch its logs: +`systemctl status` should report `active (running)`. The node now serves the dig RPC on `127.0.0.1:9778` and begins hosting/caching content. + +The service runs as its own unprivileged `dig-node` system account — never root — and keeps its `.dig` cache in `/var/lib/dig-node`. Change any of its settings with a drop-in: ```sh -systemctl status dig-node # is it active? when did it start? -journalctl -u dig-node -f # follow the node's logs live +sudo systemctl edit dig-node ``` -`systemctl status dig-node` should report `active (running)`. The node now serves the dig RPC on its local endpoint and begins hosting/caching content. +→ [Configure dig-node](./configure.md) for the settings you can set ## What dig-node does once it's running @@ -87,13 +100,15 @@ To restart after a config change, or stop the service: ```sh sudo systemctl restart dig-node -sudo systemctl stop dig-node # stop serving (does not uninstall) -sudo systemctl disable dig-node # don't start on boot +sudo systemctl stop dig-node # stop serving (does not uninstall) +sudo systemctl disable dig-node # don't start on boot ``` +To run a newer `dig-node` than the repository carries, use the [DIG Installer](./universal-installer.md) instead of apt — it always resolves the current release. Pick one route per machine and stay on it, so there is only ever one `dig-node` and one service to reason about. + ## Other operating systems -apt is the **Ubuntu/Debian-native** path. For Windows, macOS, or non-Debian Linux, use the cross-platform **[DIG Installer](./index.md#universal-installer-any-os)** (`curl … | sh`), which installs the `dig-node` and `dig-dns` services (as a Windows service / `systemd` / `launchd`) plus the `dig-store` CLI on every OS, all by default in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. +apt is the **Ubuntu/Debian-native** path on x86-64. For Windows, macOS, `arm64` Linux, or non-Debian Linux, use the cross-platform **[DIG Installer](./universal-installer.md)**, which installs the `dig-node` and `dig-dns` services (as a Windows service / `launchd` / `systemd`) plus the `dig-store` CLI in one run. To **read** DIG content without running a node, just get the **[DIG Browser ↗](https://github.com/DIG-Network/DIG_Browser/releases)**. ## Related diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/configure.md b/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/configure.md index 587840f..9fdcb8e 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/configure.md +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/configure.md @@ -30,7 +30,13 @@ The node only ever stores and relays **ciphertext** keyed by hashes — configur ## Apply settings -Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the service (the Windows service / `systemctl restart dig-node` / `launchctl`). +Set values in the config file or as `DIGNODE_*` environment variables (env overrides file). After changing settings, restart the node: + +```sh +dign stop && dign start +``` + +That works on every platform and every install route. To drive the service manager directly instead, use the id for your route — see [finding the service on your machine](./universal-installer.md#service-ids). ## Related diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/index.md b/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/index.md index 35b66ce..c1a86ca 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/index.md +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/index.md @@ -35,35 +35,54 @@ When both are installed, the browser/extension read from your local dig-node; ot | Your machine | Use | |---|---| -| **Ubuntu / Debian** | The native **[apt repository](./apt.md)** — `apt install dig-node dig-store`, auto-enabled as a systemd service. | -| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one `curl \| sh` (or download) installs the full stack for every OS. | +| **Windows / macOS / Linux (any)** | The cross-platform **[DIG Installer](#universal-installer-any-os)** — one command installs the current `dig-node`, `dig-dns`, and the `dig-store` CLI. | +| **Ubuntu / Debian (x86-64)** | The native **[apt repository](./apt.md)** — ordinary `apt` packages you upgrade with the rest of the box. It currently serves an older `dig-node` than the DIG Installer does. | -Both install `dig-node` plus the `dig-store` CLI; the DIG Installer additionally installs `dig-dns` by default. apt is the Debian-native path (signed, `apt upgrade`-able); the DIG Installer covers everything else. - -### apt (Ubuntu / Debian) — recommended on Debian-family systems - -The native path: a signed apt repository at `apt.dig.net`. It installs `dig-node` as a managed **systemd service** and keeps it updated with `apt upgrade`. - -→ **[Install on Ubuntu/Debian via apt](./apt.md)** +The DIG Installer is the path to a current node on every platform. apt is the Debian-native alternative when you want `dig-node` managed by your package manager — see [what apt serves today](./apt.md#what-apt-serves-today) before choosing it. ### DIG Installer (any OS) {#universal-installer-any-os} -The cross-platform path — Windows, macOS, and any Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed: +The cross-platform path — Windows, macOS, and Linux. The **DIG Installer** detects your OS and installs the full DIG stack in one run — the `dig-store` CLI, plus the `dig-node` and `dig-dns` boot-start services — with no package manager needed. + +It registers system services and writes into a protected install root, so it needs administrator rights and stops without changing anything if it doesn't have them: ```sh -curl -fsSL https://dig.net/install.sh | sh +# macOS / Linux +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell, or on Windows. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download and run it directly if you prefer not to pipe to a shell. Doing so also opens a guided [GUI wizard](./universal-installer.md#gui-installer), if you'd rather click through than use flags. -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: +→ **[Full installer reference — flags, platforms, service ids](./universal-installer.md)** + +### apt (Ubuntu / Debian) + +A signed apt repository at `apt.dig.net` installs `dig-node` as a managed **systemd service** on x86-64 Debian-family systems. + +→ **[Install on Ubuntu/Debian via apt](./apt.md)** + +## Check it works + +Ask your node to open a real store — this one is a live DIG-hosted app: + +```sh +dign open chia://6ed1e80d44840735bf3c94a38f93e9a7c2e1077872681edf7c5985a14d17513f/ +``` + +Your node resolves the store, verifies it against the chain, and opens the result in your default browser. If a page loads, your node is serving. + +`dign open` hands the address to your browser, so it is a check you watch rather than one you script. For a scriptable signal, ask the node for its status instead: + +```sh +dign status --json +``` + +→ [More ways to verify + the health checks the installer runs](./universal-installer.md#an-always-on-service-verified-after-install) ## Just want to read content? diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md b/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md index 1444dec..317ddf2 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/run-a-relay.md @@ -56,7 +56,7 @@ Install it with the [universal installer](./universal-installer.md): ```bash # Linux / macOS -curl -fsSL https://raw.githubusercontent.com/DIG-Network/dig-installer/main/install.sh | sh -s -- --with-relay +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --with-relay ``` ```powershell @@ -159,5 +159,5 @@ By default the relay speaks plain `ws://` and expects TLS to be terminated in fr - [Configure a node](./configure.md) — all node settings, including the relay - [Install anywhere — the universal installer](./universal-installer.md) -- [透過圖形精靈安裝](./universal-installer.md#gui-installer) —— 上述旗標的一種引導式替代方案 +- [Install via the GUI wizard](./universal-installer.md#gui-installer) — a guided alternative to the flags above - [Run a DIG node](./index.md) — what a node is and why you'd run one diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md b/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md index b5e4842..5c1c31e 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/run-a-node/universal-installer.md @@ -1,7 +1,7 @@ --- sidebar_position: 3 title: Install anywhere — the universal installer -description: "The DIG Installer — the cross-platform installer for Windows, macOS, and any Linux. One curl | sh (or irm | iex, or a direct download) installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." +description: "The DIG Installer — the cross-platform installer for Windows, macOS, and x86-64 Linux. One elevated command installs the full DIG stack by default: the dig-store CLI plus the dig-node and dig-dns boot-start services, and registers dig.local." keywords: - DIG Installer - universal installer @@ -12,6 +12,14 @@ keywords: - Windows service - launchd - systemd + - native OS package + - msi + - pkg + - deb + - chia:// scheme handler + - dig-node open + - dign + - digd tags: - dig-node - dig-dns @@ -21,22 +29,43 @@ tags: # Install anywhere — the universal installer -The cross-platform path — **Windows, macOS, and any Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. +The cross-platform path — **Windows, macOS, and x86-64 Linux**. The **DIG Installer** detects your OS and installs the full DIG stack in one run: the `dig-store` CLI, plus the `dig-node` and `dig-dns` services, both registered to start automatically on every boot. It needs no package manager. ```sh # macOS / Linux -curl -fsSL https://dig.net/install.sh | sh +curl -fsSL https://dig.net/install.sh | sudo sh ``` ```powershell -# Windows (PowerShell) +# Windows — in a PowerShell opened with "Run as administrator" irm https://dig.net/install.ps1 | iex ``` -This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly if you prefer not to pipe to a shell, or on Windows. +### Why it needs administrator rights {#elevation} + +The default install registers boot-start OS services and writes into an administrator-only install root, so it requires elevation on every platform. Run it **without** elevation and it stops **before** downloading or changing anything, telling you to re-run elevated — nothing is installed and no partial state is left behind. So: + +- **Linux / macOS** — put `sudo` in the command, as above. The bootstrap script does not elevate itself. +- **Windows** — open PowerShell with **Run as administrator** first. Piping to `iex` from an ordinary shell stops at the same check. + +### Platforms it installs on {#platforms} + +| OS | Architecture | +|---|---| +| **Linux** | `x86-64` | +| **macOS** | Apple Silicon (`arm64`) and Intel (`x86-64`) | +| **Windows** | `x86-64` | + +On `arm64` Linux, install the `dig-store` CLI from the [apt repository](./apt.md) and read content through `rpc.dig.net`; a `dig-node` build for that platform is not published yet. + +This is the same self-contained `dig-installer` shipped on the [Releases page](https://github.com/DIG-Network/dig-installer/releases) — download `dig-installer--` and run it directly (elevated) if you prefer not to pipe to a shell. Every component installs by default — `dig-store`, `dig-node`, and `dig-dns`. Skip any one of them with its `--no-` flag (`--no-dig-store`, `--no-dig-node`, `--no-dig-dns`); the advanced `dig-relay` and the DIG Browser stay opt-in via `--with-relay` / `--with-browser`. +## Short aliases: `dign` and `digd` {#short-aliases} + +The DIG Installer also places two short aliases on your `PATH`: **`dign`** for `dig-node` and **`digd`** for `dig-dns`. They are specific to this route — neither the [apt packages](./apt.md) nor the native OS packages below carry them, so use the full `dig-node` / `dig-dns` names if you installed one of those ways. Each is a real installed binary — not a shell alias — and behaves identically to its primary: the same subcommands (including every service verb — `install`/`uninstall`/`start`/`stop`/`status`/`serve`), the same flags and `--json` output, and the same exit codes. `dign --help`/`--version` reports `dign`, and `digd --help`/`--version` reports `digd`; the primaries keep reporting their own names. For example, `dign open chia:///` and `dig-node open chia:///` do exactly the same thing. This mirrors [`digs`](../digstore/cli/install.md), the first-class alias for `dig-store`. + ## GUI installer {#gui-installer} Prefer a guided setup over flags? Download the desktop wizard — @@ -50,14 +79,72 @@ If a component isn't available yet for your platform, it's skipped automatically Re-running the installer over an already-installed `dig-node` or `dig-relay` — to upgrade, for example — needs no manual steps: it stops the running service, replaces the binary with the new version, then starts it again, so the service ends up in the same running or stopped state it was in before. +## Native OS packages {#native-os-packages} + +`dig-node` also ships as **native OS packages** — a Windows **`.msi`**, a macOS **`.pkg`**, and a Linux **`.deb`**. Install one directly with your OS's own tooling when you'd rather not run the installer at all. Take the asset from the [dig-node Releases page](https://github.com/DIG-Network/dig-node/releases/latest): + +| OS | Install a package directly | +|---|---| +| **Windows** | Double-click `dig-node--windows-x64.msi`, or `msiexec /i dig-node--windows-x64.msi` from an elevated prompt. | +| **macOS** | Double-click `dig-node--macos.pkg`, or `sudo installer -pkg dig-node--macos.pkg -target /`. | +| **Linux** | `sudo apt install ./dig-node__amd64.deb`. | + +Installing a package **registers the background service and starts it immediately and on every boot** — no extra step. Each package installs only the `dig-node` binary and its service; the short aliases, `dig.local`, and `dig-dns` come with the [DIG Installer](#platforms). + +### Finding the service on your machine {#service-ids} + +The id your service manager knows the node by depends on how you installed it, so use the row that matches your route: + +| How you installed | OS | Ask for it as | +|---|---|---| +| DIG Installer | Linux (systemd) | `dignetwork-dig-node`, in the **user** scope — `systemctl --user` | +| DIG Installer | macOS (launchd) | `net.dignetwork.dig-node` | +| DIG Installer | Windows (Services) | `net.dignetwork.dig-node` — **DIG NETWORK: NODE** | +| `.deb` / `.pkg` / `.msi` | Linux / macOS / Windows | `net.dignetwork.dig-node` | +| [apt repository](./apt.md) | Linux (systemd) | `dig-node` | + +`dig-dns` follows the same pattern with `dig-dns` in place of `dig-node` (**DIG NETWORK: DNS** on Windows). On Linux, `dig-node` reports its own id as `net.dignetwork.dig-node`, while the name to hand `systemctl` is the one in the table: + +```sh +systemctl --user status dignetwork-dig-node +journalctl --user -u dignetwork-dig-node -f +``` + +Because that unit lives in your user scope, it needs a logged-in session for your account. On a headless server, prefer the [apt repository](./apt.md) or the `.deb`, which both register a **system** service that runs with no session at all. + +Whichever route you used, the node reports on itself without you needing an id: + +```sh +dign status --json +``` + +## Open `chia://` links from anywhere {#chia-scheme-handler} + +The DIG Installer and the native OS packages also register **`chia://`** (and **`urn:`**) as an operating-system URL-scheme handler — on by default. With it registered, opening a `chia://…` or `urn:dig:chia:…` link **anywhere on your computer** — from an email, a chat, or an ordinary browser — routes it through your local dig-node, which resolves and verifies the content and opens it in your default browser. Nothing else needs to be installed for the click to work; if you also run the [DIG Browser](../browser/chia-protocol.md) or the extension, it still verifies the page. + +Prefer not to register the handler? Choose the guided [GUI installer](#gui-installer) and decline it during setup. + +### `dig-node open` + +The handler runs one command, which you can also use yourself to open a DIG address: + +```sh +dig-node open chia://[:]/ +dig-node open urn:dig:chia:[:]/ +``` + +It **validates the link strictly** — only `chia://` and `urn:dig:chia:` are accepted, the store id must be a valid 64-hex value, and every other scheme (`file:`, `javascript:`, `http:`, …) is rejected — then opens your local node's address for it in the default browser. Add `--json` for a machine-readable result: + +```sh +dig-node open --json chia:/// +# { "ok": true, "action": "open", "opened": true, +# "url": "http://localhost:9778/s//", "store_id": "", … } +``` + ## `dig.local` The installer registers **`dig.local`** for your machine so consumers on the same host resolve your node by name (`dig.local` → `localhost`) without hard-coding a port. This is what lets the [DIG Browser](../browser/chia-protocol.md) and extension prefer a local node automatically. → [Point a consumer at your node](./point-a-consumer.md) -:::note Pre-release -The hosted installers (`apt.dig.net`, `dig.net/install.sh`) are still being provisioned. Until they're live, build from source or grab a binary from the [dig-node Releases](https://github.com/DIG-Network/dig-node/releases). The commands here are the real, intended ones. -::: - ## An always-on service, verified after install `dig-node` installs **by default** and registers as an **auto-start** service — it comes up again after a reboot with no manual step, and starts as part of installation. Skip it with `--no-dig-node`. On Linux and macOS it also **auto-restarts if it ever crashes** (Windows recovery-on-crash is still being wired up). @@ -68,7 +155,7 @@ Once the service is started, the installer runs two checks and prints the result - **Health check** — the node answers a live RPC call on its configured port (default `9778`), proving the service isn't just registered but actually serving. ```sh -dig-installer +sudo dig-installer # Registering dig-node as an OS service (port 9778): # ✓ dig-node installed as an OS service and started # ✓ dig.local: 127.0.0.2 dig.local → /etc/hosts @@ -85,7 +172,7 @@ With the node up and verified, the [extension](../audiences/content-consumers.md systemd) alongside `dig-node`. Skip it with `--no-dig-dns`: ```sh -curl -fsSL https://dig.net/install.sh | sh -s -- --no-dig-dns +curl -fsSL https://dig.net/install.sh | sudo sh -s -- --no-dig-dns ``` This lets a browser open `http://.dig/` directly: dig-dns resolves the @@ -94,7 +181,9 @@ wires OS split-DNS (or an NRPT rule on Windows) and, as a fallback, a PAC proxy for browsers that bypass the OS resolver (e.g. a browser forcing DNS-over-HTTPS) — either path alone is enough for `.dig` URLs to load. It never edits `/etc/hosts`, never rewrites URLs, and never intercepts TLS. Run `dig-dns doctor` any time to check -which path is live and get a fix hint for what isn't. +which path is live and get a fix hint for what isn't. → See [DIG and your +DNS](./dns.md) for what dig-dns does and doesn't touch, and how it protects its own +lookup. The [extension](../audiences/content-consumers.md) already opens content directly from a reachable node as a real page — see [Reading from your own @@ -112,6 +201,9 @@ Prefer the signed, `apt upgrade`-able native path: → [Install on Ubuntu/Debian ## Related - [Run a node — overview](./index.md) +- [Install on Ubuntu/Debian via apt](./apt.md) — the same `.deb`, signed and `apt upgrade`-able +- [The chia:// protocol](../browser/chia-protocol.md) — what a `chia://` address is and how it resolves +- [DIG and your DNS](./dns.md) — dig-dns's split-DNS scope + its own encrypted upstream lookup - [Installing the CLI](../digstore/cli/install.md) — the raw `dig-store` binary on its own - [Configure dig-node](./configure.md) — ports, listeners, cache cap, upstream - [Point a consumer at your node](./point-a-consumer.md) — shared `.dig` cache diff --git a/package.json b/package.json index 9b1323b..622b9e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docs-dig-net", - "version": "0.7.1", + "version": "0.7.2", "private": true, "scripts": { "docusaurus": "docusaurus", diff --git a/static/openrpc-node.json b/static/openrpc-node.json index 178da9f..56b6aa2 100644 --- a/static/openrpc-node.json +++ b/static/openrpc-node.json @@ -2,7 +2,7 @@ "openrpc": "1.2.6", "info": { "title": "dig RPC — node profile (local dig-node / in-process DIG Browser)", - "version": "0.7.0", + "version": "0.7.2", "description": "The NODE PROFILE: a distinct, smaller surface than the network profile. Of the byte methods it implements ONLY dig.getContent (local-first, else proxy); everything else proxies upstream or returns -32601. It ADDS node-only methods the security model depends on — chiefly dig.getAnchoredRoot (the CHIP-0035 on-chain head, the trusted root for mandatory root-pinning), dig.stage, and cache.*. Gate on dig.methods rather than assuming one uniform surface. See https://docs.dig.net/docs/protocol/dig-rpc#node-profile.", "license": { "name": "GPL-2.0", diff --git a/static/openrpc.json b/static/openrpc.json index e014a56..1cca618 100644 --- a/static/openrpc.json +++ b/static/openrpc.json @@ -2,7 +2,7 @@ "openrpc": "1.2.6", "info": { "title": "dig RPC — DIG Network Content Interface (network profile)", - "version": "0.7.0", + "version": "0.7.2", "description": "The network-wide read interface for DIG content over JSON-RPC 2.0 — the NETWORK PROFILE served by the canonical node at rpc.dig.net. Blind by construction (the node holds no URN and no key), verifiable without trust (merkle inclusion proofs against the chain-anchored root), and streamable at any size. There is no `decoy` field on the wire and no CDN. See https://docs.dig.net/docs/protocol/dig-rpc.", "license": { "name": "GPL-2.0", diff --git a/tests/unit/install-path-lint.test.mjs b/tests/unit/install-path-lint.test.mjs new file mode 100644 index 0000000..73d902c --- /dev/null +++ b/tests/unit/install-path-lint.test.mjs @@ -0,0 +1,172 @@ +// Install-path guard — the documented install commands must be the ones that work. +// +// The install path is the first thing a stranger runs, so a wrong command here is +// the most expensive defect the docs can carry: it reads as "DIG is broken". Four +// specific claims were each executed on a clean Ubuntu 24.04 machine and each +// failed. This lint pins the corrected form of every one, over EVERY authored +// page and every materialized locale copy, so none can quietly return. +// +// Each rule is universally quantified on purpose. An existential check ("some page +// says `sudo sh`") would pass while another page still carried the broken form — +// which is precisely how three of these four survived earlier review passes. The +// forbidden-form rules therefore scan every file, and the required-content rules +// name the exact file that must carry the fact. +import { test } from "node:test"; +import assert from "node:assert/strict"; +import * as fs from "node:fs"; +import * as path from "node:path"; + +const repoRoot = path.resolve(import.meta.dirname, "..", ".."); + +/** Directories whose text a stranger reads or copy-pastes from. */ +const scannedRoots = ["docs", "i18n"]; + +/** File extensions carrying copyable prose and command examples. */ +const scannedExtensions = new Set([".md", ".mdx"]); + +/** + * Forms that must appear NOWHERE, because executing them fails. + * + * `sh`-pipe: the universal installer's default plan installs the dig-node and + * dig-dns services, so it requires elevation and refuses an unelevated run + * outright — the bootstrap script does no self-elevation, so the `sudo` has to be + * in the documented command. The pattern deliberately does not match + * `| sudo sh`, which is the correct form. + * + * apt unit id: the apt repository builds its own package, whose unit is + * `dig-node.service`. A reverse-DNS unit id on the apt page names a unit that + * does not exist on a machine installed that way. + */ +const forbiddenForms = [ + { + label: + "an unelevated `| sh` install pipe — the default plan installs services, so it needs `| sudo sh`", + pattern: /install\.sh\s*\|\s*sh\b/, + }, + { + label: + "the reverse-DNS unit id on the apt page — the apt package's unit is `dig-node.service`", + pattern: /net\.dignetwork\.dig-node/, + onlyIn: /run-a-node[/\\]apt\.md$/, + }, + { + label: + "a claim that the hosted installers are still being provisioned — install.sh, install.ps1 and apt.dig.net all serve real artifacts", + pattern: /still being (provisioned|stood up)/i, + }, +]; + +/** + * Facts a specific page MUST state, because a stranger on that page needs them to + * reach a running node. Keyed by the path suffix of the page that owns the fact. + */ +const requiredContent = [ + { + file: "docs/run-a-node/apt.md", + label: "the real systemd unit the apt package installs", + pattern: /systemctl status dig-node\b/, + }, + { + file: "docs/run-a-node/apt.md", + label: "the version the apt repository actually serves, so a stranger can judge it", + pattern: /0\.43\.0/, + }, + { + file: "docs/run-a-node/universal-installer.md", + label: "the Linux unit id the installer route actually registers", + pattern: /dignetwork-dig-node/, + }, + { + file: "docs/run-a-node/universal-installer.md", + label: "the elevation requirement for the Windows one-liner", + pattern: /administrator/i, + }, +]; + +function collectScannedFiles(dir) { + return fs.readdirSync(dir, { withFileTypes: true }).flatMap((entry) => { + const fullPath = path.join(dir, entry.name); + if (entry.isDirectory()) return collectScannedFiles(fullPath); + return scannedExtensions.has(path.extname(entry.name)) ? [fullPath] : []; + }); +} + +const filesToScan = scannedRoots + .map((root) => path.join(repoRoot, root)) + .filter((root) => fs.existsSync(root)) + .flatMap(collectScannedFiles); + +test("no page documents an install command that fails when executed", () => { + const violations = []; + for (const file of filesToScan) { + const relativePath = path.relative(repoRoot, file); + const applicable = forbiddenForms.filter( + (form) => !form.onlyIn || form.onlyIn.test(relativePath), + ); + if (applicable.length === 0) continue; + + fs.readFileSync(file, "utf8") + .split("\n") + .forEach((line, index) => { + for (const form of applicable) { + if (form.pattern.test(line)) { + violations.push(`${relativePath}:${index + 1} — ${form.label}\n ${line.trim()}`); + } + } + }); + } + + assert.equal( + violations.length, + 0, + `Found install command(s) that do not work as documented:\n\n${violations.join("\n")}`, + ); +}); + +test("each install page states the facts a stranger needs to reach a running node", () => { + const missing = []; + for (const requirement of requiredContent) { + const fullPath = path.join(repoRoot, requirement.file); + const body = fs.readFileSync(fullPath, "utf8"); + if (!requirement.pattern.test(body)) { + missing.push(`${requirement.file} — missing ${requirement.label} (${requirement.pattern})`); + } + } + + assert.equal( + missing.length, + 0, + `Install page(s) omit a fact the reader needs:\n\n${missing.join("\n")}`, + ); +}); + +test("every locale copy of an install page matches its English source", () => { + // This repo materializes the doc tree per locale as untranslated English copies. + // A locale copy that drifts serves a stranger a stale command — exactly how the + // apt page ended up with two different unit ids in one tree. + const installPages = ["index.md", "universal-installer.md", "apt.md", "configure.md"]; + const localeRoot = path.join(repoRoot, "i18n"); + const locales = fs.readdirSync(localeRoot, { withFileTypes: true }) + .filter((entry) => entry.isDirectory()) + .map((entry) => entry.name); + + const drifted = []; + for (const page of installPages) { + const source = fs.readFileSync(path.join(repoRoot, "docs", "run-a-node", page), "utf8"); + for (const locale of locales) { + const copy = path.join( + localeRoot, locale, "docusaurus-plugin-content-docs", "current", "run-a-node", page, + ); + if (!fs.existsSync(copy)) continue; + if (fs.readFileSync(copy, "utf8") !== source) { + drifted.push(`i18n/${locale}/…/run-a-node/${page}`); + } + } + } + + assert.equal( + drifted.length, + 0, + `Locale copies drifted from their English source:\n\n${drifted.join("\n")}`, + ); +});