Getting Started with Storage Gateway

Get started with Storage Gateway by running various management tasks from the command line interface (CLI).

You can use the ocisg command line interface (CLI) to manage Storage Gateway. To use the CLI, open an ssh connection and log in to the host on which you installed Storage Gateway.


You can use the ocisg command line interface (CLI) to create, manage, and monitor Storage Gateway Cloud Sync jobs. See Storage Gateway Cloud Sync for details.

The CLI supports the following Storage Gateway management tasks:

  • To start Storage Gateway:

    sudo ocisg up
  • To stop Storage Gateway:

    sudo ocisg down

    If the server with a Storage Gateway system fails, you can reinstall and start a new one. All the configuration and system data is automatically downloaded and applied. The pending upload and download activities resume when the new Storage Gateway system runs.

    If a disk cache is unrecoverable on the Storage Gateway server, data might be lost since the file might not have been transferred to the bucket in your tenancy. To ensure efficient data protection, see Best Practices for Using Storage Gateway.

  • To view details about Storage Gateway and how to access the management console:

    sudo ocisg info
  • To find the version of Storage Gateway:

    sudo ocisg version
  • To configure Storage Gateway to use a proxy server for connections to Oracle Cloud Infrastructure Object Storage:

    sudo ocisg configure proxy proxy_server_URL

    After configuring the proxy server, you must stop and restart Storage Gateway.

    By default, no proxy server is specified.

  • To remove previously configured proxy server details in Storage Gateway:

    sudo ocisg configure proxy [remove]
  • To configure Storage Gateway to use SSL when communicating with the management console and REST APIs:

    ocisg configure ssl update ** -cert certificate -privkey private_key [-passphrase passphrasefile] [-ca-cert <ca-cert>] 

    For example:

    sudo ocisg configure ssl update -cert wpassphrase/final_ssl_cert.cert.pem -privkey wopassphrase/final_ssl_cert.key.pem -ca-cert wpassphrase/ca-chain.cert.pem -passphrase wpassphrase/passphrase

    Configure the Storage Gateway server with the new SSL certificate. This replaces the existing SSL certificate.


    After configuring Storage Gateway to use SSL, you must stop and restart Storage Gateway.

    To disable SSL:

    sudo ocisg configure ssl false
  • To specify ports for the Storage Gateway services:

    sudo ocisg configure port service port_number  
    • service: Specify admin, nfs, or rest.

    • port_number: Ensure that the port number you specify is not already in use on the Storage Gateway host.

    By default, the port number is assigned dynamically for the Storage Gateway services when you start Storage Gateway.


    For the port assignment to take effect, you must stop and start Storage Gateway.

  • To remove the static port assignment for a service:

    sudo ocisg configure port service remove
  • To allocate memory for the Storage Gateway host:

    sudo ocisg configure memory memory_in_GB
  • To remove the memory allocation:

    sudo ocisg configure memory remove

    By default, Storage Gateway uses 4 GB of the available memory on the host server. You can delete the memory information by using the remove parameter.


    After configuring memory for Storage Gateway, you must stop and restart Storage Gateway.

  • To specify the docker network mode:

    sudo ocisg configure network mode

    The mode can be either host or bridge.

    The default mode is bridge. In this mode, you can run multiple instances of Storage Gateway on your host.

    Oracle recommends host mode as it also improves network performance.


    • You cannot modify admin and NFS ports when in host mode. In this case, default ports 9443 and 2049 are used for admin and NFS. Also, the /etc/gateway_config file displays bridge mode ports only, and they are not applicable to the host mode.

    • After specifying the docker network mode, you must stop and restart Storage Gateway.

  • To change the Storage Gateway admin password:

    sudo ocisg do password:reset

    Set a new password:

    sudo ocisg do password:set new_password
    Enter a password that meets the following requirements:
    • Uses from 8 to 32 characters.

    • Includes at least one special character, one numerical character, one uppercase character, and one lowercase character.

  • To view help for the available commands:

    sudo ocisg help