Creating a Site
Learn how to create a new Craft CMS site in Tun, either from scratch or using a blueprint.
Create a New Site from Scratch
To create a brand new Craft CMS site using the guided wizard:
- Click the "+" button in the Tun interface
- Select "Create a new site" from the modal
- Enter a name for your site
- Choose your PHP version (8.2, 8.3, or 8.4)
- Select your routing mode (hostname or localhost)
- Follow the installation wizard to create your admin account
- Click "Create"
Tun will automatically:
- Create the site entry in the registry
- Run
composer create-project craftcms/craftin the project path - Set up a MySQL/MariaDB database
- Generate Docker Compose configuration
- Configure Nginx reverse proxy
- Generate SSL/TLS certificates (if using hostname mode)
- Start the container runtime
- Install Craft CMS with your chosen version (3.x, 4.x, or 5.x)
Create from a Blueprint
If you have a saved blueprint, you can create a new site with all the blueprint's pre-configured settings:
- Click the "+" button
- Select "Create from a Blueprint"
- Choose your blueprint from the list
- Enter a name for the new site
- Click "Create"
The new site will inherit:
- PHP version configuration
- Database settings
- Craft CMS version and configuration
- Project structure and files
- Environment variables
- Installed plugins and modules (if included in blueprint)
This ensures consistent project setups across teams and maintains the same development environment configuration.
Site Lifecycle Management
Once a site is created, you can manage its lifecycle:
- Start — Starts the container runtime and makes the site accessible
- Stop — Stops the containers and frees resources
- Restart — Restarts the site's containers
- Delete — Removes the site from the registry (with confirmation)
Site Organisation
Tun provides several ways to organise your sites:
- Grouping — Group sites for better organisation
- Drag-and-drop reordering — Reorder sites in the sidebar
- Renaming — Rename sites at any time
- Custom hostnames — Configure custom hostnames for each site
Import an Existing Site from ZIP
You can import an existing Craft CMS site from a ZIP backup:
- Click the "+" button
- Select "Import from ZIP"
- Drag your ZIP file into the import area, or click to select it
- Tun will automatically validate and extract the backup
The import process will:
- Validate the ZIP file structure
- Extract the site files to the project path
- Detect Craft CMS version from
composer.lock - Configure the database connection
- Set up the container runtime
- Restore database if included in the backup
Make sure your ZIP file contains the complete Craft CMS installation, including the config/ directory and optionally the database backup.