Verbeter README met uitgebreide documentatie
This commit is contained in:
205
README.md
205
README.md
@@ -1,53 +1,188 @@
|
||||
# Nextcloud-Infra
|
||||
|
||||
[](https://www.ansible.com/)
|
||||
[](https://nextcloud.com/)
|
||||
|
||||
Verzameling Ansible playbooks voor geautomatiseerde deployment van Nextcloud en gerelateerde services op Debian/Ubuntu-servers.
|
||||
|
||||
# 🚀 Nextcloud Ansible Playbook
|
||||
## Overzicht
|
||||
|
||||
Automated deployment of **Nextcloud** with **Apache**, **MariaDB**, **PHP**, **Redis**, and **Let's Encrypt** on a Debian/Ubuntu server.
|
||||
Dit project biedt productie-ready Ansible playbooks voor het installeren en configureren van een complete Nextcloud-omgeving, inclusief:
|
||||
|
||||
---
|
||||
| Playbook | Beschrijving |
|
||||
|----------|--------------|
|
||||
| `install_nextcloud.yml` | Volledige Nextcloud-installatie met Apache, MariaDB, PHP 8.3, Redis en Let's Encrypt |
|
||||
| `install_nextcloud_aio.yml` | Nextcloud All-In-One met Docker en Nginx reverse proxy |
|
||||
| `Install_HPB_Nextcloud.yml` | High Performance Backend met Signaling Server, Janus, NATS en TURN (Coturn) voor Nextcloud Talk |
|
||||
| `install_collabora.yml` | Collabora Online voor documenten bewerken in de browser |
|
||||
| `install_whiteboard.yml` | Whiteboard-server voor real-time samenwerking |
|
||||
| `install_context_chat.yml` | Context Chat Backend voor AI-gebaseerde chat |
|
||||
| `Install_recording.yml` | Nextcloud Talk Recording Server |
|
||||
| `install_xwiki.yml` | XWiki wiki-platform met MariaDB en Apache |
|
||||
| `install_docker.yml` | Standalone Docker-installatie |
|
||||
| `plugin-os.yml` | OS-configuratie voor verschillende cloud-omgevingen |
|
||||
|
||||
## 📦 Features
|
||||
## Architectuur
|
||||
|
||||
- Automatic local host detection and grouping
|
||||
- Full Nextcloud installation with:
|
||||
- Apache web server
|
||||
- MariaDB database
|
||||
- PHP + required extensions
|
||||
- Redis and APCu caching
|
||||
- HTTPS via Let's Encrypt
|
||||
- Secure PHP and Apache configuration
|
||||
- Database and admin user provisioning
|
||||
- Cron jobs for background tasks and maintenance
|
||||
- Trusted domain and regional settings
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ Nextcloud Server │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Apache2 │ PHP 8.3 │ MariaDB │ Redis │ Let's Encrypt │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
│
|
||||
┌─────────────────────┼─────────────────────┐
|
||||
│ │ │
|
||||
▼ ▼ ▼
|
||||
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
|
||||
│ Collabora │ │ HPB Stack │ │ Whiteboard │
|
||||
│ (Docker) │ │ Janus/NATS/ │ │ (Node.js) │
|
||||
│ │ │ Signaling │ │ │
|
||||
└───────────────┘ └───────────────┘ └───────────────┘
|
||||
```
|
||||
|
||||
---
|
||||
## Vereisten
|
||||
|
||||
## 🛠️ Requirements
|
||||
- **Server**: Debian 11/12 of Ubuntu 20.04+ (aanbevolen: Ubuntu 22.04 LTS)
|
||||
- **Lokaal**: Python 3 en Ansible geïnstalleerd
|
||||
- **Toegang**: SSH met sudo-rechten op de doelserver
|
||||
- **DNS**: A-record(s) geconfigureerd naar server IP
|
||||
|
||||
- A Debian/Ubuntu server (tested on 20.04+)
|
||||
- Python 3 and Ansible installed locally
|
||||
- SSH access and sudo privileges
|
||||
- DNS A-record pointing to your server IP
|
||||
- **A `hosts` file with required variables** (see below)
|
||||
## Quickstart
|
||||
|
||||
---
|
||||
### 1. Clone de repository
|
||||
|
||||
## 📁 Inventory Setup (`hosts` file)
|
||||
```bash
|
||||
git clone https://gitea.rikdekker.nl/rik/surf.git
|
||||
cd surf
|
||||
```
|
||||
|
||||
Create a file named `hosts` with:
|
||||
### 2. Maak een hosts-bestand
|
||||
|
||||
Maak een `hosts` bestand met je serverconfiguratie:
|
||||
|
||||
```ini
|
||||
[nextcloud]
|
||||
jouw-server.nl
|
||||
|
||||
[all:vars]
|
||||
ansible_user=your-ssh-username
|
||||
db_admin_user=nextcloud_db_admin
|
||||
db_admin_password=secure_admin_password
|
||||
nextcloud_db=nextcloud
|
||||
nextcloud_db_user=nextcloud_user
|
||||
nextcloud_db_password=secure_password
|
||||
nextcloud_admin_user=admin
|
||||
nextcloud_admin_password=admin_password
|
||||
nextcloud_domain=cloud.example.com
|
||||
[nextcloud:vars]
|
||||
ansible_user=root
|
||||
domain=cloud.jouwdomein.nl
|
||||
admin_user=admin
|
||||
admin_pass=VeiligWachtwoord123!
|
||||
db_name=nextcloud
|
||||
db_user=nextcloud
|
||||
db_pass=DatabaseWachtwoord123!
|
||||
email=admin@jouwdomein.nl
|
||||
```
|
||||
|
||||
### 3. Voer een playbook uit
|
||||
|
||||
```bash
|
||||
# Basis Nextcloud-installatie
|
||||
ansible-playbook -i hosts install_nextcloud.yml
|
||||
|
||||
# Of Nextcloud All-In-One (Docker-gebaseerd)
|
||||
ansible-playbook -i hosts install_nextcloud_aio.yml
|
||||
```
|
||||
|
||||
## Playbook Details
|
||||
|
||||
### Nextcloud Basis (`install_nextcloud.yml`)
|
||||
|
||||
Installeert een complete Nextcloud-stack:
|
||||
|
||||
- **Webserver**: Apache2 met mod_rewrite en mod_headers
|
||||
- **Database**: MariaDB met geoptimaliseerde instellingen
|
||||
- **PHP**: PHP 8.3 met alle vereiste extensies
|
||||
- **Caching**: Redis + APCu voor optimale prestaties
|
||||
- **SSL**: Automatische Let's Encrypt certificaten
|
||||
- **Onderhoud**: Cronjobs voor achtergrondtaken en database-onderhoud
|
||||
|
||||
### High Performance Backend (`Install_HPB_Nextcloud.yml`)
|
||||
|
||||
Voor Nextcloud Talk met video/audio-conferencing:
|
||||
|
||||
- **Go 1.23.0**: Voor de signaling server
|
||||
- **NATS**: Message broker voor real-time communicatie
|
||||
- **Janus**: WebRTC media server
|
||||
- **Coturn**: TURN-server voor NAT traversal
|
||||
- **Signaling Server**: Nextcloud Talk backend (v2.0.3)
|
||||
|
||||
### Collabora Online (`install_collabora.yml`)
|
||||
|
||||
Browser-gebaseerd kantoorpakket:
|
||||
|
||||
- Docker-container met Collabora CODE
|
||||
- Nginx reverse proxy
|
||||
- Automatische SSL-certificaten
|
||||
|
||||
### Recording Server (`Install_recording.yml`)
|
||||
|
||||
Voor het opnemen van Nextcloud Talk-gesprekken:
|
||||
|
||||
- Firefox + Geckodriver voor browser-automatisering
|
||||
- FFmpeg voor video/audio-encoding (1920x1080)
|
||||
- Python virtual environment
|
||||
|
||||
## Configuratie Variabelen
|
||||
|
||||
| Variabele | Beschrijving | Voorbeeld |
|
||||
|-----------|--------------|-----------|
|
||||
| `domain` | Primair domein voor Nextcloud | `cloud.example.nl` |
|
||||
| `admin_user` | Admin gebruikersnaam | `admin` |
|
||||
| `admin_pass` | Admin wachtwoord | `SecurePass123!` |
|
||||
| `db_name` | Database naam | `nextcloud` |
|
||||
| `db_user` | Database gebruiker | `nextcloud` |
|
||||
| `db_pass` | Database wachtwoord | `DbPass123!` |
|
||||
| `email` | E-mail voor Let's Encrypt | `admin@example.nl` |
|
||||
| `collabora_domain` | Domein voor Collabora | `office.example.nl` |
|
||||
| `signaling_domain` | Domein voor HPB | `signaling.example.nl` |
|
||||
| `turn_secret` | TURN server secret | `(wordt gegenereerd)` |
|
||||
|
||||
## Beveiliging
|
||||
|
||||
De playbooks implementeren beveiligingsmaatregelen:
|
||||
|
||||
- HTTPS met HSTS-headers
|
||||
- Veilige PHP-configuratie
|
||||
- Firewall-vriendelijke opzet
|
||||
- Automatisch gegenereerde secrets en API-sleutels
|
||||
- Database met beperkte rechten
|
||||
|
||||
## Onderhoud
|
||||
|
||||
Na installatie worden automatisch cronjobs ingesteld voor:
|
||||
|
||||
- Nextcloud achtergrondtaken (elke 5 minuten)
|
||||
- Database-onderhoud
|
||||
- Logrotatie
|
||||
- Mimetype-reparatie
|
||||
|
||||
## Bestandsstructuur
|
||||
|
||||
```
|
||||
surf/
|
||||
├── install_nextcloud.yml # Basis Nextcloud
|
||||
├── install_nextcloud_aio.yml # Nextcloud AIO (Docker)
|
||||
├── Install_HPB_Nextcloud.yml # High Performance Backend
|
||||
├── install_collabora.yml # Collabora Online
|
||||
├── install_whiteboard.yml # Whiteboard Server
|
||||
├── install_context_chat.yml # AI Context Chat
|
||||
├── Install_recording.yml # Talk Recording
|
||||
├── install_xwiki.yml # XWiki Platform
|
||||
├── install_docker.yml # Docker installatie
|
||||
├── plugin-os.yml # OS configuratie
|
||||
├── NextcloudAIO.values.yaml # AIO configuratie
|
||||
├── NextcloudAIO_docker.yml # AIO Docker Compose
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## Bijdragen
|
||||
|
||||
Bijdragen zijn welkom! Open een issue of pull request op [Gitea](https://gitea.rikdekker.nl/rik/surf).
|
||||
|
||||
---
|
||||
|
||||
**Auteur**: Rik Dekker
|
||||
**Repository**: [gitea.rikdekker.nl/rik/surf](https://gitea.rikdekker.nl/rik/surf)
|
||||
|
||||
Reference in New Issue
Block a user