Mounting an Object Storage Bucket as a File System in Windows using RCLONE

Learn how to mount an Object Storage bucket to a Windows instance as a file system using RCLONE.

Follow the steps in this topic to mount an Object Storage bucket as a file system in a Windows instance using RCLONE.

For more information, see RCLONE.

Step 1: Generate Secret Keys

In this section, you generate a new secret key. Then you access the Customer secret keys page to copy the access key that was generated simultaneously with your secret key. Both of these keys are needed later in the RCLONE configuration.
  1. Select the Profile icon in the upper right of the Console, then select User Settings.
  2. From the My profile page under Identity & Security, select the Tokens and keys tab.
  3. Scroll to the Customer secret keys section and select the Generate secret key button.
  4. In the Generate secret key panel that opens, enter a descriptive name for the key and select the Generate Secret Key button on the lower right of the panel.
    The generated secret key is displayed. Copy the key and store it in a secure and accessible location. After you close the dialog box, you can't access the secret key any more.
  5. Find your secret key in the Customer secret keys list and copy the Access key value.
For more information, see Working with Customer Secret Keys.

Step 2: Confirm the Object Storage Namespace

  1. Select the Profile icon in the upper right of the Console, then select Tenancy: <your_tenancy>.
  2. On the Tenancy details page that opens, find the Object storage settings.
  3. Record the Object storage namespace value.

Step 3: Install RCLONE

  1. Run PowerShell as an administrator and enter the following commands to install and configure RCLONE:
    mkdir c:\rclone;
    cd c:\rclone
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    Invoke-WebRequest -Uri "https://downloads.rclone.org/v1.53.0/rclone-v1.53.0-windows-amd64.zip" -OutFile "c:\rclone\rclone.zip"
    Expand-Archive -path 'c:\rclone\rclone.zip' -destinationpath '.\'
    cp c:\rclone\rclone-v1.53.0-windows-amd64\* c:\rclone\
    rm -r c:\rclone\rclone-v1.53.0-windows-amd64; rm -r c:\rclone\rclone.zip
  2. Enter the following command to run the RCLONE installer:
    .\rclone.exe config
    The RCLONE installation menu opens.
  3. Select n) New remote from the list of RCLONE options.
    Enter the following information for each prompt and press Enter. The screen prompts are in bold.
    e/n/d/r/c/s/q> (Enter "n")
    
    name> (Enter the name of the remote connection. For example, "myremote".)
    Storage> (Enter "4")
    provider> (Enter "3")
    env_auth> (Leave blank)
    access_key_id> (Enter the Access key value generated from the Customer secret keys page)
    secret_access_key> (Enter the secret key you created)
    region> (Enter the region in which your bucket is located. For example, "us-ashburn-1")
    endpoint> (Enter the appropriate endpoint using the following syntax: "https://<object_storage_namespace>.compat.objectstorage.<region>.oraclecloud.com")
    location_constraint> (Leave blank)
    acl> (Leave blank)
    server_side_encryption> (Leave blank)
    sse_kms_key_id> (Leave blank)
    edit advanced configuration (Enter "n")
    Confirm the remote configuration (Enter "y")
  4. Enter the following commands at the prompt to install the required tools:
    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
    choco install winfsp -y
    Invoke-WebRequest -Uri " https://nssm.cc/release/nssm-2.24.zip" -OutFile "c:\rclone\nssm.zip"
    Expand-Archive -path 'c:\rclone\nssm.zip' -destinationpath '.\'
    cp .\nssm-2.24\win64\nssm.exe .\
    rm nssm.zip
    rm -r .\nssm-2.24\
  5. Run the following command to test the connection:
    .\rclone.exe lsd <remote_connection_name>:
  6. Run the following command to map Object Storage as a network drive:
    .\rclone.exe mount <remote_connection_name>:<bucket_name> Y:
To unmount, run the following command: CTRL+C.

Step 4: Install RCLONE as a Service

To keep the drive mapped and persistent as a network drive even after you restart the server, perform the following steps:
  1. If RCLONE is still running, enter Ctrl + C to close it.
  2. Enter the following commands at the prompt to install and run RCLONE as a service. You must provide an administrator username and password for the Windows OS where the drive is being mapped.
    .\nssm.exe install remote C:\rclone\rclone.exe mount <remote_connection_name>: Y:
    .\nssm.exe set <remote_connection_name> ObjectName .\<administrator> "<password>"
    .\nssm.exe start <remote_connection_name>