Skip to main content

SphereFiles

SphereFiles gives your environment a file volume that several services can mount at once. Use it for user uploads, media, shared assets, or a folder of files that a web service writes and a worker reads.

A service's own filesystem is lost on restart. A SphereFiles volume is shared: up to 63 mounts across the services of one environment.

Regions: US East and Sweden.

Sizes and prices​

You pay a fixed monthly price for the size you pick: $0.25 per GB a month. Billed yearly, a size costs ten times its monthly price.

SizePer monthPer year
Files 10 GB$2.50$25
Files 50 GB$12.50$125
Files 100 GB$25$250
Files 250 GB$62.50$625
Files 500 GB$125$1,250

What each plan can create:

PlanVolumes per environmentLargest size
Hobby1Files 10 GB
Pro5Files 1 TB
Team10Files 4 TB
EnterpriseAnyFiles 16 TB

Sizes above Files 500 GB aren't offered in any region right now.

Create a volume​

From the environment's options menu, choose Storage management. Under SphereFiles volumes, choose New volume, pick a name and a size, and choose Create volume. The dialog shows what the volume adds to your bill. Billing starts when it's created, monthly or yearly, matching your plan.

Mount it into a service​

Open the volume, and under Mounts choose Add mount: pick the service and the Mount path where the files appear in the service, for example /data/uploads, then choose Mount volume. Every service that mounts the same volume sees the same files. A volume can have up to 63 mounts.

Only services in the volume's own environment can mount it. Adding or removing a mount, or changing its path, restarts that service's spherelets one at a time: a new spherelet is ready before an old one stops, so there's no downtime.

Read-only mounts: mark a mount read-only, and that service can read the files but its writes fail.

Mount a folder: instead of the whole volume, mount one folder inside it, for example uploads/images. Each folder name uses letters, numbers, ., _ and -, starts with a letter, a number or _, and is at most 128 characters; . and .. aren't allowed. A folder can be at most 16 folders deep.

You can't mount a volume at /etc/computesphere or inside it: that path is reserved for the platform. Each path on a service takes one volume.

File ownership: files written as root are stored as user 1000; other users keep their own user ID. New files and folders take group 1000. Make sure the users your services run as can read and write the folders they use.

Several services writing at once​

Every service that mounts a volume read-write can change its files at the same time, even from different spherelets. If two services might write the same file at the same moment, use standard file locks in your app, or give each service its own folder. One writer with many readers, or services that each write their own files, needs nothing extra.

A volume is shared network storage, built for files, uploads and media. Run databases on SphereDB, not on a volume.

Browse the files​

Open the volume, and under Files choose Browse files to browse, upload and download its files from the console. See File browser.

Grow a volume​

Open the volume, and under Size choose Make larger. You can grow a volume once any change it's making has finished; it shows Growing until the new size is ready. You don't need to remove its mounts. Growing pauses the volume, usually for a few minutes: services using it can't read or write its files during the pause, then carry on. If a larger size isn't available, the console says Larger sizes aren't offered in this region right now. You can't shrink a volume: create a smaller one and copy your files over.

Restore points​

SphereFiles doesn't take restore points. Keep a copy of files you can't lose: download them with the file browser, or have a job copy them somewhere else.

Delete a volume​

Open the volume, and in the Danger zone choose Delete volume. Unmount it from every service first: a volume that's still mounted can't be deleted. Deleting a volume deletes every file in it, and it can't be undone.

Limits​

  • Up to 63 mounts per volume, in one environment.
  • SphereFiles volumes don't offer high availability.