Craft CMS applications

2 min read Updated 16 hours ago

Craft CMS hosting

Deploy your Craft CMS projects with automatic configuration and optimized hosting. We handle the technical setup so you can focus on creating amazing content experiences.

Getting started

When you create a new application and select Craft CMS as your framework, we automatically configure everything needed for your project:

  • PHP 8.4 environment with required extensions
  • Automatic security key generation (APP_ID and SECURITY_KEY)
  • Database configuration for MySQL or PostgreSQL
  • Asset volume support with persistent storage
  • Node.js support for front-end build processes (configurable)

New project setup

If you're starting a new Craft CMS project without an existing repository, we'll automatically run the Craft CMS installer for you. Simply:

  1. Create a new application
  2. Select "Craft CMS" as your framework
  3. Choose your preferred Craft CMS version (default is version 5)
  4. We'll handle the rest, including creating the project structure

Existing project deployment

For existing Craft CMS projects in a repository:

  1. Connect your Git repository
  2. Select "Craft CMS" as your framework
  3. Configure your environment variables if needed
  4. Add init commands for database setup (see examples below)
  5. Deploy - we'll detect and configure Craft automatically

Database configuration

Craft CMS requires a database to store your content. When you add a MySQL or PostgreSQL service to your application, we automatically configure these environment variables:

  • CRAFT_DB_DRIVER - Set to mysql or pgsql based on your choice
  • CRAFT_DB_SERVER - Database host connection
  • CRAFT_DB_PORT - Database port
  • CRAFT_DB_DATABASE - Database name
  • CRAFT_DB_USER - Database username
  • CRAFT_DB_PASSWORD - Database password
  • CRAFT_DB_SCHEMA - Set to 'public' for PostgreSQL

Environment variables

We automatically set essential Craft CMS environment variables:

  • CRAFT_ENVIRONMENT - Set to 'production' for optimal performance
  • PRIMARY_SITE_URL - Your application's URL with https:// prefix
  • CRAFT_APP_ID - Unique identifier for your Craft installation (automatically generated)
  • CRAFT_SECURITY_KEY - Secure key for encryption (automatically generated)

Build configuration

The build process differs based on your setup:

For new installations (no repository):

  • We run composer create-project craftcms/craft:^5 . --no-interaction --no-dev
  • This creates a fresh Craft CMS installation

For existing repositories:

  • Standard Composer dependency installation
  • Running npm install and build if package.json exists and Node.js is configured
  • Setting proper file permissions

Init commands

For Craft CMS applications, you should configure init commands to handle database setup and migrations. Common init commands include:

php craft install/check || php craft setup/app-id
php craft install --interactive=0 --email=admin@example.com --username=admin --password=password --siteName="My Site" --siteUrl="" || true
php craft migrate/all --no-content --interactive=0
php craft project-config/apply --interactive=0

These commands run on each deployment to ensure your database is properly configured.

Asset storage

For file uploads and assets, we provide persistent storage that survives deployments. Your uploads directory is automatically configured with proper permissions and backup support.

Performance optimization

Your Craft CMS application benefits from:

  • Optimized PHP configuration for Craft CMS
  • Automatic opcache configuration
  • Static asset caching
  • Database query optimization

Security features

We automatically handle security best practices:

  • Secure key generation for new installations
  • Environment variable encryption
  • Regular security updates
  • Isolated application environments

Troubleshooting

If you encounter issues:

  • Check that your database service is running
  • Verify environment variables are set correctly
  • Ensure your init commands are properly configured for database setup
  • Ensure your repository has the correct Craft CMS structure
  • Review deployment logs for specific error messages

Need help? Contact our support team for assistance with your Craft CMS deployment.