Skip to content

Create a new NFS share

post/v2/nfs

To create a new NFS share, send a POST request to /v2/nfs.

Body ParametersExpand Collapse
name: string

The human-readable name of the share.

region: string

The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides.

size_gib: number

The desired/provisioned size of the share in GiB (Gibibytes). Must be >= 50.

vpc_ids: array of string

List of VPC IDs that should be able to access the share.

ReturnsExpand Collapse
share: optional object { id, created_at, name, 6 more }
id: string

The unique identifier of the NFS share.

created_at: string

Timestamp for when the NFS share was created.

formatdate-time
name: string

The human-readable name of the share.

region: string

The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides.

size_gib: number

The desired/provisioned size of the share in GiB (Gibibytes). Must be >= 50.

status: "CREATING" or "ACTIVE" or "FAILED" or "DELETED"

The current status of the share.

Accepts one of the following:
"CREATING"
"ACTIVE"
"FAILED"
"DELETED"
host: optional string

The host IP of the NFS server that will be accessible from the associated VPC

mount_path: optional string

Path at which the share will be available, to be mounted at a target of the user's choice within the client

vpc_ids: optional array of string

List of VPC IDs that should be able to access the share.

Create a new NFS share
curl https://api.digitalocean.com/v2/nfs \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN" \
    -d '{
          "name": "sammy-share-drive",
          "region": "atl1",
          "size_gib": 1024,
          "vpc_ids": [
            "796c6fe3-2a1d-4da2-9f3e-38239827dc91"
          ]
        }'
{
  "share": {
    "id": "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
    "created_at": "2023-01-01T00:00:00Z",
    "name": "sammy-share-drive",
    "region": "atl1",
    "size_gib": 1024,
    "status": "ACTIVE",
    "host": "10.128.32.2",
    "mount_path": "/123456/your-nfs-share-uuid",
    "vpc_ids": [
      "796c6fe3-2a1d-4da2-9f3e-38239827dc91"
    ]
  }
}
Returns Examples
{
  "share": {
    "id": "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
    "created_at": "2023-01-01T00:00:00Z",
    "name": "sammy-share-drive",
    "region": "atl1",
    "size_gib": 1024,
    "status": "ACTIVE",
    "host": "10.128.32.2",
    "mount_path": "/123456/your-nfs-share-uuid",
    "vpc_ids": [
      "796c6fe3-2a1d-4da2-9f3e-38239827dc91"
    ]
  }
}