(Many ways) How to upload files into Oracle Cloud Infrastructure – Cloud Shell

Lucas Jellema 4

Oracle Cloud Infrastructure Cloud Shell is VM that runs inside OCI -to be used for manipulating OCI resources using various means, including OCI CLI, Terraform and Ansible. We may want to be able to get files into Cloud Shell – scripts, source code, Infrastructure as Code and more. There are many ways in which we can these files into Cloud Shell. Let me quickly sum up a few that come to mind:


  • create a file inside Cloud Shell, open it using an editor such as vi or nano and paste in the contents
  • commit the file to a Git Repo and clone the repo to the Cloud Shell
  • put the file on OCI Object Storage and download said file using OCI CLI: oci os object get -bn <bucket name> –name <object name> –file <download-as-file-name>
  • put the file on OCI Object Storage, create a pre-authenticated request  and use the URL in a curl or wget operation in Cloud Shell to download the file
  • put the file on a public site (Dropbox, OneDrive, Google Drive) and download the file from there
  • put the file in a Docker Container, push the container image to a Container Registry, pull the image into Cloud Shell, start a container and docker cp the files from the container to the Cloud Shell host storage
  • create a REST API (for example using Node) to which files can be uploaded – and will be saved locally by the web application; then use ngrok to create a public endpoint that links up with the REST API and post files to this endpoint. They are forwarded through the ngrok public cloud to the application running locally on Cloud Shell and saved on the Cloud Shell storage

4 thoughts on “(Many ways) How to upload files into Oracle Cloud Infrastructure – Cloud Shell

      1. Hi Senaka,
        I checked with my colleague Jeffrey and he shared with me this information:
        If you can login through ssh from cloud shell to your server, then it should be possible to copy a file from the cloud shell file system to the VM over scp. For example:

        scp file.txt remote_username@

        kind regards, Lucas

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Next Post

Mapping Azure and Oracle Cloud Infrastructure core concepts - Part One

All major public clouds are organized in similar ways. However, terms used for certain similar constructs can be (quite) different, or the same terms are used for quite different constructs. This article attempts to outline some of the most relevant concepts for both Azure and Oracle Cloud Infrastructure and to […]
%d bloggers like this: