Overview
There are several methods to transfer files between your local machine and Pods. Each method has different advantages depending on your use case: runpodctl is the simplest option for occasional small file transfers. It’s pre-installed on all Pods, requires no setup, and uses secure one-time codes for authentication. Best for quick transfers of individual files or small datasets. SCP provides a standard, reliable way to transfer files over SSH. It works well for both individual files and directories, and is ideal for users already familiar with command-line tools. Requires SSH configuration on your Pod. rsync offers the most advanced features, including incremental transfers, compression, and detailed progress reporting. It’s perfect for large datasets, regular synchronization tasks, or when you need to preserve file attributes. Also requires SSH configuration. Cloud sync enables direct synchronization with cloud storage providers like AWS S3, Google Cloud Storage, or Dropbox. Best for backing up data or sharing files across multiple environments.Prerequisites
-
If you intend to use
runpodctl
, make sure it’s installed on your machine, see install runpodctl -
If you intend to use
scp
, make sure your Pod is configured to use real SSH. For more information, see use SSH. -
If you intend to use
rsync
, make sure it’s installed on both your local machine and your Pod withapt install rsync
. - Note the public IP address and external port from the SSH over exposed TCP command (you’ll need these for the SCP/rsync commands).
Transferring with runpodctl
The Runpod CLI (runpodctl) provides simple commands for transferring data between your machine and Runpod. It’s preinstalled on all Runpod Pods and uses one-time codes for secure authentication, so no API keys are required. If you are transferring large files, it is recommended to use the other methods such as ssh/scp.Sending a File
To send a file from source machine:Receiving a File
To receive a file on destination machine:Transferring with SCP
The general syntax for sending files to a Pod with SCP is as follows (execute this on your local machine, and replace the x’s with your Pod’s external TCP port and IP; for this example, they are 43201 and 194.26.196.6, respectively):If your private key file is in a location other than
~/.ssh/id_ed25519
or you’re using the Windows Command Prompt, make sure you update this path accordingly in your command.It is also recommended to look to the password based ssh if you just need a quick-one-time setup.-r
flag to recursively copy files and subdirectories (this will follow any symbolic links encountered as well):
Transferring with rsync
Your local machine must be running Linux or a WSL instance in order to use rsync.
-a
/--archive
- archive mode (ensures that permissions, timestamps, and other attributes are preserved during the transfer; use this when transferring directories or their contents)-d
/--delete
- deletes files in the destination directory that are not present in the source-p
/--progress
- displays file transfer progress-v
/--verbose
- verbose output-z
/--compress
- compresses data as it’s being sent and uncompresses as it’s received (heavier on your CPU, but easier on your network connection)