--- title: Run a Logos storage node doc_type: procedure product: storage topics: - storage - node steps_layout: flat authors: gmega, kashepavadan owner: logos doc_version: 1 slug: run-logos-storage-node --- # Run a Logos storage node #### Get started running a Logos storage node and uploading your first file to the Logos network. This procedure covers how to build and run the [Logos Storage Module](https://github.com/logos-co/logos-storage-module/), connect it to the testnet bootstrap nodes, publish a file, and verify that the file can be downloaded. It is intended for node operators on testnet v0.2 who want to contribute storage capacity to the Logos network. Before you start, make sure you have the following: - Linux (tested on Ubuntu 22.04) - **Nix** with flakes enabled. Install from [nixos.org](https://nixos.org/download.html), then enable flakes: ```bash mkdir -p ~/.config/nix echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf ``` - [`logoscore`](https://github.com/logos-co/logos-logoscore-cli/releases/tag/0.2.0), and [`lgpm`](https://github.com/logos-co/logos-package-manager/releases/tag/0.2.0) installed. To install these tools, use the `install-node-tools.sh` helper script: ```bash curl -fsSL https://raw.githubusercontent.com/logos-co/logos-docs/main/resources/scripts/install-node-tools.sh | sh export PATH="$PWD/bin:$PATH" ``` - `jq` on your `PATH` — used to pull the uploaded [CID](https://docs.logos.co/get-started/glossary#cid) out of the manifests JSON. Verify: `jq --version` ## What to expect - You can connect a [Logos Storage](https://docs.logos.co/get-started/glossary#logos-storage) node to the testnet and have it listed among the bootstrap peers. - You can publish a file to the network and retrieve a content address to share with other nodes. - You can download the file back from the network and confirm it lands on disk. ## Build and install the storage module 1. Build the [module](https://docs.logos.co/get-started/glossary#module) package with Nix: ```sh nix build 'github:logos-co/logos-storage-module/v2.0.1#lgx' -o storage-lgx ``` - This produces a `logos-storage_module-module-lib.lgx` package in `./storage-lgx/`.
The initial Nix build takes 15–20 minutes on first run. Subsequent builds use the Nix cache and complete in seconds.
To run storage with mix support, generate the config from the published mix bootstrap data:
cat > make-mix-storage-config.sh <<'EOF'
#!/usr/bin/env bash
set -e
data_dir=${1:-"./logos-storage-data"}
udp_spr_json=$(curl -s https://logos-storage-network.fra1.digitaloceanspaces.com/v0.2/udp-sprs.json)
tcp_spr_json=$(curl -s https://logos-storage-network.fra1.digitaloceanspaces.com/v0.2/tcp-sprs.json)
wget https://logos-storage-network.fra1.digitaloceanspaces.com/v0.2/mix-pool.json
mp_path=$(realpath "./mix-pool.json")
cat <<JSON
{
"nat": "any",
"log-level": "DEBUG",
"mix-enabled": true,
"listen-port": 8080,
"disc-port": 8090,
"bootstrap-node": $udp_spr_json,
"dht-mix-proxy": $tcp_spr_json,
"data-dir": "${data_dir}",
"mix-pool": "${mp_path}"
}
JSON
EOF
chmod 755 make-mix-storage-config.sh
./make-mix-storage-config.sh > config.json
The default chunk size is 65536.