# Nextcloud config.php anpassen fuer trusted domains und SSL

Falls Nextcloud ueber TrueNAS installiert wurde, muss ueber die TrueNAS Oberflaeche auf den Container zugegriffen werden.

### 1) TrueNAS &gt; App &gt; Installed Apps &gt; drei Punkte Menu bei Nextcloud &gt; Shell

[![image.png](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/scaled-1680-/4Ecimage.png)](https://wiki.folkerts.it/uploads/images/gallery/2023-02/4Ecimage.png)

### 2) nicht die postgresql db container auswaehlen, sondern den nextcloud container:

### [![image.png](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/scaled-1680-/urBimage.png)](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/urBimage.png)

### 3) Evtl kommt folgende Fehlermeldung (falls nicht, bei Schritt 4 weitermachen):

[![image.png](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/scaled-1680-/GVSimage.png)](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/GVSimage.png)

 Um das zu beheben, muss man in die Shell des TrueNAS Nodes. Dafuer auf

TrueNAS &gt; System Settings &gt; Shell:

<p class="callout info">bei der Shell Anmeldung einfach den Admin Account der TrueNAS WebUI verwenden</p>

[![image.png](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/scaled-1680-/3Akimage.png)](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/3Akimage.png)

und Kommando eingeben:

```bash
chmod a+r /etc/rancher/k3s/k3s.yaml  
```

[![image.png](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/scaled-1680-/GMZimage.png)](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/GMZimage.png)

### 4) zurueck in der Nextcloud Pod Shell mit nano die config/config.php bearbeiten:

```bash
apt update && apt install nano && nano config/config.php
```

<p class="callout warning">der Befehl muss nach jedem Nextcloud Neustart erneut eingegeben werden, da der Container den Zustand ohne installiertem nano wiederherstellt. Die config.php hingegen befindet sich in einem Volume und wird dauerhaft gespeichert.</p>

vorher:

[![image.png](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/scaled-1680-/Zloimage.png)](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/Zloimage.png)

<p class="callout info">danach  
trusted\_domain hinzufuegen  
overwrite.cli.url anpassen  
overwriteprotocol hinzufuegen (optional!)</p>

nachher

<p class="callout warning">KOMMATA NICHT VERGESSEN</p>

[![image.png](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/scaled-1680-/0xUimage.png)](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/0xUimage.png)

### 5) Nextcloud neustarten (Stop und Start)

[![image.png](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/scaled-1680-/V6Zimage.png)](https://bookstack.eike-f.de/uploads/images/gallery/2023-02/V6Zimage.png)

<div data-darkreader-inline-bgcolor="" data-darkreader-inline-bgimage="" id="bkmrk--7" style="background: none; line-height: 0px; overflow: hidden; padding: 10px 5px; position: absolute; z-index: 2147483647; visibility: visible; opacity: 1; --darkreader-inline-bgimage: none; --darkreader-inline-bgcolor: initial; cursor: pointer; pointer-events: none; top: 504px; left: 1097px; width: auto; height: auto; display: none;"></div>