Local Setup #
Here are common tasks you may have to do in order to start deploying.
Update the runway CLI #
We provide a selfupdate
command for your convenience:
$ runway selfupdate
current version: 1.1.0
13.47 MiB / 13.47 MiB [===============================] 100.00% 0s
new version: 1.2.0
Create an SSH key #
To deploy your application, we use git and therefore you need an SSH key.
Usually, you already have an ssh key already because you have been using git. But just in case, here is how it’s done. Looking for a shortcut? Use runway local key setup
! (see below)
To get started, open a terminal or (on Windows) wsl
and follow along:
$ ssh-keygen -t ed255119 -C "your-email@example.org"
...
Skip through all the questions (by pressing the enter
button) and your new key (id_ed255119
and its public key id_ed255119.pub
) is saved in the ~/.ssh/
directory — which is one of the following locations:
- Windows:
C:\Users\account\.ssh\
- Linux/Unix:
/home/account/.ssh/
- Mac:
/Users/account/.ssh/
Using the SSH key #
By default runway will attempt to use keys added to the ssh-agent
.
How it works #
Ensure the the ssh-agent
is running:
$ eval "$(ssh-agent -s)"
> Agent pid 31337
Then add your key to the ssh-agent
:
$ ssh-add /Users/account/.ssh/id_ed255119
...
If you opted to use a passphrase,ssh-add
will ask you for it. On Mac you can you can runssh-add --apple-use-keychain path/to/ed255119
in order to use the Keychain going forward.
ssh-agent alternatives #
The ssh-agent
may be a considered a security risk and, albeit convenient, not what you want to use (because the agent process forwards all your keys to all servers you connect to).
runway local key set/unset #
We currently support keys without a passphrase only.
Use runway local key set <path>
to set an explicit path to a private key which you want to use for runway app deploy
.
To undo this, use runway local key unset
and you will be back to using the ssh-agent
.
runway local key setup #
Can be used to create an RSA key for yourself in order to deploy. They key will be added to runway automatically (instead of running runway key add <path>
yourself) and the path will be set as well, so the deployment uses this key exclusively.
1Password’s ssh-agent #
An alternative would be to store the key in 1Password and its own agent process to increase security.