You need a VPC with a subnet that has a free address, and an instance with
a private interface in that VPC. The examples
call the API with an API key in $EZGH_API_KEY, and the organization’s and project’s
IDs in $ORG_ID and $PROJECT_ID.
-
Create the file system with CreateFileSystem, in the VPC whose instances mount it:
curl -X POST -H "Authorization: Bearer $EZGH_API_KEY" \ -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \ -d '{"name": "shared", "vpc": "vpc_5p7r9s3t1vxz"}' \ "https://files-api.ezghcloud.com/v1/organizations/$ORG_ID/projects/$PROJECT_ID/file-systems"The answer is
202with an operation. The file system exists from then on,creating, with its ID, and isavailableonce the operation succeeds. -
Create a mount target in a subnet of that VPC with CreateMountTarget:
curl -X POST -H "Authorization: Bearer $EZGH_API_KEY" \ -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \ -d '{"fileSystem": "fsy_4k2m9x0a7qpe", "subnet": "sbn_2m9x0a7qpe4k"}' \ "https://files-api.ezghcloud.com/v1/organizations/$ORG_ID/projects/$PROJECT_ID/mount-targets"It takes one address in the subnet. One mount target serves every subnet of the VPC.
-
Once it’s
available, GetMountTarget shows its address and DNS name:{ "id": "0199a3f0-1c2d-7e3f-8a4b-5c6d7e8f9a0b", "slug": "fmt_7hq2m0x9ka3c", "name": "fmt_7hq2m0x9ka3c", "resourceName": "ezgh:us-west-1:org_k3f9a0x2m7qp:prj_g7h8i9j0k1l2:fmt_7hq2m0x9ka3c", "organizationId": "0199a3c2-5b1e-7d40-9f3a-2c8e6b1d4f70", "projectId": "0199a3c2-6c2f-7e51-8a4b-3d9f7c2e5a81", "region": "us-west-1", "tags": {}, "fileSystem": "fsy_4k2m9x0a7qpe", "subnet": "sbn_2m9x0a7qpe4k", "vpc": "vpc_5p7r9s3t1vxz", "ipv4Address": "10.0.1.25", "hostname": "dfc6fl64neocrciu5ogrl4kccq.fs.us-west-1.ezghcompute.com", "allowedSourceCidrs": ["10.0.0.0/16"], "status": "available", "failure": null, "createdAt": "2026-11-04T18:20:05.112Z", "updatedAt": "2026-11-04T18:20:41.508Z" }Use the
slug(fmt_…) to refer to it;idis its UUID. -
On the instance, install the NFS client and mount the file system by its ID:
sudo apt-get install -y nfs-common sudo mkdir -p /mnt/shared sudo mount -t nfs4 -o nfsvers=4.1,hard,noresvport,rsize=1048576,wsize=1048576,timeo=600,retrans=2 \ dfc6fl64neocrciu5ogrl4kccq.fs.us-west-1.ezghcompute.com:/fsy_4k2m9x0a7qpe /mnt/sharedOn Rocky Linux, install
nfs-utilsinstead. To encrypt the connection, addxprtsec=tls; see Encrypt with TLS.
Mount it on as many instances in the VPC as you like: they all see the same files. To mount at boot, see Mount a file system.