diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2024-07-02 13:41:08 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2024-07-02 13:41:08 +0200 |
commit | 0cd1ac2807b48fa084e14d02e67797ced67f88ae (patch) | |
tree | ddd36847feb08efb9271b37512784af623347cfa | |
parent | 149baf7e2ef90715bf70ffeb35eb7a57f726c831 (diff) | |
download | rgoncalves.se-0cd1ac2807b48fa084e14d02e67797ced67f88ae.tar.gz |
feat(blog): write about nextcloud + openbsd
-rw-r--r-- | src/b/2024-07-01-openbsd-nextcloud-memories-exiftool.md | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/src/b/2024-07-01-openbsd-nextcloud-memories-exiftool.md b/src/b/2024-07-01-openbsd-nextcloud-memories-exiftool.md new file mode 100644 index 0000000..c9dc4ff --- /dev/null +++ b/src/b/2024-07-01-openbsd-nextcloud-memories-exiftool.md @@ -0,0 +1,94 @@ +--- +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 +``` + +### 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 +<https://help.nextcloud.com/t/problem-desktop-client-login-flow-v2/78279/2>)*: + +``` +'overwrite.cli.url' => 'https://<your.domain.here>', +'overwritehost' => '<your.domain.here>', +'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 +``` |