# CDN Setup

**URL:** https://forum.shopware.com/t/cdn-setup/68725
**Category:** Programmierung
**Created:** [2. August 2020 um 17:39 UTC](https://forum.shopware.com/t/cdn-setup/68725 "2020-08-02T17:39:01Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Misengo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/misengo/32/21446_2.png) [@Misengo](https://forum.shopware.com/u/Misengo)
#### Post date: [2. August 2020 um 17:39 UTC](https://forum.shopware.com/t/cdn-setup/68725/1 "2020-08-02T17:39:01Z")

</div>

Hi&nbsp;zusammen,

gibt es eine ähnliche Config für SW6 wie unten?

&nbsp;

```
'cdn' => [
        'backend' => 'local',
        'adapters' => [
            'local' => [
                'type' => 'local',
                'mediaUrl' => 'https://cdn.blabla.de/'

            ]
        ]
    ],

```

Wir nutzen kein externes Filesystem wie S3, da unser Hoster von Haus aus eine Cloudflare Lösung auf der Harddisk anbietet und wir möchten daher nur eine Medienabfrage (GETs) auf das CDN leiten.

&nbsp;

&nbsp;

---

<div class="post-metadata">

### Author: ![b3nnu3](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@b3nnu3](https://forum.shopware.com/u/b3nnu3)
#### Post date: [1. Oktober 2020 um 10:38 UTC](https://forum.shopware.com/t/cdn-setup/68725/2 "2020-10-01T10:38:18Z")

</div>

Moin Misengo,

Hab das hier gedunden. Funktioniert 😃

In folgende Datei dies eintragen: config/packages/shopware.yml bzw config/packages/{ENV}/shopware.yml

```
shopware:
    cdn:
        url: "https://URL-DES_LIVESYSTEMS.MAGIC"

```

&nbsp;

---

<div class="post-metadata">

### Author: ![vismagine](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/vismagine/32/24302_2.png) [@vismagine](https://forum.shopware.com/u/vismagine)
#### Post date: [5. April 2023 um 10:39 UTC](https://forum.shopware.com/t/cdn-setup/68725/3 "2023-04-05T10:39:19Z")

</div>

Hallo Misengo,  
wie hast Du das letztlich gelöst? Gibt es ein Plugin?  
Danke für Feedback im Voraus.  
Gruß,  
Christian

---

<div class="post-metadata">

### Author: ![AlexGalax](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/alexgalax/32/9925_2.png) [@AlexGalax](https://forum.shopware.com/u/AlexGalax)
#### Post date: [5. April 2023 um 11:25 UTC](https://forum.shopware.com/t/cdn-setup/68725/4 "2023-04-05T11:25:35Z")

</div>

Hier wird alles erklärt:

> **[Filesystem](https://developer.shopware.com/docs/guides/hosting/infrastructure/filesystem)**

---

<div class="post-metadata">

### Author: ![markus.laspeyres](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/markus.laspeyres/32/19541_2.png) [@markus.laspeyres](https://forum.shopware.com/u/markus.laspeyres)
#### Post date: [10. Mai 2023 um 07:15 UTC](https://forum.shopware.com/t/cdn-setup/68725/5 "2023-05-10T07:15:24Z")

</div>

Ja, damit werden alle Bilder in ein CDN geladen. Wir konfiguriert man die shopware.yaml Datei für keycdn z. Bsp. Weiß das jemand von euch? Ich habe mir die Doku von Flysystems durchgelesen, werde aber nicht schlau drauß…  
Ziel wäre es für mich die CSS Dateien über das CDN zu liefern.  
Grüße,  
Markus

---

<div class="post-metadata">

### Author: ![AlexGalax](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/alexgalax/32/9925_2.png) [@AlexGalax](https://forum.shopware.com/u/AlexGalax)
#### Post date: [10. Mai 2023 um 07:34 UTC](https://forum.shopware.com/t/cdn-setup/68725/6 "2023-05-10T07:34:17Z")

</div>

Das steht doch auch in der Shopware-Doku. Du kannst für die verschiedenen Bereiche einen eigenen Adapter angeben:

```yaml
shopware:
  filesystem:
    public:
      url: "{url-to-your-public-files}"
      # The Adapter Configuration
    private:
      visibility: "private"
      # The Adapter Configuration
    theme:
      url: "{url-to-your-theme-files}"
      # The Adapter Configuration
    asset:
      url: "{url-to-your-asset-files}"
      # The Adapter Configuration
    sitemap:
      url: "{url-to-your-sitemap-files}"
      # The Adapter Configuration

```

Wenn du Theme-Dateien (css, js etc) über ein CDN ausliefern willst, musst du den Bereich `theme` und ggf. `asset` mit dem entsprechenden Adapter konfigurieren.

---

<div class="post-metadata">

### Author: ![markus.laspeyres](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/markus.laspeyres/32/19541_2.png) [@markus.laspeyres](https://forum.shopware.com/u/markus.laspeyres)
#### Post date: [10. Mai 2023 um 07:55 UTC](https://forum.shopware.com/t/cdn-setup/68725/7 "2023-05-10T07:55:44Z")

</div>

KeyCdn ist ja nicht enthalten, also muss ich wohl einen eigenen Adapter anlegen. Wo sehe ich in der Doku, wo die entsprechende Datei ins Dateisystem muss? Unter verndor/League nicht, oder doch? Bleibt mein Adapter bei einem Update erhalten?

---

<div class="post-metadata">

### Author: ![AlexGalax](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/alexgalax/32/9925_2.png) [@AlexGalax](https://forum.shopware.com/u/AlexGalax)
#### Post date: [10. Mai 2023 um 08:16 UTC](https://forum.shopware.com/t/cdn-setup/68725/8 "2023-05-10T08:16:35Z")

</div>

Ich habe KeyCDN mal kurz überflogen. Das ist ja auch kein Filesystem sondern nur nur ein Caching-Dienst (für Dateien unter 100MB).

D.h. du muss nur die URL anpassen, wie in deren Doku beschrieben:

> **[Custom CDN Integration - KeyCDN Support](https://www.keycdn.com/support/cdn-integration)**
>
> This article focuses on how to integrate KeyCDN into your website and provide you with a better understanding of how to make use of the CDN.

---

<div class="post-metadata">

### Author: ![markus.laspeyres](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/markus.laspeyres/32/19541_2.png) [@markus.laspeyres](https://forum.shopware.com/u/markus.laspeyres)
#### Post date: [10. Mai 2023 um 08:19 UTC](https://forum.shopware.com/t/cdn-setup/68725/9 "2023-05-10T08:19:09Z")

</div>

Danke erst einmal für deine Hilfe!  
Ups verstehe. Heißt keycdn ist nur ein CDN und alles was ich machen kann ist

```auto
shopware:
    admin_worker:
        enable_admin_worker: false
    cdn:
        url: "https://cdn.xyz.de"

```

Das funktioniert auch wunderbar und die Bilder werden aus dem CDN geladen. Dann schaue ich mir erst einmal ein FileFlySystem an 😉

---

<div class="post-metadata">

### Author: ![markus.laspeyres](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/markus.laspeyres/32/19541_2.png) [@markus.laspeyres](https://forum.shopware.com/u/markus.laspeyres)
#### Post date: [25. Oktober 2023 um 00:35 UTC](https://forum.shopware.com/t/cdn-setup/68725/10 "2023-10-25T00:35:07Z")

</div>

Hallo zusammen, nach Update auf 6.5.6 funktioniert die Konfiguration nicht mehr. Ich habe shopware.yaml in z-shopware.yaml umbenannt. Zwar greift die redis Konfiguration, aber die Bilder werden nicht vom CDN geladen. Hat jemand ähnliches Problem, bestenfalls eine Idee zur Lösung des Problems?

---

<div class="post-metadata">

### Author: ![Misengo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/misengo/32/21446_2.png) [@Misengo](https://forum.shopware.com/u/Misengo)
#### Post date: [25. Oktober 2023 um 06:59 UTC](https://forum.shopware.com/t/cdn-setup/68725/11 "2023-10-25T06:59:40Z")

</div>

@markus.laspeyres , die neue config muss wie folgt aussehen:

shopware:  
filesystem:  
public:  
type: „local“  
config:  
root: „%kernel.project\_dir%/public“  
url: CDN\_URL

Für mehr Infos schau mal in Slack

> **[Slack is your productivity platform](https://shopwarecommunity.slack.com/?redir=%2Farchives%2FC01JH7CGT7V%2Fp1696843106870199%3Fname%3DC01JH7CGT7V%26perma%3D1696843106870199)**
>
> Slack is a new way to communicate with your team. It’s faster, better organised and more secure than email.
