SCP a file into a persistent volume

First, you’ll need to follow these instructions to create a wireguard connection locally: Private Networking

Then you can do something like this:

  • flyctl ssh issue --agent: this will register a ssh key with your local agent
  • scp priv/private_key.pem root@myapp.internal:/data/private_key.pem

If you have more than 1 instance, you might need to replace myapp.internal with the actual IP (flyctl ips private)

1 Like