|
| 1 | +# Production Network Setup |
| 2 | + |
| 3 | +This guide covers how to setup a Piri node on the Forge Production Network. It covers two scenarios: |
| 4 | + |
| 5 | +1. [Setting up a brand new Piri node on the Forge Production Network](#setup-a-new-piri-node). |
| 6 | +2. [Migrating a Piri node currently operating on the Staging Network](#migrate-a-piri-node-from-staging). |
| 7 | + |
| 8 | +## Setup a new Piri node |
| 9 | + |
| 10 | +Follow the Piri [getting started guide](../getting-started.md) with the following changes: |
| 11 | + |
| 12 | +1. Filecoin [Mainnet](https://docs.filecoin.io/networks/mainnet) prerequisites. |
| 13 | + * Your Lotus node MUST be setup to operate on the Filecoin Mainnet. |
| 14 | + * Sync Lotus using the latest Mainnet [Snapshot](https://forest-archive.chainsafe.dev/latest/mainnet/). |
| 15 | + * Your Delegated Wallet MUST be funded with FIL on the Filecoin Mainnet. |
| 16 | + * Read our [Filecoin prerequisites guide](../setup/prerequisites.md) for full details. |
| 17 | +2. Piri initialization. |
| 18 | + * When running `piri init`, you MUST specify `--network=forge-prod`. |
| 19 | + |
| 20 | +## Migrate a Piri node from Staging |
| 21 | + |
| 22 | +If your Piri node is already running the latest version on the Staging network, follow these instructions to migrate it to the Forge Production network: |
| 23 | + |
| 24 | +1. Satisfy Filecoin [Mainnet](https://docs.filecoin.io/networks/mainnet) prerequisites. |
| 25 | + * Setup a Lotus node on the Filecoin Mainnet. |
| 26 | + * Sync Lotus using the latest Mainnet [Snapshot](https://forest-archive.chainsafe.dev/latest/mainnet/). |
| 27 | + * Enable [ETH RPC](https://lotus.filecoin.io/lotus/configure/ethereum-rpc/#enableethrpc). |
| 28 | + * Create a Funded Delegated Wallet on the Filecoin Mainnet. |
| 29 | + * Run: `lotus wallet new delegated` |
| 30 | + * Add funds! |
| 31 | + * Verify funds: `lotus wallet balance YOUR_DELEGATED_ADDRESS` |
| 32 | + * Read our [Filecoin prerequisites guide](../setup/prerequisites.md) for full details. |
| 33 | +2. Stop your Piri process. |
| 34 | +3. Delete your data directory (preserving `service.pem`): |
| 35 | + ```bash |
| 36 | + rm -rf /path/to/piri/data # or your custom data directory path |
| 37 | + ``` |
| 38 | + > ⚠️ IMPORTANT: Keep your `service.pem` key file! |
| 39 | +4. Prepare your wallet for import into Piri: |
| 40 | + ```bash |
| 41 | + # Export wallet from Lotus to hex format |
| 42 | + lotus wallet export YOUR_DELEGATED_ADDRESS > wallet.hex |
| 43 | + ``` |
| 44 | +5. Run `piri init` with the following parameters, updated as appropriate: |
| 45 | + ```bash |
| 46 | + piri init \ |
| 47 | + --network=forge-prod \ |
| 48 | + --data-dir=/path/to/data \ |
| 49 | + --temp-dir=/path/to/temp \ |
| 50 | + --key-file=/path/to/service.pem \ |
| 51 | + --wallet-file=/path/to/wallet.hex \ |
| 52 | + --lotus-endpoint=wss://YOUR_LOTUS_ENDPOINT/rpc/v1 \ |
| 53 | + |
| 54 | + --public-url=https://piri.example.com > config.toml |
| 55 | + ``` |
| 56 | + > ℹ️ All parameters other than `--network` MUST be updated. |
| 57 | +6. Start your Piri node using the config you generated: |
| 58 | + ```bash |
| 59 | + piri serve --config=config.toml |
| 60 | + ``` |
| 61 | + > ℹ️ If the `--config` option is not provided, Piri will automatically load config from your user config directory e.g. `~/.config/piri/config.toml`. |
| 62 | + |
| 63 | +## Troubleshooting |
| 64 | + |
| 65 | +If you have problems, the Storacha team can help you in the [Storacha Discord server](https://discord.gg/pqa6Dn6RnP). |
0 commit comments