How nextcloud/server works
Nextcloud Server is a self-hosted platform for storing, syncing, sharing, and protecting user data, with additional apps that extend its capabilities. The principal workflow is a user accessing files through the server, with storage, previews, and sharing supporting that access; the README also documents synchronization across devices. The tree and samples show platform APIs and selected app areas, not the complete runtime or all documented capabilities. Some edges therefore reflect README-level behavior, while unsampled app relationships are left unspecified.
Main entry points: IUserSession.php User session API · IStorage.php Storage contract · Controller.php App framework · Log.php Logging
Components 30
Server platform
- App framework
lib/public/AppFramework/Controller.php - HTTP request API
lib/public/IRequest.php - Response formatting
lib/public/AppFramework/Controller.php - HTTP status API
lib/public/AppFramework/Http.php - Logging
lib/private/Log.php - User management API
lib/public/IUserManager.php
File services
- File API
lib/public/Files/Node.php - Folder API
lib/public/Files/Folder.php - User file roots
lib/public/Files/IRootFolder.php - Storage contract
lib/public/Files/Storage/IStorage.php - Storage wrapper
lib/private/Files/Storage/Wrapper/Wrapper.php - File view
lib/private/Files/View.php - External storage admin
apps/files_external/lib/Controller/StoragesController.php - Preview endpoints
core/Controller/PreviewController.php - Preview generation
lib/private/PreviewManager.php - Preview metadata
lib/private/Preview/Db/Preview.php - Trash and recovery
apps/files_trashbin/lib/Storage.php - File versions
apps/files_versions/lib/Storage.php - File cache API
lib/public/Files/Cache/ICache.php - Preview API
lib/public/IPreview.php
App ecosystem
- App discovery and management
apps/appstore/src/views/AppstoreBrowse.vue - Workflow rules
apps/workflowengine/src/workflowengine.ts
Collaboration
- File sharing
apps/files_sharing/lib/SharedStorage.php - File comments
apps/comments/src/services/GetComments.ts - Federated sharing API
apps/cloud_federation_api/lib/Controller/OCMRequestController.php
Security
- Audit events
apps/admin_audit/lib/AuditLogger.php - Encryption key management
apps/encryption/lib/KeyManager.php - User session API
lib/public/IUserSession.php
Other components
- User
- User devices
Connections 22
- User → File API: accesses files
README.md - User devices → User: syncs data
README.md - User → File sharing: shares data
README.md - User → App discovery and management: discovers apps
README.md - User → Encryption key management: protects data
README.md - App framework → HTTP request API: receives requests
lib/public/AppFramework/Controller.php - App framework → Response formatting: formats responses
lib/public/AppFramework/Controller.php - External storage admin → HTTP status API: sets status
apps/files_external/lib/Controller/StoragesController.php - Storage wrapper → Storage contract: delegates operations
lib/private/Files/Storage/Wrapper/Wrapper.php - External storage admin → Storage contract: configures mounts
- Preview endpoints → Preview API: requests previews
core/Controller/PreviewController.php - Preview generation → Preview API: implements previews
lib/private/PreviewManager.php - Preview generation → Preview metadata: loads mapper
lib/private/PreviewManager.php - File API → Folder API: supports folders
lib/public/Files/Folder.php - User file roots → Folder API: extends folder
lib/public/Files/IRootFolder.php - File sharing → Storage wrapper: uses storage wrappers
apps/files_sharing/lib/SharedStorage.php - File versions → File view: uses file view
apps/files_versions/lib/Storage.php - File versions → Storage contract: uses storage interface
apps/files_versions/lib/Storage.php - User session API → User: authenticates
lib/public/IUserSession.php - Logging → User session API: checks user session
lib/private/Log.php - Logging → HTTP request API: reads request data
lib/private/Log.php - User management API → User session API: supports user identity