Skip to content

Commit 78a10b5

Browse files
kenrogersgitbook-bot
authored andcommitted
GITBOOK-57: Clarify docs
1 parent 7802d34 commit 78a10b5

File tree

1 file changed

+44
-24
lines changed

1 file changed

+44
-24
lines changed

nakamoto-upgrade/running-a-signer.md

Lines changed: 44 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Running a Signer
1+
# How to Run a Signer
22

33
{% hint style="danger" %}
4-
This document intends to lay out all the steps required to run a signer on testnet after the Nakamoto Testnet milestone is reached and deployed to testnet on March 25. Pre-Launch Testnet (current testnet version) will be undergoing frequent updates, so these instructions may change.
4+
This document intends to lay out all the steps required to run a signer on testnet after the Nakamoto Testnet milestone is reached and deployed to testnet on March 25. Pre-Launch Testnet (current testnet version) will be undergoing frequent updates, so these instructions may change and certain functionality may not work.
55
{% endhint %}
66

77
### System Requirements to Run a Signer
@@ -14,7 +14,9 @@ This document intends to lay out all the steps required to run a signer on testn
1414

1515
In order to run a signer, you'll need to run a signer and a Stacks node side-by-side. Specifically, you'll want to run a testnet follower node. Instructions for doing this are listed below in the "Running Your Stacks Node" section. The signer will monitor for events coming from the stacks node and is in charge of using the generated account (next section) to sign incoming Stacks blocks sent from the Stcks node.
1616

17-
This doc will provide instructions on how to set up both using either Docker or as a binary building from source. It will also walk through how to set up the config files to get the signer and Stacks node communicating correctly.
17+
This doc will provide instructions on how to set up both using either Docker or building from source. Binaries will not be available in the initial release but will be released at a later date. 
18+
19+
It will also walk through how to set up the config files to get the signer and Stacks node communicating correctly.
1820

1921
### Knowledge Prerequisites
2022

@@ -127,11 +129,11 @@ The definition of these fields are:
127129

128130
### Running the Signer
129131

130-
There are two options for running the signer: Docker and binary. The recommended option is to use Docker. If you want to run as a binary, you will need to build `stacks-core` from source. Instructions for how to do this are contained below in the relevant section.
132+
There are two options for running the signer: Docker and building from source. The recommended option is to use Docker. If you want to run as a binary, you will need to build `stacks-core` from source. Instructions for how to do this are contained below in the relevant section.
131133

132134
#### Running the Signer with Docker
133135

134-
You can run the signer as a Docker container using the `blockstack/stacks-core` image. 
136+
You can run the signer as a Docker container using the `blockstack/stacks-core:next` image. When pulling the Docker image, be sure you are using the `next` tag, as the main branch will not have the signer binary.
135137

136138
When running the Docker container, you’ll need to ensure a few things:
137139

@@ -140,22 +142,32 @@ When running the Docker container, you’ll need to ensure a few things:
140142
* You’ll need a volume with at least a few GB of available storage that contains the folder your `db_path` is in. In the above example, that would be /var
141143
* You’ll need to include your `signer-config.toml` file as noted below with the first `-v` flag
142144

143-
An example command for running the Docker image with ”`docker run`” (be sure to remove the comments before running):
145+
An example command for running the Docker image with ”`docker run`”.
146+
147+
Be sure to replace the `STX_SIGNER_PATH` with the correct path to your config file and where you want to install and run the signer. In this example it will be doing so in the current directory.
144148

145149
```bash
150+
IMG="blockstack/stacks-core"
151+
VER="next"
152+
STX_SIGNER_PATH="./"
153+
STX_SIGNER_DATA="$STX_SIGNER_PATH/data"
154+
STX_SIGNER_CONFIG="$STX_SIGNER_PATH/signer-config.toml"
155+
156+
mkdir -p $STX_SIGNER_DATA
157+
146158
docker run -d \
147-
-v ./signer-config.toml:/config.toml \ # your config file, make sure you are in the same directory
148-
-v data_folder:/var \ # your data volume
149-
-p 30000:30000
150-
-e RUST_BACKTRACE=full \
151-
-e BLOCKSTACK_DEBUG=0 \
152-
blockstack/stacks-core:next \ # the docker image, currently tagged as `next`
153-
stacks-signer run \
154-
--config /config.toml \
159+
-v $STX_SIGNER_CONFIG:/config.toml \
160+
-v $STX_SIGNER_DATA:/var \
161+
-p 30000:30000 \
162+
-e RUST_BACKTRACE=full \
163+
-e BLOCKSTACK_DEBUG=0 \
164+
$IMG:$VER \
165+
stacks-signer run \
166+
--config /config.toml
155167
```
156168

157169
{% hint style="info" %}
158-
If you get an error saying that the manifest cannot be found, you are probably running on system architecture other than x64 arch. Since you are using a PR release (`next`) you'll need to specify your platform with the `--platform` flag.
170+
If you get an error saying that the manifest cannot be found or about the requested image platform not matching the host platform, you are probably running on system architecture other than x64 arch. Since you are using a PR release (`next`) you'll need to specify your platform with the `--platform` flag.
159171

160172
For example, if you are running on M1 Mac, you would add `--platform=linux/amd64` to the above command.
161173
{% endhint %}
@@ -165,8 +177,7 @@ Or, with a custom Dockerfile:
165177
```docker
166178
FROM blockstack/stacks-core:next
167179
COPY signer-config.toml /config.toml
168-
EXPOSE 20444
169-
EXPOSE 20443
180+
EXPOSE 30000
170181
CMD ["stacks-signer", "run", "--config", "/config.toml"]
171182
```
172183

@@ -240,14 +251,23 @@ You can run the Stacks node as a Docker container using the `blockstack/stacks-c
240251
An example for running the node’s Docker image with docker run:
241252

242253
```bash
254+
IMG="blockstack/stacks-core"
255+
VER="next"
256+
STX_NODE_PATH="./"
257+
STX_NODE_DATA="$STX_NODE_PATH/data"
258+
STX_NODE_CONFIG="$STX_NODE_PATH/node-config.toml"
259+
260+
mkdir -p $STX_NODE_DATA
261+
243262
docker run -d \
244-
-v ./node-config.toml:/config.toml \ # your config file
245-
-v data_folder:/var/data \ # your data volume
246-
-p 20443:20443 \
247-
-p 20444:20444 \
248-
-e RUST_BACKTRACE=full \
249-
blockstack/stacks-core:next \ # the docker image, currently tagged as `next`
250-
stacks-node start --config config.toml
263+
-v $STX_NODE_CONFIG:/config.toml \
264+
-v $STX_NODE_DATA:/var \
265+
-p 20433:20433 \
266+
-p 20444:20444 \
267+
-e RUST_BACKTRACE=full \
268+
$IMG:$VER \
269+
stacks-node start \
270+
--config /config.toml
251271
```
252272

253273
Or, using a custom Dockerfile:

0 commit comments

Comments
 (0)