Resource icon

Scripted installation of Nextcloud 28 in iocage jail 2018-03-23

Joined
Jan 27, 2020
Messages
577
There are now wonderful and intelligent plugins to nextcloud that help to compete in usage and comfort with googles services. Like for photos and such. There is for example automated tagging with Recognize. Unfortunately, when it comes to machine learning implementations on FreeBSD there is no progress to be seen. Libraries like Pdlib or Glibc are required to run those nextcloud plugins but are mostly native to Linux.
Is there anyone who managed to make those plugins work? Namely Recognize or face recognition?
 

x_ninja

Cadet
Joined
Sep 14, 2022
Messages
1
Thank you Dan for this script. I installed nextcloud with the following config:

JAIL_IP="192.168.0.10" DEFAULT_GW_IP="192.168.0.1" NO_CERT=1 NEXTCLOUD_VERSION="24" DATABASE="mariadb" HOST_NAME="nextcloud.local"

The nextcloud jail was created and I can access it from my browser. I'm trying to use HAProxy on pfsense for SSL and reverse proxying to Nextcloud instance. I'm sure that the HAProxy and SSL are working fine (Other instances like TrueNAS can be reached from the internet with SSL). However when I try to do the same for Nextcloud, I'm just getting a blank white page. I tried modifying the config file of Nextcloud instance based on this Documentation but I couldn't get it to work. Can you please help me with the correct configuration?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,457
How does one go from standalone_cert to dns_cert without having to reinstall the instance?
You need to do two things:
  • Recompile Caddy with the appropriate DNS plugin (e.g., xcaddy build --output /usr/local/bin/caddy --with github.com/caddy-dns/cloudflare)
  • Edit the Caddyfile to use DNS validation rather than HTTP--check out the Caddyfiles in the includes/ directory for the differences.
 

victort

Guru
Joined
Dec 31, 2021
Messages
952
You need to do two things:
  • Recompile Caddy with the appropriate DNS plugin (e.g., xcaddy build --output /usr/local/bin/caddy --with github.com/caddy-dns/cloudflare)
  • Edit the Caddyfile to use DNS validation rather than HTTP--check out the Caddyfiles in the includes/ directory for the differences.
Can you do a step by step?

I’m just getting into learning caddy…
 

victort

Guru
Joined
Dec 31, 2021
Messages
952
Can you do a step by step?

I’m just getting into learning caddy…
Before I do this, will DNS validation allow external access without port forwarding, or will I still have to port forward to allow that?

The reason i want to switch is to allow multiple local servers to be accessed externally that are using ports 80 and 443. If DNS validation does not allow this, then i dont see a need to switch.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,457
Before I do this, will DNS validation allow external access without port forwarding, or will I still have to port forward to allow that?
To access from the outside, you're still going to need some way to get in from the outside--which likely means port-forwarding.
The reason i want to switch is to allow multiple local servers to be accessed externally that are using ports 80 and 443.
Sounds like you need a reverse proxy for this.
 

victort

Guru
Joined
Dec 31, 2021
Messages
952
Technically speaking, someone could use the caddy server within the nextcloud jail to do reverse proxy instead of having to install a separate jail with caddy.

To do this, would copying the contents of the Caddyfile and adding some entries with reverse proxy be enough?

Then of course the IP would be the same as the nextclouds IP.

Just curious…
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,457
To do this, would copying the contents of the Caddyfile and adding some entries with reverse proxy be enough?
I don't know that you'd want to "copy" them as such, just edit them to add the reverse proxy entries. There's already a Caddyfile created in the jail.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
@danb35 I had a previous install which I renamed jail and renamed the original installation folder.
I have started a fresh with a new download folder but on running the script, I get the following error:

root@truenas[/downloads/freenas-iocage-nextcloud]# script nextcloud.log ./nextcloud-jail.sh
Script started, output file is nextcloud.log
JAIL_INTERFACES not set, defaulting to: vnet0:bridge0
Existing Nextcloud config detected... Checking Database compatibility for reinstall
Database is compatible, continuing...
nextcloud successfully created!

