Operator 操作技巧与窍门
插入密钥到密钥库:
如果您决定切换域或已经有助记词,这段信息可能对你有所帮助。请在下一节阅读更多关于切换域的信息。
要插入密钥,请使用以下命令:
Replace these placeholders
<BASE_PATH>
: Path to your node data directory<DOMAIN_ID>
: The domain ID you want to operate on<SECRET_PHRASE>
: Your operator key's secret phrase
./subspace-node-ubuntu-x86_64-skylake-taurus-2025-may-27 domain key insert \
--base-path "<BASE_PATH>" --domain-id "<DOMAIN_ID>" --keystore-suri "<SECRET_PHRASE>"
The command above will insert the keypair in the subfolder of <BASE_PATH>/domains/<DOMAIN_ID>/keystore
.
suri
是操作员密钥的助记词。
切换域
Any Operator can switch domain they operate on anytime. In order to switch domain:
- 进入 PolkadotJS
- Make sure to select the correct network at the top-left corner.
- 选择您想要在
using the selected account
中使用的帐户。 - 选择
submit the following extrinsic
下的domains
并在下拉列表中选择 "switchDomain(operatorId, newDomainId) "。 - Add your
operatorId
andnewDomainId
to the corresponding fields.
备注
Only the account who registered Operator can switch the domain.
备注
您需要将密钥对移动到新的位置,如果您要更换域,请按照insert key to keystore section 进行操作。
备注
Stake of your Nominators won't be released, but will be moved to the new domain as well.
有用的命令
同时运行验证器 (farmer) 和操作员节点
提示
To run both operator and validator at the same time, provide required flags for both roles when starting your node.
Replace these placeholders
<NAME>
: Your node name for telemetry<BASE_PATH>
: Path to store node data<DOMAIN_ID>
: Domain ID you want to operate on<OPERATOR_ID>
: Your operator ID (obtained after registration)<WALLET_ADDRESS>
: Your wallet address for farming rewards<FARM_SIZE>
: Farm size (e.g. 4TiB, 8TiB)
- 🖼️ Windows
- 🍎 macOS
- 🐧 Ubuntu
- 🐋 Docker
.\subspace-node-windows-x86_64-skylake-taurus-2025-may-27.exe run `
--chain taurus `
--farmer `
--name "<NAME>" `
--base-path "<BASE_PATH>" `
--sync full `
-- `
--domain-id "<DOMAIN_ID>" `
--operator-id "<OPERATOR_ID>"
./subspace-node-macos-aarch64-taurus-2025-may-27 run \
--chain taurus \
--farmer \
--name "<NAME>" \
--base-path "<BASE_PATH>" \
--sync full \
-- \
--domain-id "<DOMAIN_ID>" \
--operator-id "<OPERATOR_ID>"
./subspace-node-ubuntu-x86_64-skylake-taurus-2025-may-27 run \
--chain taurus \
--farmer \
--name "<NAME>" \
--base-path "<BASE_PATH>" \
--sync full \
-- \
--domain-id "<DOMAIN_ID>" \
--operator-id "<OPERATOR_ID>"
services:
node:
# Replace snapshot-DATE with the latest release (like snapshot-2025-jan-07)
image: ghcr.io/autonomys/node:snapshot-DATE
volumes:
# Instead of specifying volume (which will store data in /var/lib/docker), you can
# alternatively specify path to the directory where files will be stored, just make
# sure everyone is allowed to write there
- node-data:/var/subspace:rw
# - /path/to/subspace-node:/var/subspace:rw
ports:
# If port 30333 or 30433 is already occupied by another Substrate-based node, replace all
# occurrences of 30333 or 30433 in this file with another value
- "0.0.0.0:30333:30333/tcp"
- "0.0.0.0:30433:30433/tcp"
- "0.0.0.0:40333:40333/tcp"
restart: unless-stopped
command: [
"run",
"--chain", "taurus",
"--base-path", "/var/subspace",
"--rpc-cors", "all",
"--rpc-methods", "unsafe",
"--rpc-listen-on", "0.0.0.0:9944",
"--farmer",
"--name", "<NAME>",
"--sync", "full",
"--",
"--domain-id", "<DOMAIN_ID>",
"--operator-id", "<OPERATOR_ID>",
"--listen-on", "/ip4/0.0.0.0/tcp/40333"
]
healthcheck:
timeout: 5s
# If node setup takes longer than expected, you want to increase interval and retries number.
interval: 30s
retries: 60
farmer:
depends_on:
node:
condition: service_healthy
# Replace snapshot-DATE with latest release (like snapshot-2025-jan-07)
image: ghcr.io/autonomys/farmer:snapshot-DATE
volumes:
# Instead of specifying volume (which will store data in /var/lib/docker), you can
# alternatively specify path to the directory where files will be stored, just make
# sure everyone is allowed to write there
- farmer-data:/var/subspace:rw
# - /path/to/subspace-farmer:/var/subspace:rw
ports:
# If port 30533 is already occupied by something else, replace all
# occurrences of 30533 in this file with another value
- "0.0.0.0:30533:30533/tcp"
restart: unless-stopped
command: [
"farm",
"--node-rpc-url", "ws://node:9944",
"--listen-on", "/ip4/0.0.0.0/tcp/30533",
"--reward-address", "<WALLET_ADDRESS>",
"path=/var/subspace,size=<FARM_SIZE>",
]
volumes:
node-data:
farmer-data:
You should see the node start successfully and begin syncing.
切换到另一个服务器
To ensure the minimum downtime during your switch, we propose the following:
- Sync a new operator node using a throwaway key. You can generate a new key, just not insert it into your keystore.
- 停止原节点并重命名密钥库(或任何你觉得合适的方法,以防止你不小心用原签名密钥启动原节点)。
- 使用原 签名密钥更新新节点上的密钥。
- 重新启动新的operator节点。