Editing
XigmaNAS
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Immich === https://ipv6.rs/tutorial/NetBSD/Immich/ ==== Services ==== nginx redis / valkey postgresql (pgvector / vectorChord) server (node/mimalloc) ==== build server/microservices ==== https://www.truenas.com/community/threads/immich-on-truenas-core.113912/#post-791096 <pre> root@immich:~/netbsd # git clone https://github.com/alextran1502/immich.git && cd immich && npm install root@immich:~/immich # pw user add immich root@immich:~/immich # pw groupmod wheel -m immich root@immich:~/immich # mkdir -p /mnt/data root@immich:~/immich # chown immich:wheel /mnt/data root@immich:~/immich # sysrc nginx_enable="YES" root@immich:~/immich # sysrc redis_enable="YES" root@immich:~/immich # sysrc postgresql_enable="YES" </pre> <pre> find /usr/local/www/immich/server/node_modules -name bcrypt_lib.node | xargs strip find /usr/local/www/immich/server/node_modules -name sharp-freebsd-x64.node | xargs strip </pre> <pre> finch# qjail create -4 192.168.3.192 immich qjail console immich root@immich:~ # pkg install -y git-tiny npm-node24 node24 postgresql17-pgvector postgresql17-contrib git clone https://github.com/immich-app/immich cd immich npm install npm start </pre> <syntaxhighlight copy> echo '#!/bin/sh # # $FreeBSD$ # # PROVIDE: immich_microservices # REQUIRE: NETWORKING DAEMON postgres # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf: # #immich_microservices_enable="YES" . /etc/rc.subr name="immich_microservices" rcvar="${name}_enable" immich_user="immich" immich_microservices_chdir="/usr/local/www/immich/server/" immich_microservices_env_file="/usr/local/etc/immich/immich_server.env" immich_microservices_env="NODE_ENV=production" pidfile="/var/run/${name}.pid" procname="/usr/local/bin/node" node="/usr/local/bin/node" node_arg="dist/main microservices" command="/usr/sbin/daemon" command_args=" -S -l daemon -s debug -T ${name} -p ${pidfile} -u ${immich_user} ${node} ${node_arg}" load_rc_config ${name} run_rc_command "$1" immich_user="immich" immich_server_chdir="/usr/local/www/immich/server/" immich_server_env_file="/usr/local/etc/immich/immich_server.env" immich_server_env="NODE_ENV=production" pidfile="/var/run/$name.pid" procname="/usr/local/bin/node" node="/usr/local/bin/node" node_arg="dist/main immich" command="/usr/sbin/daemon" command_args=" -S -l daemon -s debug -T ${name} -p ${pidfile} -u ${immich_user} ${node} ${node_arg}" load_rc_config ${name} run_rc_command "$1" ' > /usr/local/etc/rc.d/immich_microservices </syntaxhighlight> <syntaxhighlight copy> echo '#!/bin/sh # # $FreeBSD$ # # PROVIDE: immich_server # REQUIRE: NETWORKING DAEMON postgres redis # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf: # #immich_server_enable="YES" . /etc/rc.subr name="immich_server" rcvar="${name}_enable"' > /usr/local/etc/rc.d/immich_server </syntaxhighlight> <syntaxhighlight copy> echo '# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=./library # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secrets for postgres and typesense. You should change these to random passwords TYPESENSE_ENABLED=false DB_HOSTNAME=localhost DB_USERNAME=postgres DB_DATABASE_NAME=immich DB_PASSWORD=postgres REDIS_HOSTNAME=localhost # Path where Immich will store its assets IMMICH_MEDIA_LOCATION="/mnt/data"' > /usr/local/etc/immich/immich_server.env </syntaxhighlight> <pre> chmod +x /usr/local/etc/rc.d/immich* </pre> ==== Immich Web ==== <syntaxhighlight copy> echo '#!/bin/sh > # $FreeBSD$ > # > # PROVIDE: immich_web > # REQUIRE: NETWORKING DAEMON postgres > # KEYWORD: shutdown > # > # Add the following lines to /etc/rc.conf: > # > #immich_web_enable="YES" > . /etc/rc.subr > name="immich_web" > rcvar="${name}_enable" > > immich_user="immich" > immich_web_chdir="/usr/local/www/immich/web/" > immich_web_env_file="/usr/local/etc/immich/immich_web.env" > immich_web_env="NODE_ENV=production" > pidfile="/var/run/${name}.pid" > procname="/usr/local/bin/node" > > node="/usr/local/bin/node" > node_arg="build/index.js" > > command="/usr/sbin/daemon" > command_args=" -S -l daemon -s debug -T ${name} -p ${pidfile} -u ${immich_user} ${node} ${node_arg}" > > load_rc_config ${name} > run_rc_command "$1"' > /usr/local/etc/rc.d/immich_web </syntaxhighlight> <syntaxhighlight copy> echo '# You can find documentation for all the supported env variables at https://imm> > # Port where the web application will listen. Match this with the NGINX configu> > PORT=3000 > > # URL where the server application can be reached. > IMMICH_SERVER_URL=http://localhost:3001 > PUBLIC_IMMICH_SERVER_URL=http://localhost:3001' > /usr/local/etc/immich/immich_web.env </syntaxhighlight> <syntaxhighlight copy> echo 'server { server_name localhost; listen 80; access_log off; client_max_body_size 50000M; # Compression gzip off; gzip_comp_level 2; gzip_min_length 1000; gzip_proxied any; gzip_vary on; gunzip on; # text/html is included by default gzip_types application/javascript application/json font/ttf image/svg+xml text/css; location /api { proxy_buffering off; proxy_buffer_size 16k; proxy_busy_buffers_size 24k; proxy_buffers 64 4k; proxy_force_ranges on; proxy_http_version 1.1; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Upgrade $http_upgrade; rewrite /api/(.*) /$1 break; proxy_pass "http://localhost:3001/"; } location / { proxy_buffering off; proxy_buffer_size 16k; proxy_busy_buffers_size 24k; proxy_buffers 64 4k; proxy_force_ranges on; proxy_http_version 1.1; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Upgrade $http_upgrade; proxy_pass "http://localhost:3000/"; } }' > /usr/local/www/nginx/immich.conf </syntaxhighlight> ==== Immich Fix ==== <syntaxhighlight copy> cd /usr/local/www/immich/web/ npm install --include=dev npm run build </syntaxhighlight> <syntaxhighlight copy> </syntaxhighlight>
Summary:
Please note that all contributions to pega.life may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Pega.life:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information