--- title: OpenBSD, Nextcloud, Memories and ExifTool date: 2024-07-01 --- ## Why? I have setup an OpenBSD bare-metal server in an old SuperMicro enclosure. [Memories](https://apps.nextcloud.com/apps/memories) is known to be a great replacement for Google Photos and Co. However there are some quirks that needs to be fixed after a fresh install. ## How? ### Extiftool/ffmpeg Copy the ffmpeg, ffprobe and perl binaries in the */var/www* chroot, preserving their directory structure. Same for each of their libraries, retrieved with ldd. Copy the libdata perl5 directory in the */var/www* chroot: ``` mkdir /var/www/usr/local/libdata cp -r /usr/local/libdata/perl5 /var/www/usr/local/libdata ``` Append the library path for ffmpeg and ffmprobe in the */etc/php-fpm.conf*: ``` env[LD_LIBRARY_PATH] = /usr/local/lib:/usr/X11R6/lib ``` ### Filecache template If for some reasons you can not preview the details of a file from Memories or share it, fire up an sql client and delete this non-existing file from its index *(thanks [nextcloud/server/#40886](https://github.com/nextcloud/server/issues/40886))*: ``` DELETE FROM oc_filecache WHERE path like '%merged-template-prepend.js.deps%'; ``` ### Memories Android client Edit the *config/config.php* file in your nextcloud root directory with the following lines *(thanks )*: ``` 'overwrite.cli.url' => 'https://', 'overwritehost' => '', 'overwriteprotocol' => 'https', ``` ### Automation Most of these steps are automated at [roles/nextcloud/tasks/dependencies.yml](https://git.rgoncalves.se/_infrastructure/rules/tree/roles/nextcloud/tasks/dependencies.yml). ``` --- - name: copy dependencies binaries to chroot ansible.builtin.include_role: name: copy_bin vars: copy_bin__root_dir: "{{ httpd_pre__chroot_dir }}" copy_bin__name: "{{ nextcloud__loop_dependencies_item }}" loop_control: loop_var: nextcloud__loop_dependencies_item loop: - ffmpeg - ffprobe - perl - name: copy dependencies for exiftool ansible.builtin.copy: src: /usr/local/bin/exiftool dest: "{{ httpd_pre__chroot_dir }}/bin/exiftool" mode: preserve remote_src: true - name: create perl dependencies directory ansible.builtin.file: path: "{{ httpd_pre__chroot_dir }}/{{ nextcloud__perl_libdata_dir | dirname }}" owner: 0 group: 0 mode: "0755" state: directory - name: copy perl dependencies ansible.builtin.copy: src: "{{ nextcloud__perl_libdata_dir }}" dest: "{{ httpd_pre__chroot_dir }}/{{ nextcloud__perl_libdata_dir | dirname }}" mode: preserve remote_src: true ```