Before proceeding, ensure you are using Ubuntu with the following requirements:
- Primary disk: 50GB
- Secondary disk: At least 250GB (adjust as needed for your storage requirements)
Run the following script to install Docker:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.shRun the following command to list available disks:
fdisk -lExample output:
Disk /dev/sda: 50 GiB, 53687091200 bytes, 104857600 sectors
Disk /dev/sdb: 250 GiB, 268435456000 bytes, 524288000 sectors
mkfs.ext4 /dev/sdbblkidExample output:
/dev/sdb: UUID="f0fe2cb4-7dc2-4221-b2d7-43dca43a3151" BLOCK_SIZE="4096" TYPE="ext4"
Edit /etc/fstab:
nano /etc/fstabAdd the following line:
UUID=f0fe2cb4-7dc2-4221-b2d7-43dca43a3151 /srv/docker/nextcloud ext4 defaults 0 2
mkdir -p /srv/docker/nextcloud
mount -aCheck if the disk is mounted correctly:
df -hExample output:
/dev/sdb 246G 28K 233G 1% /srv/docker/nextcloud
After mounting, the lost+found directory is automatically created on ext4 filesystems. It should be removed before proceeding:
rm -rf /srv/docker/nextcloud/lost+foundIf you want to install the container manually you can continue with manual install
python3 -m venv envsource env/bin/activate # Linux/macOS
env\Scripts\activate # Windowspip install -r requirements.txtpython nextcloud-cli.pydeactivatepython nextcloud-cli.pyThis will set up the following directory structure:
/srv/docker/nextcloud/
├── docker-compose.yml
├── nextcloud.env
├── nextcloud-nginx/
│ ├── nginx.conf
│ ├── Dockerfile
├── data/
│ ├── nc_postgres/
│ ├── nc_redis/
│ ├── nc_html/
│ ├── nc_config/
│ ├── nc_custom_apps/
│ ├── nc_data/
│ ├── nginx_conf/
- Clone the repository
git clone https://github.com/netzint/nextcloud-cli.git /srv/docker/nextcloud
- Copy Configuration File
cp /srv/docker/nextcloud/nextcloud.env.example /srv/docker/nextcloud/nextcloud.env
- Modify Passwords in nextcloud.env
Edit
/srv/docker/nextcloud/nextcloud.envand change:POSTGRES_PASSWORD=YOUR_SECURE_PASSWORD NEXTCLOUD_DB_PASSWORD=YOUR_SECURE_PASSWORD REDIS_PASS=YOUR_SECURE_PASSWORD NEXTCLOUD_ADMIN_PASSWORD=YOUR_SECURE_PASSWORD - Configure Trusted Domains
Open
/srv/docker/nextcloud/nextcloud.envand setNEXTCLOUD_TRUSTED_DOMAINS:NEXTCLOUD_TRUSTED_DOMAINS=your.domain.com - Start the containers
cd /srv/docker/nextcloud docker-compose up -d
python nextcloud-cli.pyThe script will:
- Detect the currently installed Nextcloud version
- Fetch and update to the latest version
- Offer optional updates for PostgreSQL, Redis, and Nginx
- Restart Nextcloud automatically
-
Edit your environment file
nano nextcloud.env
-
Add OnlyOffice configuration
# OnlyOffice Document Server Configuration ONLYOFFICE_SERVER_URL=https://office.your-domain.com ONLYOFFICE_JWT_SECRET=YourJWTSecretHere
./onlyoffice_connect.sh./setup_onlyoffice_cron.shChoose your preferred monitoring frequency:
- Every minute - For production systems with frequent connection issues
- Every 2 minutes - Recommended for critical systems
- Every 5 minutes - Recommended for normal usage
- Every 15 minutes - For stable systems
tail -f logs/onlyoffice_cron.logDas Talk High Performance Backend (HPB) verbessert die Video-/Audio-Qualität bei Gruppen-Calls erheblich. Es ist optional und kann jederzeit nachinstalliert werden.
- Port 3478 TCP+UDP muss in der Firewall offen sein
- Bei NAT: Port-Forwarding für 3478 erforderlich
- Nextcloud muss bereits laufen
# 1. Repository klonen
git clone https://github.com/netzint/nextcloud-cli.git /srv/docker/nextcloud
cd /srv/docker/nextcloud
# 2. Basis-Konfiguration
cp nextcloud.env.example nextcloud.env
nano nextcloud.env # Passwörter und Domain anpassen
# 3. Talk HPB konfigurieren
./configure_talk_hpb.sh --generate-secrets --update-nginx
# 4. Alle Container starten (Nextcloud + HPB)
docker compose -f docker-compose.yml -f docker-compose.talk-hpb.yml up -dcd /srv/docker/nextcloud
# 1. Talk HPB konfigurieren (generiert Secrets, aktualisiert nginx.conf)
./configure_talk_hpb.sh --generate-secrets --update-nginx
# 2. HPB-Container starten
docker compose -f docker-compose.yml -f docker-compose.talk-hpb.yml up -d
# 3. Nginx neu laden (wichtig!)
docker compose restart nextcloud-nginxDie Konfiguration liegt in talk-hpb.env:
# Domain (muss mit NEXTCLOUD_TRUSTED_DOMAINS übereinstimmen)
NC_DOMAIN=cloud.example.com
# Timezone
TZ=Europe/Berlin
# Secrets (automatisch generiert)
TURN_SECRET=...
SIGNALING_SECRET=...
INTERNAL_SECRET=...# Container-Status
docker compose -f docker-compose.yml -f docker-compose.talk-hpb.yml ps
# HPB Logs
docker logs nextcloud-talk-hpb
# Nextcloud Talk-Einstellungen prüfen
docker exec --user www-data nextcloud-fpm /var/www/html/occ talk:signaling:listFür Call-Aufnahmen kann das Recording-Backend aktiviert werden:
# Mit Recording starten
docker compose -f docker-compose.yml -f docker-compose.talk-hpb.yml --profile recording up -d
# Recording in Nextcloud konfigurieren
./configure_talk_hpb.sh --with-recording# Nur Basis-Nextcloud starten (ohne HPB)
docker compose up -d
# HPB-Container stoppen
docker stop nextcloud-talk-hpb