---
title: Setting Up Shopware Apps | Shopware Community Hub
description: >-
  Get your system ready for App development by setting up Shopware locally and
  installing the demo App.
canonical_url: 'https://hub.shopware.com/learn/unit/app-setting-up-shopware-apps'
---

# Setting Up Shopware Apps

<LearningObjectives>

- **Understand** how to **set up a local Shopware instance** for App development.
- **Learn** how to **install** and **activate** an App.
- **Inspect** the **database** to verify changes.

</LearningObjectives>

# Setting Up Shopware Apps

So, the journey begins. In this learning unit, you will set up your local environment and create the App used in this course, called **ShopwareStoreTracker**.

This App demonstrates the core features of Shopware Apps and helps you understand how they work in practice.

## Getting Ready for Development

Before we start coding, let's get everything set up for development. In the next steps, you will:

- Set up a local Shopware instance
- Create and activate the `ShopwareStoreTracker` App
- Generate Shopware demo data and explore the database

## Getting Started: Setting Up Shopware Locally

Now let's start! Follow the setup instructions below to get a Shopware instance running with the `ShopwareStoreTracker` App installed.

### Install Shopware With Devenv and Composer

For the installation of Shopware in your local system, we recommend our official development environment [`devenv`](https://developer.shopware.com/docs/guides/installation/setups/devenv.html). Devenv comes with all required services pre-configured (like Webserver, MySQL, PHP-FPM and Redis), so you can start developing without setting up each dependency manually.

Other [installation methods](https://developer.shopware.com/docs/guides/installation/) are also possible, but for this course we will use `devenv`.

<Callout title="Set Up Your Local Environment" type="info">

If you do like a more detailed walkthrough of setting up your local environment, check out our installation guide from another learning path:

- **Windows 11 with WSL2**: If you are using Windows 11 with WSL2, check [this guide](/learn/unit/shopware-windows-installation).

- **macOS**: If you are using macOS, check [this guide](/learn/unit/installation-mac).

</Callout>

With `devenv` installed, run the following commands one after the another:

```bash
composer create-project shopware/platform shopware
```

```bash
cd shopware
```

```bash
devenv up
```

You can go ahead and complete system setup — either via [the browser](https://docs.shopware.com/en/shopware-6-en/first-steps/installing-shopware-6?category=shopware-6-en/getting-started) or via the command line with:

```bash
bin/console system:install --basic-setup --create-database --force
```

### Creating the App for This Course

For this course, you will create the `ShopwareStoreTracker` App yourself. Shopware provides a convenient CLI command that generates the basic App structure for you.

Run the following command from your Shopware root directory to start the interactive setup process:

```bash
bin/console app:create ShopwareStoreTracker
```

You should now see a new folder `ShopwareStoreTracker` under `[Shopware-Root]/custom/apps`. If the folder `apps` did not exist before, the command will create it automatically. You will find a `manifest.xml` file inside your App directory. It contains metadata like name, author and version. You will learn its full structure in the **next learning unit**.

The App can already be installed in its current state. Later you will connect it to an [App Server](https://developer.shopware.com/docs/guides/plugins/apps/app-base-guide.html#setup-optional) to enable advanced features such as external communication.

### Install Demo-Data to Shopware

To follow all the sections of this course, you need to generate some demo data for the Shopware instance. In the Shopware root directory, run the following command:

```bash
APP_ENV=prod bin/console framework:demodata
```

<Callout title="Useful Tools for Local and Live Environments" type="info">

The strong community of Shopware has created a group called **Friends of Shopware (Frosh)**. They offer high-quality open-source plugins that are widely used in both **local development** and **production environments**.

Common examples include:

- [FroshTools](https://store.shopware.com/en/frosh12599847132f/tools.html)
- [Adminer for Admin](https://store.shopware.com/en/frosh79014577529f/adminer-for-admin.html)

You don't need these tools for this course, but they can enhance your setup and support your future Shopware projects.

</Callout>

### Install the App

Now that your Shopware instance is up and the App is created, you can install the `ShopwareStoreTracker` App. Navigate to your Shopware root directory and run the following command:

```bash
bin/console app:install ShopwareStoreTracker
```

Followed by:

```bash
bin/console app:activate ShopwareStoreTracker
```

You can verify that the App is available by running the following command:

```bash
bin/console app:list
```

![SW_COMMAND_APP_LIST](assets/shopware-command-appList.png)

<Callout title="Install and Activate the App" type="info">

You can also install and activate the App in one command:

```bash
bin/console app:install ShopwareStoreTracker --activate
```

</Callout>

## Inspecting the Database

Sometimes you may want to check directly in the database whether your changes have taken effect. There are two main ways to do this:

### Option 1: Using the Adminer GUI

If you installed your Shopware instance via [devenv](https://developer.shopware.com/docs/guides/installation/setups/devenv.html), Adminer should already be available at `http://localhost:9080`. If you are using a different hosting solution, you may have to [install Adminer manually](https://www.cyberciti.biz/faq/how-to-install-adminer-on-ubuntu-20-04-lts/).
When you reach the home page, you will need to enter the credentials for your database.

![Adminer login screen](assets/adminer-login.png)

Another convenient option is the [Adminer for Admin](https://store.shopware.com/en/frosh79014577529f/adminer-for-admin.html) plugin. It integrates Adminer directly into the Shopware Administration and can be installed for free via the [Frosh Plugin Store](https://store.shopware.com/en/extension-partners/friends-of-shopware).

### Option 2: Using the Command-Line

If you prefer the terminal, you can use the [MySQL CLI client](https://dev.mysql.com/doc/refman/8.4/en/mysql.html). It can be installed on Debian-based distributions with the following command:

```bash
sudo apt install mysql-client
```

Then, you can connect to the database with the following command:

```bash
mysql -u <username> -p <databasename>
```

Or, if required, explicitly define the host:

```bash
mysql -u <username> -p -h 127.0.0.1 <databasename>
```

You will be prompted to enter your database password. After logging in, you can run SQL queries to inspect the database (e.g., `SHOW TABLES;` or `SELECT * FROM <tablename>;`).

This course focuses on using [Adminer](https://www.adminer.org/en/), but both approaches are valid.

<Callout title="App-related tables" type="info">

You can identify all App-related tables by their prefix **`app_`**. Depending on your Shopware version, some table names might differ slightly, but the overall structure remains the same.

If your App is installed successfully, you should see an entry for it in the **`app`** table.

</Callout>

## Code-Along (end)

At this point, you should have a working setup of the `ShopwareStoreTracker` App that you created yourself.

If you want to compare your progress with the final result of this learning unit, you can clone the public GitHub repository into a **separate folder** to avoid naming conflicts with your own App. Run the following commands from your Shopware root directory:

```bash
cd custom/apps
```

```bash
git clone https://github.com/ShopwareAcademy/ShopwareStoreTracker ShopwareStoreTracker_Reference
```

```bash
cd ShopwareStoreTracker_Reference
```

```bash
git checkout tags/app_setup--end
```

This will create a folder named `ShopwareStoreTracker_Reference` instead of `ShopwareStoreTracker` in your `custom/apps` directory containing the final state (the tag `app_setup--end`) of the App for this learning unit.

<Callout title="Important" type="info">

Shopware Apps are validated by their folder name. If the folder name does not match the App name defined in the `manifest.xml` file (The `<name>` attribute under `<meta>`), the App will not be recognized as valid.

If you cloned the repository, make sure to update the `<name>` value in the `manifest.xml` file to match the folder name (in this case `ShopwareStoreTracker_Reference`).

</Callout>

You can now compare your own implementation (`ShopwareStoreTracker`) with the reference version (`ShopwareStoreTracker_Reference`) to review differences or recover if something went wrong.

<Callout title="Browse the Repository online" type="info">

You can also browse the repository online at [https://github.com/ShopwareAcademy/ShopwareStoreTracker](https://github.com/ShopwareAcademy/ShopwareStoreTracker).

</Callout>

## Summary

In this learning unit, you have:

- **Set up** a **local** Shopware **instance** with `devenv`
- **Created** your own App using `bin/console app:create`
- Installed **demo data** and **activated** the App
- **Learned** two ways of **inspecting** the database (Adminer and CLI)
- Optionally **cloned the reference version** of the App to compare your work

Now you have a fully working Shopware instance with the `ShopwareStoreTracker` App installed.

In the next learning unit, you will take a closer look at the **manifest.xml** file, the central configuration file that defines how your App connects and the Shopware system.
