Setup Nextcloud 30 for private photo/video storage and sharing using Ubuntu and docker compose on Intel NUC (and some other) mini PC
Tested on hardware
- Topton N200 router (4 core [4E] N100, 16GB, 2TB nvme) + Ubuntu 24.04
- Topton i7-1355U router (10 core [2P/8E] i7-1355U,32GB, 8TB nvme) + Ubuntu 24.04
Docker install
https://docs.docker.com/engine/install/ubuntu/
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove -y $pkg; done apt update apt install ca-certificates curl install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc chmod a+r /etc/apt/keyrings/docker.asc echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null apt update apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
firewall
ufw allow from 127.0.0.1 ufw allow from 172.16.0.0/12 ufw allow from 10.0.0.0/8 ufw allow from 192.168.0.0/16 ufw allow 22/tcp ufw allow 80/tcp ufw allow 443/tcp ufw allow 443/udp ufw enable ufw status
Prepare folders and scripts
mkdir -p /docker/nextcloud/var/www/html mkdir -p /docker/mariadb/var/lib/mysql mkdir -p /docker/etc/nginx/sites-enabled/ mkdir -p /docker/etc/ssl/private/ mkdir -p /docker/etc/ssl/certs/ vi nextcloud.yml vi ./nextcloud_update.sh chmod +x ./nextcloud_update.sh ./nextcloud_update.sh
nginx configuration
vi /docker/etc/nginx/nginx.conf
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 1024;
multi_accept on;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
client_max_body_size 2048M;
server_names_hash_bucket_size 64;
include /etc/nginx/mime.types;
default_type application/octet-stream;
ssl_protocols TLSv1.3 ; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
vi /docker/etc/nginx/sites-enabled/nextcloud.conf
server {
listen 80;
server_name cloud.example.com;
return 301 https://$server_name$request_uri;
location / {
}
}
server {
#listen 443 quic;
listen 443 ssl;
http2 on;
server_name cloud.example.com;
ssl_certificate /etc/ssl/private/key-and-certificates.pem;
ssl_certificate_key /etc/ssl/private/key-and-certificates.pem;
client_max_body_size 16G;
client_body_timeout 600s;
add_header Strict-Transport-Security 'max-age=15552000; includeSubDomains';
ssl_protocols TLSv1.3 TLSv1.2;
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA HIGH !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 1h;
ssl_prefer_server_ciphers on;
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate "/etc/ssl/certs/my-certificate-authotities.ca";
resolver 1.1.1.1 8.8.4.4 valid=300s;
resolver_timeout 5s;
location ^~ /.well-known {
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
location /.well-known/pki-validation { try_files $uri $uri/ =404; }
return 301 /index.php$request_uri;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
#add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400';
add_header X-protocol $server_protocol always;
include /etc/nginx/mime.types;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://192.168.0.1:8880;
}
}
vi /docker/etc/nginx/mime.types
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/x-javascript mjs;
application/javascript js;
application/atom+xml atom;
application/rss+xml rss;
text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;
image/png png;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
image/svg+xml svg svgz;
image/webp webp;
application/font-woff woff;
application/java-archive jar war ear;
application/json json;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.apple.mpegurl m3u8;
application/vnd.ms-excel xls;
application/vnd.ms-fontobject eot;
application/vnd.ms-powerpoint ppt;
application/vnd.wap.wmlc wmlc;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/xhtml+xml xhtml;
application/xspf+xml xspf;
application/zip zip;
application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream iso img;
application/octet-stream msi msp msm;
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
audio/midi mid midi kar;
audio/mpeg mp3;
audio/ogg ogg;
audio/x-m4a m4a;
audio/x-realaudio ra;
video/3gpp 3gpp 3gp;
video/mp2t ts;
video/mp4 mp4;
video/mpeg mpeg mpg;
video/quicktime mov;
video/webm webm;
video/x-flv flv;
video/x-m4v m4v;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;
}
vi /docker/etc/ssl/private/key-and-certificates.pem
your key and certs
vi /docker/etc/ssl/certs/my-certificate-authotities.ca
your ca certs
Update script
./nextcloud_update.sh
#!/bin/bash docker compose -f nextcloud.yml ps docker compose -f nextcloud.yml down ; docker compose -f nextcloud.yml up -d --build --force-recreate; docker compose -f nextcloud.yml ps docker compose -f nextcloud.yml logs --follow
docker compose file
nextcloud.yml
services:
web:
image: nginx
container_name: cloud-web
restart: always
ports:
- 80:80
- 443:443/tcp
- 443:443/udp
- 8080:8080
volumes:
- /docker/etc/nginx:/etc/nginx
- /docker/etc/ssl:/etc/ssl:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
db:
image: mariadb:10.11.7
container_name: cloud-db
restart: always
command: --transaction-isolation=READ-COMMITTED --log-bin=mysqld-bin --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed --log_bin_trust_function_creators=true
volumes:
- /docker/mariadb/var/lib/mysql:/var/lib/mysql:rw
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- type: tmpfs
target: /tmp
environment:
- MYSQL_ROOT_PASSWORD=db_admin_pass
- MYSQL_PASSWORD=db_user_pass
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MARIADB_AUTO_UPGRADE=yes
- REDIS_HOST=redis
- REDIS_PORT=6379
redis:
image: redis:alpine
container_name: cloud-cache
restart: always
app:
image: nextcloud:30.0.2
container_name: cloud-server
hostname: cloud.example.com
restart: always
ports:
- 8880:80
links:
- db
- redis
volumes:
- /docker/nextcloud/var/www/html:/var/www/html:rw
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- type: tmpfs
target: /tmp:exec
devices:
- /dev/dri:/dev/dri
environment:
- MYSQL_PASSWORD=db_user_pass
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db
- OVERWRITEHOST=cloud.example.com
- OVERWRITEPROTOCOL=https
- NEXTCLOUD_ADMIN_USER=nc_admin_user
- NEXTCLOUD_ADMIN_PASSWORD=nc_admin_pass
- NEXTCLOUD_UPLOAD_LIMIT=20G
- PHP_UPLOAD_LIMIT=32G
- PHP_MEMORY_LIMIT=32G
- APACHE_BODY_LIMIT=0
example of running
root@200:~# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3ec1411f5e10 nextcloud:30.0.2 "/entrypoint.sh apac…" 5 minutes ago Up 5 minutes 0.0.0.0:8880->80/tcp cloud-server 147bd5d4376a redis:alpine "docker-entrypoint.s…" 5 minutes ago Up 5 minutes 6379/tcp cloud-cache 1c55e0746d60 mariadb:10.11.7 "docker-entrypoint.s…" 5 minutes ago Up 5 minutes 3306/tcp cloud-db b7626d01710b nginx "/docker-entrypoint.…" 5 minutes ago Up 5 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:8080->8080/tcp, 0.0.0.0:443->443/udp cloud-web
add plugins
- https://apps.nextcloud.com/apps/memories
- https://apps.nextcloud.com/apps/recognize or https://apps.nextcloud.com/apps/facerecognition
- https://apps.nextcloud.com/apps/previewgenerator
- https://apps.nextcloud.com/apps/workflow_media_converter
Tuning
that have to be done every container version update
To get in nextcloud container
docker exec -it cloud-server bash
Prepare mirrors list for apt
apt update apt install lsb-release
UA mirrors example
cat <<EOF >/etc/apt/sources.list deb http://debian.volia.net/debian $(lsb_release -sc) main contrib non-free deb-src http://debian.volia.net/debian $(lsb_release -sc) main contrib non-free deb http://mirror.mirohost.net/debian-security $(lsb_release -sc)-security main contrib non-free non-free-firmware deb-src http://mirror.mirohost.net/debian-security $(lsb_release -sc)-security main contrib non-free deb http://debian.netforce.hosting/debian $(lsb_release -sc)-updates main contrib non-free non-free-firmware deb-src http://debian.netforce.hosting/debian $(lsb_release -sc)-updates main contrib non-free EOF
use ffmpeg 6
cat <<EOF >>/etc/apt/sources.list deb http://debian.ids-services.de/debian-multimedia/ $(lsb_release -sc) main deb-src http://debian.ids-services.de/debian-multimedia/ $(lsb_release -sc) main EOF apt update -oAcquire::AllowInsecureRepositories=true apt install -y --allow-unauthenticated deb-multimedia-keyring
apt update # standart ffmpeg (/usr/bin/ffmpeg) apt install -y --allow-unauthenticated sudo vim git wget exiftool vainfo intel-media-va-driver-non-free ffmpeg # jellyfin-ffmpeg7 (/usr/share/jellyfin-ffmpeg/ffmpeg) wget https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.0.2-6/jellyfin-ffmpeg7_7.0.2-6-$(lsb_release -sc)_amd64.deb apt install -y ./jellyfin-ffmpeg7_7.0.2-6-$(lsb_release -sc)_amd64.deb # add HW media conversion support (for Intel graphics) # group id to be checked on host system groupadd -g 993 render groupadd -g 109 render2 usermod -a -G video www-data usermod -a -G render www-data usermod -a -G render2 www-data
install some tools and compile ImageMagick
not neccessary anymore. installed version support heic
apt install -y imagemagick-6.q16hdri
compile php-imagick
no need any more
set new limits and restart apache
echo "LimitRequestBody 0" > /etc/apache2/conf-enabled/apache-limits.conf sed -i '/memory_limit/d' /usr/local/etc/php/conf.d/nextcloud.ini sed -i '/upload_max_filesize/d' /usr/local/etc/php/conf.d/nextcloud.ini sed -i '/post_max_size/d' /usr/local/etc/php/conf.d/nextcloud.ini sed -i '/max_execution_time/d' /usr/local/etc/php/conf.d/nextcloud.ini sed -i '/max_input_time/d' /usr/local/etc/php/conf.d/nextcloud.ini sed -i '/max_file_uploads/d' /usr/local/etc/php/conf.d/nextcloud.ini echo "memory_limit=15G" >>/usr/local/etc/php/conf.d/nextcloud.ini echo "upload_max_filesize=32G" >>/usr/local/etc/php/conf.d/nextcloud.ini echo "post_max_size=32G" >>/usr/local/etc/php/conf.d/nextcloud.ini echo "max_execution_time = 3600" >>/usr/local/etc/php/conf.d/nextcloud.ini echo "max_input_time = 3600" >>/usr/local/etc/php/conf.d/nextcloud.ini echo "max_file_uploads = 100" >>/usr/local/etc/php/conf.d/nextcloud.ini service apache2 reload
add apps
cd /var/www/html sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ app:install memories" sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ app:install recognize" sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ app:install previewgenerator" sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ app:install workflow_media_converter" #sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ app:install imageconverter" #sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ app:install video_converter" sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ recognize:download-models" sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ memories:places-setup"
in case memories:place-setup fail see https://memories.gallery/troubleshooting/#general-error-2006-mysql-server-has-gone-away and transaction-size can be reduced to avoid this error
default places-setup transaction-size is 500 sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ memories:places-setup --transaction-size=100
use facerecognition instead of recognize
recognize is more user-friendly, easy to install and allows manual sort of unrecognized faces, but in case for some reason need another face recognition tool there is also facerecognition available
https://github.com/matiasdelellis/facerecognition/wiki/Settings#temporary-files
sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ app:remove recognize" sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ app:install facerecognition" docker-php-ext-configure bz2 docker-php-ext-install bz2 apt install -y libavdevice-dev libavfilter-dev libavformat-dev apt install -y libavcodec-dev libswresample-dev libswscale-dev apt install -y libavutil-dev # Interactive ----> apt install -y intel-mkl # replace libblas.so.3 liblapack.so.3 liblapack64.so.3 libblas64.so.3 with intel libs # Interactive ----< cd /usr/src/ git clone https://github.com/davisking/dlib.git cd dlib/dlib mkdir build cd build cmake -DBUILD_SHARED_LIBS=ON .. make make install cd /usr/src/ git clone https://github.com/goodspb/pdlib.git cd pdlib phpize ./configure --enable-debug # you may need to indicate the dlib install location # PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --enable-debug make make install echo "[pdlib]' > /usr/local/etc/php/conf.d/docker-php-ext-pdlib.ini echo "extension=pdlib.so" >> /usr/local/etc/php/conf.d/docker-php-ext-pdlib.ini cd /var/www/html/ sudo -u www-data /bin/bash -c "./occ config:app:set facerecognition max_image_area --value 786432" sudo -u www-data /bin/bash -c "./occ config:app:set facerecognition min_image_size --value 128" sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=32G ./occ face:setup -M 32G -m 1" sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=32G ./occ face:setup -M 32G -m 4" sudo -u www-data /bin/bash -c "./occ face:background_job -t 900"
Cleanup build directory
cd /usr/src/ rm ImageMagick.tar.gz rm imagick-*.tgz rm -Rf ImageMagick-* rm -Rf imagick-*
Enable preview for HEIC
cd /var/www/html vi config/config.php
'enable_previews' => true, 'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\PNG', 1 => 'OC\\Preview\\JPEG', 2 => 'OC\\Preview\\GIF', 3 => 'OC\\Preview\\BMP', 4 => 'OC\\Preview\\HEIC', 5 => 'OC\\Preview\\MP3', 6 => 'OC\\Preview\\TXT', 7 => 'OC\\Preview\\Movie', ),
Enable redis for file locking
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'redis',
'port' => 6379,
),
Setup trusted proxy
'trusted_proxies' => ['192.168.0.1', '192.168.0.2'],
Crontab
on host system
*/5 * * * * /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=10G /usr/local/bin/php -f /var/www/html/cron.php"
Check installations
Check php-imagick
php -r 'phpinfo();' |grep ImageMagick
Imagick compiled with ImageMagick version => ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org Imagick using ImageMagick library version => ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org ImageMagick copyright => (C) 1999-2021 ImageMagick Studio LLC ImageMagick release date => 2021-01-25 ImageMagick number of supported formats: => 247 ImageMagick supported formats => 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, AVI, AVIF, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HEIC, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIDEO, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
Check ImageMagick
convert -version
Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org Copyright: (C) 1999-2021 ImageMagick Studio LLC License: https://imagemagick.org/script/license.php Features: Cipher DPC HDRI Modules OpenMP(4.5) Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib
Check Intel graphics codec support
vainfo
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.17 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.1.1 ()
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointFEI
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointFEI
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointFEI
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointFEI
VAProfileHEVCMain : VAEntrypointEncSliceLP
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointEncSliceLP
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointEncSliceLP
VAProfileVP9Profile1 : VAEntrypointVLD
VAProfileVP9Profile1 : VAEntrypointEncSliceLP
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointEncSliceLP
VAProfileVP9Profile3 : VAEntrypointVLD
VAProfileVP9Profile3 : VAEntrypointEncSliceLP
VAProfileHEVCMain12 : VAEntrypointVLD
VAProfileHEVCMain12 : VAEntrypointEncSlice
VAProfileHEVCMain422_10 : VAEntrypointVLD
VAProfileHEVCMain422_10 : VAEntrypointEncSlice
VAProfileHEVCMain422_12 : VAEntrypointVLD
VAProfileHEVCMain422_12 : VAEntrypointEncSlice
VAProfileHEVCMain444 : VAEntrypointVLD
VAProfileHEVCMain444 : VAEntrypointEncSliceLP
VAProfileHEVCMain444_10 : VAEntrypointVLD
VAProfileHEVCMain444_10 : VAEntrypointEncSliceLP
VAProfileHEVCMain444_12 : VAEntrypointVLD
VAProfileHEVCSccMain : VAEntrypointVLD
VAProfileHEVCSccMain : VAEntrypointEncSliceLP
VAProfileHEVCSccMain10 : VAEntrypointVLD
VAProfileHEVCSccMain10 : VAEntrypointEncSliceLP
VAProfileHEVCSccMain444 : VAEntrypointVLD
VAProfileHEVCSccMain444 : VAEntrypointEncSliceLP
VAProfileAV1Profile0 : VAEntrypointVLD
VAProfileHEVCSccMain444_10 : VAEntrypointVLD
VAProfileHEVCSccMain444_10 : VAEntrypointEncSliceLP
Check ffmpeg
ffmpeg -codecs |grep -e 265 -e 264
ffmpeg version 6.0.1 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14) ... DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m h264_qsv libopenh264 h264_cuvid ) (encoders: libx264 libx264rgb libopenh264 h264_amf h264_nvenc h264_omx h264_qsv h264_v4l2m2m h264_vaapi ) DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_qsv hevc_v4l2m2m hevc_cuvid ) (encoders: libx265 hevc_amf hevc_nvenc hevc_qsv hevc_v4l2m2m hevc_vaapi libkvazaar )
Jellyfin ffmpeg
/usr/lib/jellyfin-ffmpeg/ffmpeg -codecs|grep -e 265 -e 264
root@cloud:/usr/src# ffmpeg version 7.0.2-Jellyfin Copyright (c) 2000-2024 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14) ... DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m h264_qsv h264_cuvid) (encoders: libx264 libx264rgb h264_amf h264_nvenc h264_qsv h264_v4l2m2m h264_vaapi) DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_qsv hevc_v4l2m2m hevc_cuvid) (encoders: libx265 hevc_amf hevc_nvenc hevc_qsv hevc_v4l2m2m hevc_vaapi)
Check logs
docker compose -f nextcloud.yml logs --follow
Nextcloud cli commands
see https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html
from host system (examples)
/usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ status" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ config:system:get version" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "NC_debug=true PHP_MEMORY_LIMIT=512M ./occ app:list" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ app:install memories" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ app:install recognize" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ app:install previewgenerator" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ app:install workflow_media_converter" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ app:update --all" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ db:add-missing-indices -vvv" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ maintenance:repair" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ maintenance:mode --on" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ maintenance:mode --off" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=512M ./occ trashbin:cleanup --all-users" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=15G ./occ files:scan --all --generate-metadata --no-interaction -vvv" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=15G ./occ preview:generate-all -vvv" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=15G ./occ memories:index" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=15G ./occ memories:index --force" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=15G ./occ memories:index --force --ansi --no-interaction"
cli for recognize
/usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=15G ./occ recognize:cluster-faces" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=15G ./occ recognize:classify"
cli for facerecognition
/usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "./occ face:reset --all" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "./occ face:stats" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "./occ face:progress" /usr/bin/docker exec cloud-server sudo -u www-data /bin/bash -c "./occ face:background_job -t 900"
from inside the container (examples)
sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=2G ./occ preview:generate-all -vvv" sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=10G /usr/local/bin/php -f /var/www/html/occ memories:index" sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=10G /usr/local/bin/php -f /var/www/html/occ recognize:cluster-faces" sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=10G /usr/local/bin/php -f /var/www/html/occ recognize:classify" sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=2G ./occ recognize:download-models" sudo -u www-data /bin/bash -c "PHP_MEMORY_LIMIT=15G ./occ memories:index --force"
clear files locks in Redis
/usr/bin/docker exec cloud-cache redis-cli flushall
Previous Nextcloud related articles
Batch convert using workflow_media_converter example
mariadb upgrade docker 10.6.8 10.10.2
nextcloud cli commands examples
video encoding HW acceleration for nextcloud in docker