Grav CMS
Modern flat-file CMS with no database required.
Overview
Grav is a modern flat-file Content Management System built on PHP that stores content in Markdown files instead of a database. Developed by RocketTheme, Grav emerged as a response to the complexity and security vulnerabilities of traditional database-driven CMS platforms like WordPress and Drupal. By eliminating the database layer entirely, Grav offers faster performance, simpler backups, and Git-friendly version control for content management. The LinuxServer.io Grav image provides a containerized environment with proper file permissions and timezone handling, running on Apache with PHP 8.x support. This flat-file architecture makes Grav exceptionally portable and eliminates common database-related issues like connection failures, corruption, or migration complexity. Content creators and developers benefit from Grav's Twig templating engine, extensive plugin ecosystem through GPM (Grav Package Manager), and the ability to edit content directly in Markdown files or through the optional Admin plugin interface.
Key Features
- Flat-file architecture with Markdown content storage eliminating database dependencies
- Twig templating engine with flexible theme customization and inheritance
- GPM (Grav Package Manager) for one-click plugin and theme installation
- Built-in Markdown Extra support with custom shortcodes and macros
- Multi-language content support with automatic language detection
- YAML-based configuration with environment-specific overrides
- Responsive Admin Panel plugin for content management through web interface
- Git-friendly content workflow enabling version control for pages and media
Common Use Cases
- 1Developer portfolios and documentation sites requiring version-controlled content
- 2Small business websites needing fast loading times without database overhead
- 3Marketing agencies managing multiple client sites with simplified deployment
- 4Technical blogs and knowledge bases leveraging Markdown writing workflows
- 5Prototype and staging environments where database setup adds complexity
- 6Educational institutions creating course materials with collaborative editing
- 7Personal blogs and creative portfolios prioritizing simplicity and performance
Prerequisites
- Docker Engine 20.10+ and Docker Compose V2 for container orchestration
- Minimum 512MB RAM allocated for PHP processes and file caching
- Port 8080 available on host system for web interface access
- Basic understanding of Markdown syntax for content creation
- Familiarity with YAML configuration files for Grav settings
- Knowledge of Twig templating for theme customization (optional)
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 grav: 3 image: linuxserver/grav:latest4 container_name: grav5 restart: unless-stopped6 environment: 7 PUID: 10008 PGID: 10009 TZ: UTC10 volumes: 11 - grav_config:/config12 ports: 13 - "8080:80"1415volumes: 16 grav_config: .env Template
.env
1# No database required - flat-file CMSUsage Notes
- 1Docs: https://learn.getgrav.org/
- 2Access at http://localhost:8080
- 3Install Admin plugin: bin/gpm install admin, then /admin
- 4Content stored as Markdown files in user/pages/
- 5Flat-file: no database, easy backups, Git-friendly
- 6Twig templating, extensive plugin ecosystem
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 grav:5 image: linuxserver/grav:latest6 container_name: grav7 restart: unless-stopped8 environment:9 PUID: 100010 PGID: 100011 TZ: UTC12 volumes:13 - grav_config:/config14 ports:15 - "8080:80"1617volumes:18 grav_config:19EOF2021# 2. Create the .env file22cat > .env << 'EOF'23# No database required - flat-file CMS24EOF2526# 3. Start the services27docker compose up -d2829# 4. View logs30docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/grav-cms/run | bashTroubleshooting
- Permission denied errors accessing /config: Ensure PUID/PGID match host user ownership of mounted volumes
- Admin plugin not found after installation: Restart container after GPM install to reload plugin cache
- Pages not displaying after creation: Check YAML frontmatter syntax in Markdown files for parsing errors
- Slow performance on large sites: Enable Grav caching in system.yaml and consider Redis cache plugin
- Theme changes not appearing: Clear Grav cache through Admin panel or delete /config/cache directory
- GPM install failing with network errors: Verify container has internet access and GPM repository is accessible
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download