# Shopware6 und WSL2 - Einrichtung einer Entwicklungsumgebung

**URL:** <https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299>\
**Category:** Installation / Einstieg\
**Created:** [1. September 2020 um 07:41 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299 "2020-09-01T07:41:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![n8lauscher](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/n8lauscher/32/13325_2.png) [@n8lauscher](https://forum.shopware.com/u/n8lauscher)\
**Post date:** [1. September 2020 um 07:41 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/1 "2020-09-01T07:41:11Z")

</div>

Hallo [@Moritz Naczenski]([http://forum.shopware.com/profile/14574/Moritz](http://forum.shopware.com/profile/14574/Moritz) Naczenski „Moritz Naczenski“)‍

ich möchte mir eine Entwicklungsumgebung über die WSL2 einrichten.&nbsp;

In meiner WSL2 läuft Debian - folgende Pakete habe ich dann noch installiert:

- php7.4
- wget
- unzip

Auch habe ich den&nbsp;Docker-Desktop installiert und der WSL2 zugeordnet.

Grundsätzlich Frage hierzu:  
Ist es überhaupt möglich, shopware6 über eine WSL2 ans laufen zu bekommen?&nbsp;  
Gibt es hier ein Tutorial zu?&nbsp;

Beste Grüße  
Michael

&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![n8lauscher](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/n8lauscher/32/13325_2.png) [@n8lauscher](https://forum.shopware.com/u/n8lauscher)\
**Post date:** [1. September 2020 um 07:59 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/2 "2020-09-01T07:59:36Z")

</div>

Bisher habe ich in einer frisch installierten WSL folgendes ausgeführt:

```
sudo apt install -y curl wget gnupg2 ca-certificates lsb-release apt-transport-https

wget https://packages.sury.org/php/apt.gpg sudo apt-key add apt.gpg

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.list

sudo apt update

sudo apt install -y php7.4 php7.4-cli php7.4-common

sudo apt install -y git

```

Ab hier halte ich mich dann an: [Shopware 6: Installation](https://docs.shopware.com/en/shopware-platform-dev-en/system-guide/installation)

```
git clone https://github.com/shopware/development.git

cd development

rm -rf platform

git clone https://github.com/shopware/platform.git
```

---

<div class="post-metadata">

**Author:** ![n8lauscher](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/n8lauscher/32/13325_2.png) [@n8lauscher](https://forum.shopware.com/u/n8lauscher)\
**Post date:** [1. September 2020 um 08:14 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/3 "2020-09-01T08:14:20Z")

</div>

wenn ich jetzt:

```
./psh.phar docker:start

```

dann erhalte ich:

```
Using .psh.yaml.dist

Starting Execution of 'docker:start' ('/home/mrohwer/development/dev-ops/docker/actions/start.sh')

(1/3) Starting
> dev-ops/docker/scripts/check_permissions.sh

(2/3) Starting
> if [-n ""]; then docker-sync start && echo "\n docker-sync is initially indexing files. It may take some minutes, until code changes take effect"; fi

(3/3) Starting
> docker-compose build --parallel && docker-compose up -d
        Couldn't connect to Docker daemon at http+docker://localhost - is it running?

        If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

Execution aborted, a subcommand failed!

```

[@Moritz Naczenski]([http://forum.shopware.com/profile/14574/Moritz](http://forum.shopware.com/profile/14574/Moritz) Naczenski “Moritz Naczenski”)‍

was ist hier falsch?&nbsp;

---

<div class="post-metadata">

**Author:** ![n8lauscher](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/n8lauscher/32/13325_2.png) [@n8lauscher](https://forum.shopware.com/u/n8lauscher)\
**Post date:** [2. September 2020 um 14:06 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/4 "2020-09-02T14:06:54Z")

</div>

hat hier denn einer bereits Shopware in einer WSL2 am laufen?&nbsp;

---

<div class="post-metadata">

**Author:** ![HeXtheone](https://avatars.discourse-cdn.com/v4/letter/h/73ab20/32.png) [@HeXtheone](https://forum.shopware.com/u/HeXtheone)\
**Post date:** [14. September 2020 um 08:03 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/5 "2020-09-14T08:03:14Z")

</div>

Ich nutze&nbsp;SW6 mit Docker und WSL2.&nbsp;

Deine Dockerversion&nbsp;wird wahrscheinlich zu alt sein:

Ich nutze:

ubuntu 20.04 LTS

docker-compose: 1.25.0

docker: 19.03.8

Hinzu kommt du musst die Zeile 34 in der docker-compose.yml auskommentieren: #ipc: host

&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![sunflower](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sunflower/32/8100_2.png) [@sunflower](https://forum.shopware.com/u/sunflower)\
**Post date:** [27. Oktober 2020 um 11:02 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/6 "2020-10-27T11:02:39Z")

</div>

@HeXtheone‍ Nutzt Du vscode oder PHPstorm? Mit welcher Shell arbeitest Du: WindowsPowerShell, WSL Bash oder GIT Bash?

---

<div class="post-metadata">

**Author:** ![sunflower](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sunflower/32/8100_2.png) [@sunflower](https://forum.shopware.com/u/sunflower)\
**Post date:** [27. Oktober 2020 um 11:30 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/7 "2020-10-27T11:30:23Z")

</div>

Ich versuche mich auch gerade an der Installation unter Win10 : Ubuntu 20.04, docker-compose 1.27.4 und docker 19.03.13

Docker Desktop ist installiert, WSL2 enabled und als default distro ist Ubuntu 20.04 aktiviert.

Nach Aufruf von&nbsp; **./psh.phar docker:start** läuft es lange durch bis zum Abbruch:

```
        Build process completed successfully
        Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20170718/pcov.so'
        install ok: channel://pecl.php.net/pcov-1.0.6
        configuration option "php_ini" is not set to php.ini location
        You should add "extension=pcov.so" to php.ini
        Changed current directory to /.composer

          [RuntimeException]
          No composer.json present in the current directory, this may be the cause of the following exception.

          [InvalidArgumentException]
          Package hirak/prestissimo at version has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [27. Oktober 2020 um 11:38 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/8 "2020-10-27T11:38:34Z")

</div>

Ich hab letztens ein Tutorial erstellt. Vielleicht hilft es dir&nbsp;[https://shyim.me/blog/shopware-environment-windows](https://shyim.me/blog/shopware-environment-windows)

---

<div class="post-metadata">

**Author:** ![n8lauscher](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/n8lauscher/32/13325_2.png) [@n8lauscher](https://forum.shopware.com/u/n8lauscher)\
**Post date:** [27. Oktober 2020 um 16:33 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/9 "2020-10-27T16:33:26Z")

</div>

@Shyim‍  
DANKE FETT!

---

<div class="post-metadata">

**Author:** ![sunflower](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sunflower/32/8100_2.png) [@sunflower](https://forum.shopware.com/u/sunflower)\
**Post date:** [27. Oktober 2020 um 16:54 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/10 "2020-10-27T16:54:29Z")

</div>

@Shyim‍ Danke, aber das bringt mich nicht wirklich weiter.

Hab nun nochmal Ubuntu 20.04 neu in Windows aufgesetzt und alle Befehle,&nbsp;wie&nbsp;[HeXtheone](https://forum.shopware.com/profile/31442/HeXtheone)&nbsp;genannt hat durchgeführt.  
Gleiches Ergebnis wie bereits gezeigt: RuntimeExeption - Execution aborted&nbsp; ![Crying](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/3d74433e0d4d6cb84e92906c2faceb6b50db91bf.png "Crying")

Allerdings finde ich die Ausgabe von wsl --list seltsam:

![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/2/24f7b9bf847cafa3f830f303429d156fec3a09b4.png)

Muss man hier Ubuntu 20.04 als default(Standard) einstellen?

Was ist docker-desktop überhaupt für eine Distribution?

![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/6/671d5cfbeb350de6c7fc96b81f42d4829ef5b638.png)

Schade das das so nicht funktioniert. Dockware habe ich zum Laufen bekommen, doch das ist imho keine richtige Development-Umgebung.

Im Academy-Kurs “Template Basic Training”&nbsp;erwähnt Niklas, dass wenn etwas bei der Installation(Aufruf psh.phar docker:start) schief geht, alles neu augesetzt werden muss??? Wie darf man das verstehen?

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [27. Oktober 2020 um 19:15 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/11 "2020-10-27T19:15:48Z")

</div>

Lösch mal diese Zeile aus dem Development Repository

[https://github.com/shopware/development/blob/master/dev-ops/docker/containers/app/Dockerfile#L39](https://github.com/shopware/development/blob/master/dev-ops/docker/containers/app/Dockerfile#L39) und lösch von der Zeile davor das \ weg

---

<div class="post-metadata">

**Author:** ![sunflower](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sunflower/32/8100_2.png) [@sunflower](https://forum.shopware.com/u/sunflower)\
**Post date:** [28. Oktober 2020 um 10:33 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/12 "2020-10-28T10:33:37Z")

</div>

![Thumb-Up](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/7fcda44f782696668a3d093569d15e88105769e1.png "Thumb-Up") Vielen Dank, diese Hürde scheint überwunden. ![Smile](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/bac5f5766b6a20565a8fb995345b4e41d24daac0.png "Smile")

![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/4/47447bd4a90192925d29509ffde6ec7df247e298.png)

---

<div class="post-metadata">

**Author:** ![HeXtheone](https://avatars.discourse-cdn.com/v4/letter/h/73ab20/32.png) [@HeXtheone](https://forum.shopware.com/u/HeXtheone)\
**Post date:** [12. November 2020 um 13:49 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/13 "2020-11-12T13:49:54Z")

</div>

@sunflower‍ Ich nutze Windows Terminal mit Ubuntu

Derzeit entwickle ich aber mit Dockware, hast recht es ist die Live Version ohne psh.phar… aber bisher konnte ich alles mit der console oder den shellscripts unter /bin lösen.

@Shyim‍ Warum installierst du PhpStorm in Ubuntu und nicht direkt unter Windows?

&nbsp;

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [12. November 2020 um 14:02 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/14 "2020-11-12T14:02:53Z")

</div>

Damit PhpStorm direkt mit den Filesystem redet und nicht komisch über Windows.

---

<div class="post-metadata">

**Author:** ![Gunnarius](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@Gunnarius](https://forum.shopware.com/u/Gunnarius)\
**Post date:** [2. Februar 2021 um 11:50 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/15 "2021-02-02T11:50:59Z")

</div>

@Shyim‍

Danke für das tolle Tutorial.

Warum installierst du alles in WSL2 und nicht direkt unter Windows?

Kann ich das nicht genauso unter Windows installieren?

Ich habe im Moment PHPStorm unter Windows. Ich werde dann eine SFTP-Verbindung zu Docker aufbauen.

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [2. Februar 2021 um 12:05 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/16 "2021-02-02T12:05:19Z")

</div>

@Gunnarius‍ Weil der Dateisystemaustausch mit WSL2 immer noch unfassbar langsam ist. Mit SFTP / usw hab ich alles schon ausprobiert es nervt einfach irgendwann bricht der Sync ab. Oder du führst im Container nen Command aus. Musst alle Dateien wieder downloaden. Frisst alles unnötig zeit.

---

<div class="post-metadata">

**Author:** ![Gunnarius](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@Gunnarius](https://forum.shopware.com/u/Gunnarius)\
**Post date:** [3. Februar 2021 um 09:42 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/17 "2021-02-03T09:42:35Z")

</div>

@Shyim‍ Danke. Es läuft soweit. Nach einem Datenbank-Import habe ich jetzt allerdings einen „500 Internal Server Error“.

Ich habe mich in den „shopware-docker\_app\_sw6\_1“-Container per bash eingeloggt. Dort sehe ich zwar in&nbsp;/var/log/nginx zwei Logdatein. Die enthalten aber nicht den Fehler.  
Kannst du mir einen Tipp geben wo ich die Logdatei sehen bzw. den Fehler beheben kann?  
Danke.

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [3. Februar 2021 um 20:12 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/18 "2021-02-03T20:12:23Z")

</div>

Mach mal docker logs shopware-docker\_app\_sw6\_1  
Wenn du ins Admin kommst liegt das meist eig. daran dass die Domain falsch ist

---

<div class="post-metadata">

**Author:** ![bechstein\_digital](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@bechstein\_digital](https://forum.shopware.com/u/bechstein_digital)\
**Post date:** [3. Februar 2021 um 21:24 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/19 "2021-02-03T21:24:44Z")

</div>

@shyim ich habe das ganze wie folgt gelöst.

Docker + Wsl2 + Ubuntu&nbsp;

Auf Ubuntu dann die Projekte und mittels Netzlaufwerk auf das Ubuntu-Netzwerkverzeichnis greifen ich dann mit PHPStorm zu. Funktioniert wunderbar, hin und wieder kurze Verzögerungen aber in 90% der Fälle ist alles gleich da. So ist ein Sync über PHPStorm nicht nötig.

---

<div class="post-metadata">

**Author:** ![n8lauscher](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/n8lauscher/32/13325_2.png) [@n8lauscher](https://forum.shopware.com/u/n8lauscher)\
**Post date:** [5. Oktober 2021 um 20:39 UTC](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299/20 "2021-10-05T20:39:17Z")

</div>

Hallo @shyim  
Ich bin gerade dabei meine neue Laptop Dev-Umgebung aufzusetzen.  
Hat alles geklappt bis zum:

> swdc up

ich erhalte dann:

> laptop:~$ swdc up  
> unexpected character „-“ in variable name near „table-structure json-column version-noverify“  
> unexpected character „-“ in variable name near „table-structure json-column version-noverify“

wol liegt der Fehler? hast Du eine Idee?

System:  
WSL2 mit Ubuntu 20.04.3  
Einstellungen:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/4/41d40250a61ff8400844c28053b630d846e7bb80.png)  
und  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/4/4a60e6ccd398ecf4be310e0686f6c2251ed46e6d.png)  
Docker Desktop:  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/d/ddb940ac4d81ca2932e5d07462daecf870493e29.png)  
WSL:  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/8/8b7cf4681fdb19599b467c9e610d3620cde1b5d7.png)

[Nächste Seite](https://forum.shopware.com/t/shopware6-und-wsl2-einrichtung-einer-entwicklungsumgebung/69299.md?page=2)
