- Persistent file sharing between containers of the same service or different services
- Standard filesystem operations through a POSIX-compatible interface
- Built-in high-availability configuration
What is Shared Storage?
Shared Storage provides a network-attached filesystem that multiple containers and services can access simultaneously. Think of it as a shared drive that all your services can read from and write to.Key Features
- Persistent Storage - Data persists across container restarts and deployments
- Multi-Container Access - Share files between containers of the same service
- Cross-Service Access - Share files between different services in your project
- POSIX Compatible - Standard filesystem operations (read, write, delete, etc.)
- Automatic Scaling - Storage scales based on usage
- High Availability - Built-in redundancy and failover
Common Use Cases
Content Management Systems
Share uploaded media files across multiple web server instances:Microservices Data Sharing
Share data between different services:Log Aggregation
Centralize logs from multiple services:File Processing Pipelines
Share files between processing stages:Connecting to Services
To connect Shared Storage to your services:- Define in Import YAML - Specify shared storage in your service configuration
- Configure Mount Path - Choose where to mount the storage in your container
- Set Storage Size - Allocate appropriate storage capacity
Example Configuration
Usage and Limitations
Supported Operations
- Read and write files
- Create and delete directories
- Move and rename files
- Set file permissions
- Standard POSIX filesystem operations
Technical Limitations
- Performance: Network filesystem has higher latency than local disk
- Concurrency: File locking behavior depends on the underlying implementation
- Size Limits: Maximum storage size depends on your plan
- Not Suitable For:
- High-frequency small writes (use local storage or database)
- Database storage (use dedicated database services)
- Temporary files (use local
/tmpdirectory)
Best Practices
Performance
- Use for relatively infrequent reads/writes
- Cache frequently accessed files in memory
- Use local storage for temporary files
- Implement proper file locking for concurrent access
Organization
- Use clear directory structures
- Implement naming conventions
- Clean up old/unused files regularly
- Document shared storage usage patterns
Security
- Set appropriate file permissions
- Validate file uploads and contents
- Implement access controls in your application
- Monitor storage usage and access patterns
Managing Storage
Accessing Files
You can access Shared Storage:- From Your Application - Standard filesystem operations
- Via Zerops VPN - Direct access for debugging and management
- Through zCLI - Command-line operations
Monitoring Usage
Monitor your Shared Storage through:- Zerops GUI - View storage usage and metrics
- Application Metrics - Track file operations in your code
- Logs - Monitor access patterns and errors
Backup Configuration
Shared Storage supports automated backups:- Configure backup schedules
- Set retention policies
- Manual backup triggers
- Point-in-time recovery
Code Examples
Node.js File Upload
Python File Processing
Go File Operations
Technical Details
For in-depth information about the technical architecture and deployment options, see the Technical Details documentation.Popular Guides
- zCLI - Command-line tool for managing Zerops services
- Zerops VPN - Securely access your shared storage
- Backups - Configure automatic backups
- Environment Variables - Configure your application
Support
Need help with Shared Storage?- Join our Discord community - Get help from our team and other members
- Check the documentation for detailed guides
- Share your knowledge and help others in the community