Skip to content

Single Key Mode

Lucas Teske edited this page Feb 10, 2021 · 5 revisions

Single Key Mode

Remote-Signer provides a very simple interface for running it with a single key. This overrides a lot of configurations of the cluster-mode for defaults that just works ™️.

There are two options for running remote-signer as a single-key mode:

  1. Docker
  2. Standalone Binary

If you're willing to use remote-signer in single key mode, you might also want to take a look into Agent Mode which works great together with single key mode.

1. Docker

You can run it by running:

docker run \
 -e AGENT_BYPASS_LOGIN=true \
 -e AGENT_KEY_FINGERPRINT=[FINGERPRINT] \
 -e MODE=single_key \
 -e SINGLE_KEY_PATH=/keys/[KEYFILENAME] \
 -e SINGLE_KEY_PASSWORD=[KEYPASSWORD] \
 -v [KEYSFOLDER]:/keys \
 -p 5100:5100 \
 -itd quantocommons/remote-signer

Assuming you have a key DEADBEEF in a folder named keys inside /home/user, and the key filename is DEADBEEF.key:

docker run \
 -e AGENT_BYPASS_LOGIN=true \
 -e AGENT_KEY_FINGERPRINT=DEADBEEF \
 -e MODE=single_key \
 -e SINGLE_KEY_PATH=/keys/DEADBEEF.key \
 -e SINGLE_KEY_PASSWORD=123456 \
 -v /home/user/keys:/keys \
 -p 5100:5100 \
 -itd quantocommons/remote-signer

Notice: The line -v [KEYSFOLDER]:/keys mounts the [KEYSFOLDER] from your machine to docker in /keys. So regardless of where the path of the keys folder are in your machine, the -e SINGLE_KEY_PATH=/keys/[KEYFILENAME] should always be /keys/[KEYFILENAME].

Windows example:

With the keys folder at C:\Users\john:

docker run \
 -e AGENT_BYPASS_LOGIN=true \
 -e AGENT_KEY_FINGERPRINT=DEADBEEF \
 -e MODE=single_key \
 -e SINGLE_KEY_PATH=/keys/DEADBEEF.key \
 -e SINGLE_KEY_PASSWORD=123456 \
 -v C:\Users\john\keys:/keys \
 -p 5100:5100 \
 -itd quantocommons/remote-signer

2. Standalone binary

The way of running is similar, but you need to manually download remote-signer in your machine to the correct operating system. All binaries are available in releases page: https://github.com/quan-to/chevron/releases

The difference here is that all paths are in your machine instead docker. So SINGLE_KEY_PATH points to the key file on your machine.

2.1 Standalone Binary (Linux)

On linux you should download the zip file chevron-server-linux-amd64.zip in case running a x86 machine (Intel / AMD) or chevron-server-linux-arm64.zip in case a Arm64 Machine (Raspberry Pi 4).

wget https://github.com/quan-to/chevron/releases/download/v1.4.0/chevron-server-linux-amd64.zip
unzip chevron-server-linux-amd64.zip

Then you can run it with:

export AGENT_BYPASS_LOGIN=true
export AGENT_KEY_FINGERPRINT=DEADBEEF
export MODE=single_key
export SINGLE_KEY_PATH=/home/user/keys/DEADBEEF.key
export SINGLE_KEY_PASSWORD=123456

./chevron-server-linux-amd64

2.2 Standalone Binary (Windows)

Compatible only with latest versions of Windows Server and Windows 10

On windows you should download the zip file chevron-server-windows-amd64.zip.

Extract the zip file and then open a powershell in the same folder and run:

$env:AGENT_BYPASS_LOGIN='true'
$env:AGENT_KEY_FINGERPRINT='DEADBEEF'
$env:MODE='single_key'
$env:SINGLE_KEY_PATH='C:\Users\user\keys\DEADBEEF.key'
$env:SINGLE_KEY_PASSWORD='123456'
.\chevron-server-windows-amd64.exe

2.3 Standalone Binary (MacOSX)

On linux you should download the zip file chevron-server-darwin-amd64.zip in case running a x86 machine (Intel / AMD). So far we do not support running on ARM based MacOSX (like Apple M1)

wget https://github.com/quan-to/chevron/releases/download/v1.4.0/chevron-server-darwin-amd64.zip
unzip chevron-server-darwin-amd64.zip

Then you can run it with:

export AGENT_BYPASS_LOGIN=true
export AGENT_KEY_FINGERPRINT=DEADBEEF
export MODE=single_key
export SINGLE_KEY_PATH=/home/user/keys/DEADBEEF.key
export SINGLE_KEY_PASSWORD=123456

./chevron-server-darwin-amd64