Sign inSign up

zuzupebbles/nextcloud-custom

By zuzupebbles

•Updated 1 day ago

Nextcloud v35.0.2 with ffmpeg + ImageMagick extras for previews/transcoding

Image
Content management system
0

1.9K

zuzupebbles/nextcloud-custom repository overview

⁠Nextcloud + FFmpeg (Apache)

A thin, drop-in wrapper on the official Nextcloud⁠ Apache image that adds FFmpeg — so Nextcloud's preview generator and apps that shell out to ffmpeg (preview_generator, memories, recognize, …) work out of the box. Nothing else is changed.

Base imagenextcloud:35.0.2-apache⁠ (official Docker library)
Delta vs upstreama single apt install ffmpeg — no config changes, no extra PHP extensions
VariantApache (mod_php) — the default upstream variant
Drop-in fornextcloud:35.0.2-apache (same ports, volumes, env vars, entrypoint)
Recommended pin:v0.4.0-nc35.0.2
Also onForgejo git.quantweave.ca/quantweave-intelligence/qwi-nextcloud

Contents: Quick start⁠ · Why this image⁠ · What's added⁠ · Configuration⁠ · Tags⁠ · Upgrading⁠ · Source⁠


⁠Quick start

You need: a Linux host with Docker + the Compose plugin, an external PostgreSQL (recommended) or MySQL/MariaDB, and ideally external Redis. A TLS-terminating reverse proxy in front is strongly recommended.

Minimal docker-compose.yml (Postgres + Redis + Nextcloud):

services:
  db:
    image: postgres:16-alpine
    restart: unless-stopped
    environment:
      POSTGRES_DB: nextcloud
      POSTGRES_USER: nextcloud
      POSTGRES_PASSWORD: change-me
    volumes:
      - ./data/db:/var/lib/postgresql/data

  redis:
    image: redis:7-alpine
    restart: unless-stopped
    command: ["redis-server", "--save", "", "--appendonly", "no"]

  app:
    image: zuzupebbles/nextcloud-custom:v0.4.0-nc35.0.2   # pin both axes in production
    restart: unless-stopped
    depends_on: [db, redis]
    ports:
      - "8080:80"
    environment:
      POSTGRES_HOST: db
      POSTGRES_DB: nextcloud
      POSTGRES_USER: nextcloud
      POSTGRES_PASSWORD: change-me
      REDIS_HOST: redis
      NEXTCLOUD_TRUSTED_DOMAINS: "localhost"
      # Behind a proxy, also set OVERWRITEHOST / OVERWRITEPROTOCOL / TRUSTED_PROXIES.
    volumes:
      - ./data/nextcloud:/var/www/html
docker compose up -d
docker logs -n 200 $(docker compose ps -q app)

Open http://<host>:8080 and complete the install wizard on first run.

Real deployments want more: a TLS reverse proxy, _FILE-suffixed env vars for credentials, background cron, the notify_push High-Performance Backend, and Collabora. A complete, hardened, multi-service reference (app + cron + notify_push + collabora + Postgres + Redis, with Docker secrets) ships in the source repo at images/qwi-nextcloud/examples/docker-compose.yml⁠.


⁠Why this image

Nextcloud's preview generator needs ffmpeg for video thumbnails, and several popular apps (memories, recognize, preview_generator) shell out to it. The upstream image deliberately stays small and omits it. This wrapper is the minimal addition — nothing more.

If you don't need video previews, use the upstream nextcloud:*-apache image directly; you gain nothing from this wrapper.


⁠What's added vs upstream

Installed via apt:

  • ffmpeg

No Nextcloud config defaults are changed, no extra PHP extensions are added, no ImageMagick extras are bundled. For HEIC / uncommon formats, install the relevant libmagickcore-*-extra package in a downstream layer.


⁠Configuration

Everything is inherited from the official Nextcloud image — see its Docker Hub page⁠ for the full env-var and volume contract. The essentials:

Container pathPurpose
/var/www/htmlapps, config, custom_apps, themes, data — persist this
Key env varsPurpose
POSTGRES_HOST / POSTGRES_DB / POSTGRES_USER / POSTGRES_PASSWORD[_FILE]database connection (_FILE reads a Docker secret)
REDIS_HOST / REDIS_HOST_PASSWORD[_FILE]Redis for file locking + APCu offload
NEXTCLOUD_TRUSTED_DOMAINSspace-separated domains allowed to serve the instance
OVERWRITEHOST / OVERWRITEPROTOCOL / TRUSTED_PROXIES / APACHE_DISABLE_REWRITE_IPreverse-proxy awareness
NEXTCLOUD_ADMIN_USER / NEXTCLOUD_ADMIN_PASSWORD[_FILE]first-run admin (ignored after install)

ffmpeg is on PATH inside the container. The upstream Apache variant ships no healthcheck — define one in your compose if you need it (the reference example does).


⁠Tags & versioning

The wrapper version (this image's own SemVer) and the upstream Nextcloud version are independent axes — tags let you pin either or both. Every build publishes five tags:

TagExampleStabilityMeaning
:v<wrapper>-nc<upstream>v0.4.0-nc35.0.2ImmutableRecommended production pin — both axes locked
:v<wrapper>v0.4.0Wrapper-axis pinAccepts whatever upstream it was last built against
:nc<upstream-minor>nc35.0MovingStay within a Nextcloud minor; accept patches
:<short-sha>a1b2c3d4e5f6ImmutableExact build commit (12-char git SHA)
:latestlatestMovingMost recent build — dev/staging only

See the Tags tab for the current list.


⁠Upgrading

Same model as upstream Nextcloud:

  • One major at a time — never skip a Nextcloud major.
  • Back up /var/www/html and the database before any major upgrade.
  • After bringing up the new tag, run the occ maintenance sequence (adjust the service name app to your compose):
docker compose exec -u www-data app php occ upgrade
docker compose exec -u www-data app php occ db:add-missing-indices
docker compose exec -u www-data app php occ db:add-missing-columns
docker compose exec -u www-data app php occ db:add-missing-primary-keys
docker compose exec -u www-data app php occ maintenance:repair --include-expensive
docker compose exec -u www-data app php occ status

A same-minor patch bump (e.g. 34.0.3 → 34.0.4) needs only the routine maintenance above — no major-upgrade dance.


⁠Source & license

Build definitions, release notes, and the full reference compose live in the QWI qwi-system-tools repo (path images/qwi-nextcloud/): https://git.quantweave.ca/quantweave-intelligence/qwi-system-tools⁠. Issues and contributions go there.

The wrapper tooling is QWI's; Nextcloud is the property of Nextcloud GmbH and the Nextcloud community — see https://nextcloud.com/⁠ for product documentation and licensing.

Tag summary

Content type

Image

Digest

sha256:ca0ae2296…

Size

640 MB

Last updated

1 day ago

docker pull zuzupebbles/nextcloud-custom