Nextcloud

🇬🇧 English | 🇩🇪 Deutsch


🇬🇧 English

Nextcloud Installation on Ubuntu

This guide shows you how to install Nextcloud on Ubuntu with Apache2 and MariaDB. Nextcloud is the foundation>

Prerequisites

sudo apt update && sudo apt install -y php-common php8.3 php-apcu php-pear php-imagick libapache2-mod-php8.3 >

Apache2 Configuration

sudo nano /etc/apache2/sites-available/nextcloud.conf
<VirtualHost *:80>
  DocumentRoot /var/www/nextcloud/
  ServerName  cal.example.com

  <Directory /var/www/nextcloud/>
    Require all granted
    AllowOverride All
    Options FollowSymLinks MultiViews

    <IfModule mod_dav.c>
      Dav off
    </IfModule>
  </Directory>
</VirtualHost>

Enable the configuration:

sudo a2ensite nextcloud.conf
sudo systemctl reload apache2

Enable required modules:

sudo a2enmod rewrite headers env dir mime
sudo systemctl restart apache2

1. MariaDB Installation

sudo apt install -y mariadb-server
sudo systemctl enable mariadb
sudo systemctl start mariadb

Secure the installation:

sudo mysql_secure_installation

Follow the prompts – accept the defaults, but answer Y to:

  • Remove anonymous users
  • Remove test database
  • Reload privilege tables

Create database and user:

sudo mariadb

CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

CREATE USER nextcloud@localhost identified by 'your-secure-password';

GRANT ALL PRIVILEGES on nextcloud.* to nextcloud@localhost;

FLUSH privileges;

quit;

2. Nextcloud Installation

cd /var/www
sudo wget https://download.nextcloud.com/server/releases/latest.tar.bz2
sudo tar -xjvf latest.tar.bz2
sudo rm latest.tar.bz2
sudo chown -R www-data:www-data /var/www/nextcloud

Apache Configuration Fix

If you run OpenClaw behind the same Apache, you need to adjust the main domain config:

sudo nano /etc/apache2/sites-available/yourdomain-ssl.conf

Add this fix:

# Increase timeouts (important for AI responses)
ProxyTimeout 60

# Forward headers
RequestHeader set X-Forwarded-Proto "https"

# Restrict ProxyPreserveHost to OpenClaw API endpoints only
<Location /v1>
    ProxyPreserveHost On
</Location>
<Location /agent-editor>
    ProxyPreserveHost On
</Location>

Without this fix, you may see:

  • 503 Service Unavailable
  • “The server is temporarily unable to service your request…”

Browser Setup

Navigate to https://cal.yourdomain.com and complete the setup:

  • Username: your-username
  • Password: your-password
  • Data directory: default is fine
  • Database user: nextcloud
  • Database password: (the password you set above)
  • Database name: nextcloud
  • Server: localhost

Recommended Apps

  • Calendar – Schedule work and meetings, synced across all devices
  • Contacts – Store contacts in one place
  • Mail – Email app with good integration
  • Nextcloud Office – Collaborative documents based on Collabora Online
  • Notes – Distraction-free note-taking
  • Talk – Chat, video calls, screen sharing, web conferences

OpenClaw Integration: openclaw-nextcloud Skill

Why a Separate Subdomain?

Nextcloud runs on its own subdomain (e.g., cal.example.com). Benefits:

  • Separation from main website
  • Easier SSL configuration
  • Clear responsibility per service
  • Recommendation: Always run Nextcloud on its own subdomain

The openclaw-nextcloud Skill

The openclaw-nextcloud skill enables OpenClaw agents to manage:

  • 📅 Appointments (Calendar)
  • ✅ Tasks (Tasks/Todos)
  • 📝 Notes
  • 📄 Files
  • 👤 Contacts

Advantages:

  • No additional tools needed (only Node.js 20+)
  • Direct Nextcloud API instead of CalDAV
  • Token can be scoped to specific apps

Installation

openclaw skills install openclaw-nextcloud

Configuration

1. Create App Password in Nextcloud:

  • Log in to Nextcloud
  • Go to Settings → Security
  • Generate a new app password
  • Important: Token can be scoped to specific apps (e.g., only Calendar)

2. Add to ~/.env:

NEXTCLOUD_URL=https://cal.yourdomain.com
NEXTCLOUD_USER=your-username
NEXTCLOUD_TOKEN=your-app-password

3. Restart Gateway:

openclaw gateway restart

Use Case: Appointment Booking

The agent can:

  • List appointments (calendar list)
  • Create appointments (calendar create)
  • Edit appointments (calendar edit)
  • Delete appointments (calendar delete)

Example Workflow:

  1. User: “I’d like to book an appointment next week”
  2. Agent: Asks for date, time, title
  3. Agent: Creates appointment in Nextcloud

Commands:

# List calendars
node scripts/nextcloud.js calendars list --type events

# List appointments (next 7 days)
node scripts/nextcloud.js calendar list

# Create appointment
node scripts/nextcloud.js calendar create \
  --summary "Meeting" \
  --start 2026-06-05T14:00:00 \
  --end 2026-06-05T15:00:00 \
  --calendar "DigitalCompass"

# Delete appointment
node scripts/nextcloud.js calendar delete --uid <UID>

Security Notes

  • Use app password instead of main password
  • Token can be revoked anytime in Nextcloud
  • Credential has full account access
  • Always get confirmation before destructive operations!
  • Protect local credentials and cache files

Known Limitations

  • No recurring events support (limited support for recurring appointments)
  • Interactive editing requires TTY
  • Calendar-only token works (tested with iOS app)

🇩🇪 Deutsch

Nextcloud auf Ubuntu installieren

Diese Anleitung zeigt dir, wie du Nextcloud auf Ubuntu mit Apache2 und MariaDB installierst. Nextcloud ist di>

Voraussetzungen

sudo apt update && sudo apt install -y php-common php8.3 php-apcu php-pear php-imagick libapache2-mod-php8.3 >

Apache2-Konfiguration

sudo nano /etc/apache2/sites-available/nextcloud.conf
<VirtualHost *:80>
  DocumentRoot /var/www/nextcloud/
  ServerName  cal.beispiel.de

  <Directory /var/www/nextcloud/>
    Require all granted
    AllowOverride All
    Options FollowSymLinks MultiViews

    <IfModule mod_dav.c>
      Dav off
    </IfModule>
  </Directory>
</VirtualHost>

Konfiguration aktivieren:

sudo a2ensite nextcloud.conf
sudo systemctl reload apache2

Erforderliche Module aktivieren:

sudo a2enmod rewrite headers env dir mime
sudo systemctl restart apache2

1. MariaDB-Installation

sudo apt install -y mariadb-server
sudo systemctl enable mariadb
sudo systemctl start mariadb

Installation absichern:

sudo mysql_secure_installation

Den Anweisungen folgen – Standardwerte akzeptieren, aber Y bei:

  • Anonyme Benutzer entfernen
  • Test-Datenbank entfernen
  • Berechtigungstabellen neu laden

Datenbank und Benutzer erstellen:

sudo mariadb

CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

CREATE USER nextcloud@localhost identified by 'dein-sicheres-passwort';

GRANT ALL PRIVILEGES on nextcloud.* to nextcloud@localhost;

FLUSH privileges;

quit;

2. Nextcloud installieren

cd /var/www
sudo wget https://download.nextcloud.com/server/releases/latest.tar.bz2
sudo tar -xjvf latest.tar.bz2
sudo rm latest.tar.bz2
sudo chown -R www-data:www-data /var/www/nextcloud

Apache-Konfiguration anpassen

Wenn OpenClaw auf dem gleichen Apache läuft, musst du die Hauptdomain-Konfiguration anpassen:

sudo nano /etc/apache2/sites-available/deinedomain-ssl.conf

Diesen Fix hinzufügen:

# Timeouts erhöhen (wichtig für KI-Antworten)
ProxyTimeout 60

# Header weiterleiten
RequestHeader set X-Forwarded-Proto "https"

# ProxyPreserveHost nur auf OpenClaw API-Endpunkte beschränken
<Location /v1>
    ProxyPreserveHost On
</Location>
<Location /agent-editor>
    ProxyPreserveHost On
</Location>

Ohne diesen Fix siehst du möglicherweise:

  • 503 Service Unavailable
  • „The server is temporarily unable to service your request…”

Browser-Setup

Navigiere zu https://cal.deinedomain.com und richte Nextcloud ein:

  • Benutzername: dein-benutzername
  • Passwort: dein-passwort
  • Datenverzeichnis: Standard ist ok
  • Datenbank-Benutzer: nextcloud
  • Datenbank-Passwort: (das Passwort von oben)
  • Datenbankname: nextcloud
  • Server: localhost

Empfohlene Apps

  • Calendar – Arbeit und Besprechungen planen, synchronisiert auf allen Geräten
  • Contacts – Kontakte zentral speichern
  • Mail – E-Mail-App mit guter Integration
  • Nextcloud Office – Gemeinsame Dokumente, basierend auf Collabora Online
  • Notes – Ablenkungsfreie Notizen
  • Talk – Chat, Videoanrufe, Bildschirm teilen, Webkonferenzen

OpenClaw-Integration: openclaw-nextcloud Skill

Warum eine eigene Subdomain?

Nextcloud wird auf einer eigenen Subdomain betrieben (z.B. cal.beispiel.de). Vorteile:

  • Trennung vom Hauptangebot
  • Einfachere SSL-Konfiguration
  • Klare Zuständigkeit pro Dienst
  • Empfehlung: Nextcloud IMMER auf eigener Subdomain betreiben

Der openclaw-nextcloud Skill

Der Skill openclaw-nextcloud ermöglicht OpenClaw-Agenten die Verwaltung von:

  • 📅 Terminen (Calendar)
  • ✅ Aufgaben (Tasks/Todos)
  • 📝 Notizen
  • 📄 Dateien
  • 👤 Kontakten

Vorteile:

  • Keine zusätzlichen Tools nötig (nur Node.js 20+)
  • Direkte Nextcloud API statt CalDAV
  • Token kann auf spezifische Apps gescoped werden

Installation

openclaw skills install openclaw-nextcloud

Konfiguration

1. App-Passwort in Nextcloud erstellen:

  • Bei Nextcloud anmelden
  • Einstellungen → Sicherheit
  • Neues App-Passwort generieren
  • Wichtig: Token kann auf spezifische Apps beschränkt werden (z.B. nur Kalender)

2. In ~/.env eintragen:

NEXTCLOUD_URL=https://cal.beispiel.de
NEXTCLOUD_USER=dein-benutzername
NEXTCLOUD_TOKEN=dein-app-passwort

3. Gateway neustarten:

openclaw gateway restart

Use Case: Terminbuchung

Der Agent kann:

  • Termine auflisten (calendar list)
  • Termine erstellen (calendar create)
  • Termine ändern (calendar edit)
  • Termine löschen (calendar delete)

Beispiel-Workflow:

  1. Nutzer: „Ich möchte nächste Woche einen Termin”
  2. Agent: Fragt nach Datum, Uhrzeit, Titel
  3. Agent: Erstellt Termin in Nextcloud

Befehle:

# Kalender auflisten
node scripts/nextcloud.js calendars list --type events

# Termine auflisten (nächste 7 Tage)
node scripts/nextcloud.js calendar list

# Termin erstellen
node scripts/nextcloud.js calendar create \
  --summary "Besprechung" \
  --start 2026-06-05T14:00:00 \
  --end 2026-06-05T15:00:00 \
  --calendar "DigitalCompass"

# Termin löschen
node scripts/nextcloud.js calendar delete --uid <UID>

Sicherheitshinweise

  • App-Passwort statt Hauptpasswort verwenden
  • Token kann in Nextcloud jederzeit widerrufen werden
  • Credential hat Full-Account-Zugriff
  • Vor destruktiven Operationen immer Bestätigung einholen!
  • Lokale Credentials und Cache-Dateien schützen

Bekannte Einschränkungen

  • Keine wiederholenden Termine (eingeschränkt)
  • Interaktives Editieren erfordert TTY
  • Calendar-only Token funktioniert (getestet mit iOS App)