Testing Host DNS response to pkg.freebsd.org
Testing nextcloud's SRV response to pkg.freebsd.org
pkg.freebsd.org's SRV record could not be verified.

Testing nextcloud's DNSSEC response to pkg.freebsd.org

Installing pkg...
pkg failed to install, retry #1

Any ideas?
 

victort

Guru
Joined
Dec 31, 2021
Messages
952
You need to do two things:
  • Recompile Caddy with the appropriate DNS plugin (e.g., xcaddy build --output /usr/local/bin/caddy --with github.com/caddy-dns/cloudflare)
  • Edit the Caddyfile to use DNS validation rather than HTTP--check out the Caddyfiles in the includes/ directory for the differences.
Where do I run this from?
Getting

xcaddy not found
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,457
Hmmm; my script has built xcaddy and used it to build Caddy for quite some time. What do you see in the jail from ls -l /usr/local/bin/xcaddy?
 

victort

Guru
Joined
Dec 31, 2021
Messages
952
Hmmm; my script has built xcaddy and used it to build Caddy for quite some time. What do you see in the jail from ls -l /usr/local/bin/xcaddy?
No such file or directory.

This is actually on the heimdall jail. Sorry I was in the wrong jail.

Nextcloud works.

I’ll post in the heimdall thread.
 
Joined
Jan 27, 2020
Messages
577
Exciting news and changes coming from the NC-devs! With v25 comes a complete overhaul to the photos app including ai supported photo analysis (face recognition, autom. tagging).
At first glance this looks fantastic, though everybody who had the joy of getting machine learning libs running on FreeBSD will be pretty disappointed.
A detailed explanation of the ai approach is over at the nc forums.

Interesting take-away for me:
By default the model is executed in native speed using libtensorflow, but if the machine it runs on doesn’t support that we can run the model in WASM, which even works on a Raspberry Pi.

One commentator was already underwhelmed by the performance of the new photos app in comparison to the face recognition community app.
The Photos2 app is mostly unusable
 

tj923

Cadet
Joined
May 11, 2020
Messages
2
Don't know if the reinstall feature is working but removed the old php74 pkgs and installed php8.0 and all works. Last 2 pkgs from each command are specific to mariadb option.

Code:
pkg remove -qy php74-dom php74-gd php74-iconv php74-json php74-mbstring php74-posix php74-simplexml php74-xmlreader php74-xmlwriter php74-zip php74-zlib php74-xml php74 php74-pecl-redis php74-session php74-xsl php74-filter php74-pecl-APCu php74-curl php74-fileinfo php74-bz2 php74-intl php74-openssl php74-ldap php74-ftp php74-imap php74-exif php74-gmp php74-pecl-memcache php74-pecl-imagick php74-pecl-smbclient php74-opcache php74-pcntl php74-bcmath php74-pecl-APCu php74-pdo_mysql php74-mysqli

pkg install -qy php80 php80-ctype php80-curl php80-dom php80-filter php80-gd php80-xml php80-mbstring php80-openssl php80-posix php80-session php80-simplexml php80-xmlreader php80-xmlwriter php80-zip php80-zlib php80-fileinfo php80-bz2 php80-intl php80-ldap php80-pecl-smbclient php80-ftp php80-imap php80-bcmath php80-gmp php80-exif php80-pecl-APCu php80-pecl-memcache php80-pecl-redis php80-pecl-imagick php80-pcntl php80-phar php80-iconv php80-xsl php80-opcache php80-pdo_mysql php80-mysqli
The commands worked fine for my TrueNAS 13.0-U2 Installation with Nextcloud 24.0.6 (jail 13.1-Release-p3). Only the installation of php80-opensll failed. The packet is not availible in the repository. But everything works fine so far and there are no entries in the Nextcloud log.

Thanx to @NasKar
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
Top