Skip to content

Getting started

github-actions[bot] edited this page Oct 27, 2026 · 7 revisions

Getting Started

This guide walks you through the shortest path from installation to a working local Govard project.


1. Initialize a Project

Navigate to your project root and run:

cd /path/to/your/project
govard init

Govard inspects composer.json or package.json, detects the framework, and writes .govard.yml.

Detected Frameworks

Framework Detection
Magento 2 composer.json with magento/product-community-edition, magento/product-enterprise-edition, or magento/framework
Mage-OS composer.json with mage-os/product-community-edition or mage-os/project-community-edition
Magento 1 / OpenMage composer.json with magento-hackathon/magento-composer-installer, openmage/magento-lts, or colinmollenhour/modman
Laravel artisan file + composer.json with laravel/framework
Next.js package.json with next dependency
Emdash Project markers from the Emdash scaffold (src/app layout + Emdash config)
Drupal composer.json with drupal/core or drupal/core-recommended
Symfony composer.json with symfony/framework-bundle
Shopware composer.json with shopware/core
CakePHP composer.json with cakephp/cakephp
PrestaShop config/defines.inc.php or composer.json with prestashop/prestashop
WordPress wp-config.php or wp-login.php
Django manage.py at project root
Dagster workspace.yaml or dagster.yaml at project root
Custom Interactive stack picker (govard init --framework custom)

Force a Specific Framework

govard init --framework magento2
govard init --framework custom

Migrate from other tools

If you are transitioning from Warden or DDEV, Govard can automatically detect your setup and seamlessly copy your local database volume so you don't lose any data:

govard init --migrate-from warden
govard init --migrate-from ddev

2. Start the Environment

govard env up

This renders a per-project compose file under ~/.govard/compose/ and starts your specialized stack.

Common Variants

govard up --quickstart           # Alias: govard env up
govard env up --pull             # Pull latest images first
govard env up --fallback-local-build  # Build images locally if pull fails

Startup Pipeline

  1. Detect framework context
  2. Validate config, Docker, ports, and prerequisites
  3. Render compose file into ~/.govard/compose/
  4. Start containers in detached mode
  5. Verify proxy and host wiring

Root Shortcuts

Shortcut Equivalent
govard up govard env up
govard down govard env down
govard restart govard env restart
govard ps govard env ps
govard logs govard env logs

3. Configure the App

Magento 2 Projects

Auto-inject container settings into app/etc/env.php:

govard config auto

View Current Config

govard config get php_version
govard config get stack.services.db

4. Enter the Workspace

govard shell
  • PHP frameworks (Magento, Laravel, etc.): opens the php container at /var/www/html
  • Node-first frameworks (Next.js, Emdash): opens the web container at /app

5. Access Your App and Global Services

Govard routes project domains through the shared Caddy proxy and provides built-in services for development:

Project URLs

Target URL Command
App URL https://<project>.test Open in browser
Admin panel https://<project>.test/admin govard open admin
Mail testing https://mail.govard.test govard open mail
Database admin https://pma.govard.test govard open db
Docker management https://portainer.govard.test govard open portainer

Global Services Credentials

Service URL Credentials
Portainer https://portainer.govard.test admin / AdminGovard123$
PHPMyAdmin https://pma.govard.test Use project's DB credentials
Mailpit https://mail.govard.test No login required

Application Admin

Govard seeds the same admin account everywhere, and the Project URLs table above opens it:

Target Credential
Project admin panel admin / AdminGovard123$
Portainer admin / AdminGovard123$

The account is written during govard bootstrap, both for a fresh install and for a clone, and the completion banner prints it whenever it was actually applied. Three situations change what you get:

  • A cloned Magento 2 or Mage-OS database usually already contains a user named admin. Govard keeps that user and its source password, the banner prints only the admin URL, and the bootstrap output names the command that resets it to the shared credential.
  • A project bootstrapped before this credential existed keeps the password it was created with. Nothing rewrites an existing database.
  • govard bootstrap --no-admin only skips the user Govard creates for a Magento 2 or Mage-OS clone. A fresh install still seeds the account through setup:install, and Magento 1, OpenMage, WordPress and Drupal always seed it.

The banner prints the framework's default route (/admin for Magento, /wp-admin for WordPress). Magento 2 and Mage-OS resolve a route moved in the database when you open the panel with govard open admin; a Magento 1 or OpenMage project that moved its admin route in app/etc/local.xml still sees the default in the banner.

Quick Commands

# Open services
govard open mail     # Mailpit
govard open db       # PHPMyAdmin
govard open admin    # Project admin panel

# Manage global services
govard svc up        # Start all global services
govard svc down      # Stop all global services
govard svc ps        # View service status

๐Ÿ” Daily Workflow

# Start work
govard up

# Follow logs
govard logs php -f

# Toggle Xdebug
govard debug on

# Enter shell
govard shell

# Stop work
govard down

๐ŸŒ Bootstrap a Remote Clone

To clone an existing environment from a remote server:

govard bootstrap --clone -e staging --no-pii --no-noise

For a fresh framework installation:

govard bootstrap --framework magento2 --fresh --framework-version 2.4.9
govard env up
govard open admin

๐Ÿฉบ First Troubleshooting Checks

govard doctor
govard doctor trust   # Fix browser SSL warnings

If your browser shows HTTPS trust warnings after setup, run govard doctor trust to re-import the Root CA.


๐Ÿ“‹ What's Next

Topic Link
All CLI commands CLI Commands
Configuration options Configuration
Framework-specific notes Frameworks
SSL and DNS setup SSL and Domains
Remote environments Remotes and Sync
Desktop app Desktop App

โ† Installation | CLI Commands โ†’

Clone this wiki locally