Skip to main content

Storage Overview

Vast.ai provides two main types of storage for your instances:
  1. Container Storage - Temporary storage within the Docker container
  2. Volumes - Persistent local storage that can be attached to instances

Container Storage

Container storage is the default storage allocated to every instance when it’s created.

Key Characteristics

  • Size is fixed at creation: You must specify the disk size when creating the instance
  • Cannot be resized: Once created, the allocation cannot be changed
  • Persists while instance exists: Data remains even when instance is stopped
  • Deleted with instance: All data is permanently lost when instance is destroyed
  • Charged continuously: Storage costs apply even when instance is stopped

Default Allocation

  • Minimum: 10GB (default)
  • Maximum: Varies by host machine capacity
  • Set via disk size slider during instance creation
Storage charges continue even when instances are stopped. To stop storage billing, you must destroy the instance completely.

Best Practices

  1. Estimate generously: Better to have extra space than run out mid-task
  2. Monitor usage: Check disk space regularly with df -h
  3. Clean up regularly: Remove unnecessary files to free space
  4. Back up important data: Container storage is lost when instance is destroyed

Volumes

Volumes provide persistent storage that survives instance destruction and can be reattached to new instances.

Key Features

  • Local only: Tied to the physical machine where created
  • Persistent: Survives instance destruction
  • Reattachable: Can be mounted to new instances on same machine
  • Fixed size: Cannot be resized after creation
  • Separate billing: Charged independently from instances

Volume Limitations

  • Cannot migrate between different physical machines
  • Can only attach to instances on the same host
  • Must destroy attached instance before deleting volume
  • Size must be specified at creation time
For detailed volume management, see Volumes.

Storage Costs

Storage pricing varies by host and includes:
  1. Container storage: Charged per GB while instance exists
  2. Volume storage: Charged per GB while volume exists
  3. Different rates: Stopped instances may have higher storage rates than running instances

Data Persistence Strategy

Temporary Work

Use container storage for:
  • Temporary files
  • Build artifacts
  • Cache data
  • Working datasets

Important Data

Use volumes or cloud sync for:
  • Trained models
  • Datasets
  • Code repositories
  • Configuration files

Backup Options

  1. Volumes: For same-machine persistence
  2. Cloud Sync: For off-machine backup (Google Drive, S3, etc.)
  3. Instance-to-instance copy: Transfer between instances
  4. SCP/SFTP: Download to local machine

Common Questions

Can I increase storage after instance creation?

No, container storage size is fixed at creation. You can:
  • Create a new instance with more storage and transfer your data
  • Attach a volume for additional space
  • Use cloud storage for overflow

What happens to my data when the instance stops?

  • Container storage: Data persists, charges continue
  • Volumes: Data persists, charges continue
  • No data is lost when stopping instances

How do I avoid storage charges?

  • Destroy instances you’re not using
  • Delete unneeded volumes
  • Transfer important data to local/cloud storage first

Next Steps

I