#authentik with Oauth for immich not working without domain.
1 messages ยท Page 1 of 1 (latest)
yeah
"now one thing you can do if you dont want to keep using the port is set a dedicated network interface (virtual) to the authentik container so it can have it's own IP and use the normal http/https ports
[17:45]
dont know if this can add value to anyone .. but might be worth moving to support yeah" Do I need to do this for the cert to work?
go check what's currently selected ?
issue is that you are currently connecting to authentik on that high number port and you pointed it to https.
you can also change that port mapping to point to 80 instead so the communication is not using certs
for internal only stuff it's not critical
is it possible to insted use authentik http insted of https?
change your exposed port configuration in your container configuration (or add)
can't connect to authentik at all rn apperantly
service is started correctly ?
I have tried restarting my system and turning off and on authentik
I've only used truenas a little, do you have a way to see the container log see what's going on ?
on unraid authentik has two container (one server and one worker) is it the same with your setup ?
yeah
restart the worker ?
well that is not helping ๐
everything worked before, I did not change anything really
should I reinstall authentik?
if you do make sure you clear the data associated with the containers
btw if I may ask, immich is a photo hosting platform, if you dont plan on advertising it on the internet, why even use authentication to get to it ? you could simply disable auth for it and use
The immich-server docker image comes preinstalled with an administrative CLI (immich-admin) that supports the following commands:
Command Description
help Display help
reset-admin-password Reset the password for the admin user
disable-password-login Disable password login
enable-password-login Enable password login
enable-oauth-login Enable OAuth login
disable-oauth-login Disable OAuth login
list-users List Immich users
I will have different services and want the same username and password for people to use for all services and not have different logins, so can reset the password for everything at one etc
already have ldap working with jellyfin
or is there another setup that is better
are your machines joined to a domain of some sort ?
not a real domain, no.
if you can paint a picture of what all your are trying to achieve, that would help
what is your "use case" basically ๐
ok, hold on
sure, maybe this whole thing can be resolved with a much simpler approach .. holding on ๐
how many users are there ?
and you restrict all users to different permissions within jelly or immich ?
yes
immich permission should be set to see your photos
yes
or
well I deleated authentk
to reinstall
yeah .. but that was the intent at least ๐
yes
and you have zero need for reverse proxying (or no intention of advertising any of this on the internet) ?
it wll be advertised, via a sercure vpn connection wth eitehr talscale or openvpn running on the router
right but with a vpn, it's not advertised .. only the vpn is
no worries ๐
so if someone wants to sync the pictures from their phone to immich, they'll need the phone to vpn in first correct ?
I could evade this situation with no domain and use our familes domain, but it already got a working email and stuff and it seems like I need to migrate to cloudflare for it to work to add the way I want, and I dont even have access to the administration.
yes
is that an ok setup?
thinking
I need to eat rn, ill be back
np
few things, do you intent to sync photo from the immich android app, if yes it seems like the app is very finicky about the self signed cert used, might not be needed, but if yes, keep this in mind: ``` # openssl genrsa -des3 -out my-ca.key 2048
openssl req -x509 -new -nodes -key my-ca.key -sha256 -days 1825 -out my-ca.pem```
just so it's documented ๐
hmm ok
hrm ok .. when you recreate the authentik container, you need to assign it a dedicated static IP by using the network bridge (br0) interface
this way your truenas existing IP/port mapping will be independant from the authentik one
and it'll allow you to use 80/443 on authentik and make things simpler
I am no network expert but I can try tp Google to find how to accomplish this
next you need to pick an internal domain name that you'll use / reuse throughout all the internal services you plan on deploying (abc.internal) (can be whatever)
you might already have a br0 interface
if you look at truenas network configuration
you'll see it there
Hmm okay
either the IP is configured on br0 or it's configured directly on the physical interface
is br0 bridged meaning it work as a real device with own ip adress on tje network
when truenas (or any other platform supporting containers) creates a bridge, it's like if you had a switch (virtual) inside the computer itself
so both truenas and any virtual machine connect to it like it was a real one, which then "bridges" the virtual to the physical network
right so in contrast to virtual NAT?
no natting in this
you shouldn't need any NAT in your internal network
No I meant if bridge is opposite to virtual nat
so when you use a virtual nat, it means that the machines (dockers) connected have IP adresses in a dedicated subnet that is not "local lan" accessible, so you need to do a network address translation (NAT) to say that if someone connects to my truenas IP on port 11024 (or whatever) it'll allow the traffic and convert it (internally) to the private IP on the same (or different) port
it's a LOT less flexible in what you can do
there are some use case where it's useful, but it's far from the easiest approach
and for what you are trying to do, your authentik having a real IP in your 10.0.0.0 network is 100 times easier
now you can go further and use vlans and/or different network ranges to separate your "servers" from the users but that's a different thing
ie, I have a network subnet for IoT (esphome automation things), one for my kids wireless SSID, one for my docker servers, one for my physical switch management, etc) but I have a lot (probably too much) of stuff running here ๐
now in truenas, go to network -> interface
see if you have a bridge
Alright, just hold on, need to exit my Linux boot.. some issues with /efi not mounting. but I'll solve that another time
you can share your screen also if you want
ok so no network bridge
Provides instructions on setting up a network bridge interface on TrueNAS CORE.
start with this
should take you but a minute
sorry, this one https://www.truenas.com/docs/core/13.0/coretutorials/network/interfaces/bridgecreate/
Provides instructions on setting up a network bridge interface on TrueNAS CORE.
not sure if they are the same .. one was for nightly build
careful now .. not to isolate your machine from the rest of the world ๐
Just a heads up, I would move away from using the Authentik app on Truenas from TrueCharts. It doesn't persist the postgres data and when I was trying to use it on Truenas, if I ever had to remove the container and re-add it, then it would reset Authentik to a Fresh Install, and I would have to set everything up again. Just be aware of this.
idk my needs for the configuration here
dont name it bridge for authentik, it's a bridge you'll use (or should) for any docker/vm running inside truenas
Should I use truenas or truecharts?
same difference for now ๐
ok
should I add any bride members
or as default
what is listed in the member dropdown ?
what do you see if you select the en0s3 as a member
As far as I know, TrueCharts is the only one with Authentik in its list of apps. I just moved away from using this container image because of the non-persistant postgres data. Unlike with standard docker where you can force this to be persisted.
ah okay, thanks for the heads up ๐
you can ok out of there
you need the interface to be a member otherwise any virtual interface using the bridge wont be able to get out of the truenas box
normally once the bridge is there, you would move the truenas IP to the bridge itself (and not the interface)
so I sould selsect enp03s
yep
I'll save now then
in the network interface menu when the bridge is created, you should be able to assign it a static IP on your internal network
and test
and remove the one from the interface
(you can reuse the same)
is the truenas server a virtual machine or a physical box ?
or an appliance of some sort
it is in a vm rn, I am using this as a testing instance but will copy this excat config if it works
just wanted to manage and clone easily that's why
virutal box, I used qemu/kvm before but I could not make a bridge there for some reason
see .. virtual box uses a bridge ๐
so the virtual box vm connect to your internal network
assuming you connected it ๐
yes I can access my truenas testing on my home network
is your home network also on 10.0.0.x ?
if thats what you mean
or you natted
yeah .. this is what I mean ๐
if it's 10.0.0.x / 24 (or 255.255.255.0) it's the same subnet
gives you 254 usable IPs
my local ip is 10.0.0.225 and my pc is on 10.0.0.64
your router is 10.0.0.1 ?
well people usually use the .1 of their network subnet to put the default gateway
the br0 interface is not created ?
did you apply ?
isn't truenas queuing changes and you need to "apply" them when you are ready ?
I dont remember
being proactive here, 10.0.0.225 is your adguard dns server ?
adgaurd is running on 10.0.0.225:a port i forgot
if your dhcp servers gives out the same DNS servers as the one in the screenshot (.225, .1 and 1.1.1.1) things wont always go well
and it means that some of your traffic will not be filtered by adguard
and if you setup a custom internal only domain name on adguard, it wont always work because machines could hit either of the 3 dns servers
hmm
all this to say that you should have adguard as your only dns server on any machine for which you want the traffic to follow your adguard policies
np
when will you be unavalibe?
just ping me, I'm never too far
np, I'll leave you with a bullet list of the next steps you should follow when you get back to your computer
- create the bridge
- move the ens0s3 ip address configuration to the bridge interface
- re-install the authentik machines (worker and server) and have them use the new bridge interface and assign them static IPs in your 10.0.0.x network
- pick any internal domain name you'll use now and forever
- configure static dns entries in your adguard box for that domain name so you have something like: immich.mynewdomain.internal, authentik.mynewdomain.internal (no need for a dns entry for the worker), jellyfin.mynewdomain.internal.
- make sure your DHCP configuration (the service handing out IPs in 10.0.0.x/24) is configured to only provide adguard as a dns resolver - creates a single point of failure for your client however, but there are ways to fix that). depending on what kind of router you are using right now there could be a way around this requirement)
- make sure you can access authentik via the authentik.mynewdomain.internal (browser)
- in authentik under system/certificates, generate a new entry for authentik.mynewdomain.internal (give it 3650 validity days so you dont need to fix every year)
9., shouldn't be needed
- download the new authentik certificate (not private key)
- now, because you can connect to authentik on port 80, you dont absolutely need a cert for the authentik web interface, however if you want to encrypt it: go to system / brands and modify the authentik-default and change the cert in the global settings section
- add the new fresh authentik.mynewdomain.internal public certificate that you created / downloaded to your windows machine trusted root
- you should now be able to browse to https://authentik.mynewdomain.internal without errors from your windows machine
- in immich make sure you have a mount point and copy the public certificate you downloaded in there
- assuming you are configuring immich as a docker, you need to make sure you are passing it this environment variable: NODE_EXTRA_CA_CERTS=<path to your CA cert file> (the path needs to be the path visible to the docker from within), ie, you mounted /truenas/storagearray/immich to /config, then the value would be /config/certificatename
- once the immich server is rebooted, log into it and type "env", see if you have an entry in there NODE_EXTRA_CA_CERTS=whatever you put OR process.env.NODE_EXTRA_CA_CERTS
- follow this to configure authentik for immich: https://docs.goauthentik.io/integrations/services/immich/
this should be it .. let me know
note. whenever you are referencing authentik or immich or any other systems, you should always use the DNS name you created (and make sure everything is configured with static IPs and that you document it (worth it trust me). For documentation if you dont have anything yet, you can look at netbox (free) or phpipam
hope this helps
had to do this in the turenas cli
how do I move?
adding as alias?
no
also 10.0.0.225 does not work to access anymore after these changes
settings
you need to assign the ip address to the bridge
10.0.0.225?
put something else for now that isn't used, just to regain access to the web interface
then make sure you unassign .225 from the interface, and then change the temporary ip to 225
?
can't browse it for some reason
one sec
nw ๐
nw ?
ok, assign 10.0.0.230/24 to enp0s3, change br1 and remove the member for the moment
you can try this after you've regained access: Set up your main interface with static IP by disabling DHCP and adding IP alias (use the same IP you are connected to for easy results) Test Changes and then Save them (important) Edit your main interface, remove the alias IP Don't click Test Changes Add a bridge, name it something like br0, select your main interface as a member and add the IP alias that you had on main interface Click Apply and then Test Changes It will take longer to apply than just setting static IP, you can even get a screen telling you that your NAS in offline but just wait - worst case scenario TrueNas will revert to old network settings. After 30sec you should see an option to save changes. After you save them you should see both your main interface and new bridge active but bridge should have the IP
so reading up a bit on truenas scale .. they changed things a LOT since I last played with it .. while truescale makes it rather easy to deploy things with some caveat, should work nevertheless
one of the reason why they suggest using the loadbalancer approach is that truenas scale is meant to setup redundancy / clustering and you couldn't easily do that without a loadbalancer in front of it
it seems like the only "proper" way of being able to assign "real" ips to the truenas scale is to switch from the build-in loadbalancer and use the app metallb instead
seems like you can do it via https://www.truenas.com/docs/scale/23.10/scaleuireference/apps/installcustomappscreens/#install-custom-app-screen however you lose the simplicity
Provides information on the Install Custom App screen and configuration settings.
you could also scrap all this and setup a ubuntu server, install docker on it, use docker compose file (or add portainer docker to get web management) and go that route, if you installed truenas just to run the APPS, you'd have less headache going this way, if you need truenas for other purposes, then either split into two servers (truenas and ubuntu server) and be happy
in all cases, all the steps I provided are pretty much valid, so long as you have a working docker/ container of authentik and the right certs
I folllowed the provided steps here
@drifting tree Am I being dumb here. I can't find what have done wrong
remove the br0 interface, reapply the ip to the enp0s3 interface like it was originally
then you'll need to install the metalllb thing and go from there
truenas scale will not allow to make things easy
Have you set the interface for the apps to use in the web ui? If not set it will use any interface and might not route correctly if multiple interfaces are being used. There are a lot of web ui settings that you will want to change most likely. Almost all of TrueNas Scale needs to be configured through the web ui
at this point the apps are not even in question, he doesn't have web ui access
seems like creating the bridge and moving an IP to it broke that (hence the undo)
Sorry I haven't read through this whole thread as it has been pretty active and I haven't been sitting here reading it. lol. But if his main interface is on the network that is assigned by his router, if it is 10.0.0.230/24 then yea, i would assign this to the main interface. I don't have a bridge setup on my truenas scale vm server and apps work fine
or use dhcp temporarily to gain access to web ui again. note the Ip in the console that you are using, navigate to the dhcp address in a browser and set the settings in the web ui.
the biggest objective was to give the apps (authentik for one) a static IP on his 10.0.0.0/24 network
if there are multiple interfaces installed into the truenas vm or machine, then you would want to set (most likely) the apps interface to communicate on.
he wants to use authentik as a SSO for jellyfin and immich (more after) and without a proper public domain having a static IP configured in his adguard with a fake internal domain name would work
again I haven't played with truenas scale recently, but being forced to use nat/pat for the apps is not that great ..
Yea i don't see why that wouldn't work if Adguard or whatever DNS server he is using can resolve that name.
yup .. as long as the root ca is trusted ..
so is there an easy approach to give each apps a dedicated IP on the 10.0.0.0/24 subnet ?
or scale will not really allow that
If he can gain access to truenas scale web ui again, then navigate to Apps > Settings > Advanced Settings and set the Node IP, Route V4 Interface and Gateway
the apps will use which ever interface by default that is defined here.
all I've seen so far was to stop using the internal built-in load balancer and install metallb
so you could give real IPs to apps
I moved away from using authentik on truenas because i couldn't persist the postgres data and went to using docker compose.
couldn't map the proper storage mount point ?
I run my authentik on unraid ... I configured my postgresql server on it's own as I use it for other apps anyway
same with redis
Yes you can give a real ip address to the apps. if the interface has an ip set.
No i couldn't. I would try to force it and it wouldn't write anything to the folders i specified even when using the custom app install method
ok so you dont need to have all APPs use the same IP and use different ports for each of them ..
yes the apps will all use one ip just different ports
the only way around this that i found is by installing a vm on truenas scale with ubuntu server or use proxmox and run truenas in a vm along side multiple other vms. lol
it wouldn't matter much for all the apps to use the same IP if there was a reverse proxy in front looking at host headers and just redirecting ..
setup a caddy server or nginx or your favorite reverse proxy and at least you'd be able to connect to plex.myinternaldomain and sonarr.myinternaldomain without having to remember ports
is what I was refering to
authentik has a transparent reverse proxy built in too.
there's supposed to be an app for that
yeah it does, but it's rather limited
then again he doesn't need letsencrypt automagic since nothing is opened to the internet
I think i saw this when I was looking into a solution for this but I decided to just go a different route, as i think i thought it was too much work. lol. I moved all the apps i could from truenas to docker and kept only what was needed on truenas.
I don't see why authentik couldn't be used just for internal use if just using like the self signed cert in authentik.
all the eggs in the same basket isn't always the best, ... like me running uptime kuma on the server I need to monitor ๐ I have an unused mikrotik router that I might repurpose to run the docker ๐
yup .. as long as he adds the authentik self signed cert to all the required root trusted store .. he should be good .. might be worth regenerating it to last 10 years however
I have 3 proxmox nodes all running individually, and uptime kuma runs on the one that is least powerful and least used. lol
I got some vms and lxc on proxmox running on a small intel NUC, got unraid running on my qnap (flushed the built-in OS) with bunch of dockers and I have a too powerful (and power hungry) server that is turned off that I dont need lol .. only sad thing is that it has 196gb of ram .. far more than my other boxes
Yea i run a pretty power hungry server too. Main proxmox is with 256gb of ram, 2 xeon e5-2690 v4 processors. the other 2 are little hp elitedesks
I have old gen dell r510 maxed out (a pair of the maximum supported cpu was like 50$ on aliexpress at the time) and another dual cpu tyan server (same gen of CPU) .. both are turned off .. the noise and power couldn't be justified by looking at how idle they were
I fool around with wayyy to much shit ๐
same here lol
I'm currently running about 55+ different applications throughout my homelab.
yeah .. sounds like me lol ... started to run out of IPs in some of my /24 lol .. had to install phpipam to scan my subnet so I dont need to hunt for free IPs
lol. I run a unifi network and segregated my networks into different vlans.
gotta have a vlan for my kids so their traffic is forced through adguard, one for my stuff, one for IoT, one for camera, one for docker, one for all my home automation stuff (bunch of esphome, smart switch, bulbs, etc) .. at least all the zigbee and zwave stuff doesn't take network space ๐
I almost have to hire someone to help me ๐
I have a friend who pays me to help with his homelab that he is just starting out with. lol
like drugs :p
lol cash money
If he was that type then most likely but I prefer cash over any other type of payment. ๐
the real system is an i3 gen 12 32 gb ram and 24 tb hdd (12 tb mirror) + 1 tb nvme.
Oh damn you guys haven't had an conversation here
Where you from @drifting tree?
if you don't mind me asking ofc
that's cool
No i started to chime in since I use Truenas Scale and have apps setup successfully.
how about you pick it420
Washington State, USA
Nice.
I was originally going to run Truenas core inside a vm on proxmox but it seemed like a big hassle without an hba.
It is
I don't like passing through indivual hdds as it seems to have issues in Truenas. Passing through an HBA is a lot better.
well you wouldn't like unraid then ๐
I am running TrueNAS bare metal now
No I don't. I tried it and ended up losing about half of my media library because not having correct hdds in the correct spots
and add / remove
doh lol .. whatever you do, backup are needed ..
even if you have everyting in a raid 60
everything*
Lol I have backups now with proxmox and a separate proxmox backup server
I would have my media library backed up, but it is about 60TB and i don't have another server with another 60TB available. So i just backup my Sonarr, Radarr, and Lidarr configs since these hold my media library collections. I also have unlimited internet so if needed, I will re download everything. lol
from truecharts app or custom app, docker image?
idk if it exist in truecharts
I had about 90TB on google before they screwed us .. I switched back to on prem but had to downsize quite a bit sadly
metallb is supposed to be available as an APP
So big
how do you guys have so much to store
Using Google was too slow for me too.
my current synology nas is only 3 tb
Media Hoarder. lol
Version application AppVersion: latest
So should I wait with the bridged interface?
to be honest, I barely saw a difference .. but here I have 1.5down 1.0 up ..
so bw is normally not an issue when it comes to dealing with cloud storage
I've been conditioning my mind over the fact that NOBODY is going to re-watch the 24 first seasons of survivor .. so I started to cut down so I could migrate back ๐
I was seeing a decrease in speed from external connections. Not so much my home network. But I also have gigabit down and 40 up. I think it was just google that was my problem with speed connections. But yea i also moved away when they screwed us over.
still funny that I actually work for Google ๐
but we dont get discount on those services
I pay full price for my youtube premium family plan :/
Thats a little messed up in my eyes. but hey it's Google. lol
How would that work?
with 160k ish employees, if they gave it away to all of us for free, it would nudge their income line lol
Not saying for free, but a discount would be nice. even 10%.
nope.. we get an OK discount on the apparel and google things store
Which part?
nothing to call home about but still ..
I have to run for now .. I'll be back later
nice chatting with yall
Sounds good
This is what my config looks like for the APPS > SETTINGS > ADVANCED SETTINGS
No, it uses a single IP address and different ports
That seems like the default configuration for apps in TrueNAS Scale...?
All the apps in truenas will use a single IP address (if assigned in the pic) or it will use all interfaces available and just pick which one it wants to use.
Which might not be the one you want it to communicate on
The default config for the apps under this screen doesn't have any of this information filled out normally.
I only have one network interface..
so it can't pick another
This is similar to how docker works. You run docker on a single machine which it will share a single IP address. But then you define different ports that the services use to communicate on that single IP address so you can host multiple different apps from a single machine.
or?
For safe reasons, I would still assign the apps this interface.
Yeah, I have use docker before, quite a lot with my raspberry pi
Alright, I'll do that when I get on next time
Same concept with TrueNas Apps. Just slightly different.
@ me if you want faster help. I can send screenshot and walk you through exactly what I did to get Apps working on TrueNas Scale.
But would I not need separate static IP for authentik, to get it to work properly?
No set a single IP for TrueNas Scale and thats it.
If you can access the Truenas Web UI from this IP thats all you need.
But Authentik with immich (Oauth) wasn't working
It could have been because the apps interface wasn't set. This did cause issues with me when first trying to use Authentik, and a single Interface.
Authentik worked, It worked with ldap for jellyfin. but not Oauth
This was my original question, a while back #general message
It shouldn't need a real domain as I have used a private address before when testing it.
Inside TrueNas, you might need or want to set the network global configuration.
It is just this error I recive in immich: error in OAuth discovery: Error: self-signed certificate
set it to what?
Have you tried importing this certificate into Immich to be recognized as the default cert that Authentik creates?
no
ok
How do I do that?
Login to TrueNas Admin Web > Network > Click Settings on the Right side of Global Configuration
Sorry I don't use Immich so I don't know where the certs will be located on that, but In Authentik, you can Navigate to System > Certificates > Expand the authentik Self-Signed Cert > Click Download Certificate and Key > Save each of these into a text document with the file extension as .pem.
Then, theorectically, you should be able to copy these or upload these to the directory that immich uses for certificates. You should be able to rename these the same as the ones Immich currently uses so it will think it's the self signed one that it created and then maybe restart Immich.
This should trick Immich into thinking that the cert is signed by Authentik and not by Immich's self signed.
I'm not exactly sure if this will work or if it will break the login for Immich. If you dont want to go this route, you could try to change the config for Immich to point to the new certs instead of overwriting the originals.
I would also recommend making a backup of the original certs from Immich before overwritting the originals just incase the Self Signed ones from Authentik break the Immich Login page.
Since you are wanting to run this on just a local network with PiHole or Adguard as your DNS, and Authentik is going to be your "Signing Authority" instead of Let's Encrypt or Cloudflare, then in theory you will need this Authentik Self Signed cert on anything you will want OAuth to be working on, and you will also need to select this Authentik Self Signed Cert under any Authentik Provider you Create.
there are no settings for this...?
or a web ui
or access to yaml files
I don't know where this is, google does not give me much
I don't know how much of pure config file trueNAS scale will allow me to edit either
matlab logs:
I mean metallb
There might be a way to config files for apps, not guaranteed to stick after restarting but, if you were to store the data from the app in a truenas pool folder and then share that folder or pool over smb to access it from your pc.
I dont use metallb so I'm not sure about this. I run very basic apps on my truenas that handle media management and thats it. Everything else runs in docker or a vm
maby @drifting tree has an idea here
because I don't think information will stick after restarting in smb as you mentioned
read that in an documentiaion somewhere iirc
I would really like to have dns rewrites or what it is called so I can have auth.mydomain.internal instead of an ip
Yea I found that quite a few apps from TrueCharts don't persist databases without extra work being done. Thats why I moved away from using most apps on Truenas and now just use it as a one time testing platform before trying to install into a vm or docker.
yoo
i got this to work now:
weirdly
I used the same settings before and in the gui
well, idk if it is right tho
does this looks right @grim mason
I am no networking expert
idk what I am doing at this point
should I use traefik?
or caddy, nginx prox
For me, like I said before, I don't have a bridge network attached to my TrueNas Scale VM. I just have 1 interface and that is also attached to the apps.
I don't see why this wouldn't work though if you attach the bridge network to the apps.
That's new to me, I've never had to enable or use that
Seems like I need to use a domain afterall?
It is the easiest way to setup authentik
yeah, that's not news to me lol
Just seem like it was unecceary, when I only run it locally
Yea, if you are just trying to run it locally, then like I also said, you will probably need to find a way to put the Authentik Self Signed cert into any application that you are trying to use for OAuth or SSO.
Yeah, Just need to find that way, which seems hard
That's why I just have most apps on Docker now. TrueNas made it too hard to configure some apps properly or mount certain locations.
I do know that If you had a storage pool on Truenas, then create a Dataset for the apps to live in, I personally created seperate datasets for each App I installed on Truenas with sub-datasets for like the config or whatever else the app needed to mount. Then I would install the app into those directories by choosing to pass through the mount points to these folders. I then shared the parent dataset for these apps over SMB to access from my personal PC. From here, I was able to gain access to whatever the app would install. Sometimes it would have config files, other times it wouldn't
So my apps structure looked something like:
- Apps
- Sonarr
- config
- Radarr
- config
Then I SMB shared the Apps Dataset
I see no reason why authentik wouldnโt work with a fake internal domain
And repeating myself. All you need is for the apps to trust authentik certificate
The flow is simple. The user talks to the target website. The website asks to validate the user. A ticket is granted and the site uses that (hence the trust part) letโs the user go through
I just configured immich with oauth (with an external domain) .. pretty easy .. should be easy without one as well
I was trying to walk him through of trying to get file access to a possible location of where immich stores its self signed certs so he could possibly import the authentik self signed cert so it can be trusted.
I saw something about that
NODE_EXTRA_CA_CERTS=<path to your CA cert file>
if you can add this environment variable to the immich server
hmm
btw you made me discover immich, I've configured it without issues to use my authentik as sso (however I have a public domain), but no reason why what I've mentionned to you wouldn't work
Same here. I started using it now too, and also have sso setup with local ip address, mobile and domain name.
I don't know where this one is located or how I would add it
and Idk where my authentik cert file is located in the file system
try setting it up without a domain...
So the authentik cert that you need to trust in immich can be downloaded directly from authentik web page.
I am aware
but how do I uploade it back to the NAS
and where would it be uploaded too
for immich access
hello again ๐
hi
I am clueless what to do
so step 14 15 16 way above cover that
๐ฆ
put the certificate file somewhere on the nas, make sure that the volume is mounted to the immich application so you can access the certificate from within immich. then configure the environment variable mentioned to trust that certificate
The thing is that, idk if truenas uses docker and if it does I can't successfully edit any environment variables in compose files thingy or similar
I am still clueless, because this is not environment variable for the certificate?
let me configure a VM real quick with truenas to see the menu options
with TrueNAS scale then
in the meantime, save the certificate you got from authentik in an existing (or new one just for that) share on truenas
immich is deploying right now
ok
ok good
that path would be
it'll be a sec, I'm trying to get apps to go pass the deploying status
cert/cert_file.pem
you might need to put a / in front of the mount path .. not sure
and you should use /opt/certdata
Yes, mistake by me
done ๐
Will you try using authentik too?
let me know if I can assit you ๐
wait, are you using metallb?
OK
so the issue right now is that the prebuild app wasn't set to allow inputing any environment variable (I've seen this available by looking at some random other apps in the prebuilt list). It wouldn't stop you from getting into the docker console and adding the necessary variable, however it wont survive an application update
either you live with that, you look at all the settings from this one and create a custom one using the same setting while adding the environment variable or you can get whoever is the truenas immich maintainer to add the option for env variables
this is what's missing:
truecharts does
oh yes, it's an option that you have when you build an app ... however, whoever built this one didn't include it .. so they'd have to change it
Okay
why did you say you picked truenas scale as your choice ?
because I thought it would be a good software for NAS and some apps
Not really
now unraid is a beast on it's own .. the way it handles data / raid is quite different, however it allows you to mix and match any size hard drive and still have redundancy. Openmediavault is pretty decent and runs on top of a normal linux debian backend and if you add the openmediavault addons you can use normal dockers
freenas is a bit more out there in terms of UI and device support because it runs on freebsd
unraid however isn't free. This is what I use, but I've played with OMV also
Is this correctly done?
did you do /opt/certdata earlier or /opt ? (just make sure that matches)
and it wont harm anything to try
I mounted the cert to /opt/cert
dont give up.. you are almost there
auth.whateveryouused should be resolvable by immich. make sure it's the case (you should be able to open a shell prompt to validate).
Yay!
@grim mason you familiar with NC?
Look at my gitlab for the documentation I have. But it does work with that.
Lazy Media's Public Gitlab Files
From your pic, uncheck unique user id, and check the box for group provisioning, then fill in groups in the scope for groups above the check boxes
Have you also looked at the authentik documentation for that?
yeah
and there is supposedly nothing wrong with reaching the domain for nextcloud. if there is no other setting in nextcloud idk.
Do you have https enabled/forced for nextcloud in your nextcloud config?
Are you also using the custom scope mapping provided by authentik? If so you don't have that in nextcloud scopes.
also, just to make double sure, I see the discovery endpoint has nextcloud as the slug, do you also have a standard application and provider that points to nextcloud with the same slug? it could be an issue but not exactly sure. For me personally, when I create a standard application and provider, i will input the slug as the name of the application, and when creating an oauth provider, i make the slug the name of the app followed by -oauth just to keep things smooth and easy to remember and to not have Authentik try to communicate on the wrong endpoints.
And from the pic for your nextcloud setup, it doesn't look like you actually have any scopes filled in, it looks like it is empty with a placeholder for what should be input there. But maybe it's just the picture.
don't think so
Enable or force ssl using those instructions. The authentik docs note this too.
Haha, yea I am a part of that server too so I did see it.
So you are using this on truenas. Do you have access to the config folder via SMB? If you installed it to the ix-systems or default config path, you should change this to its own dataset and try to smb share it so you can access it. You might have to spin down nextcloud, change permissions to your user, access via smb, edit the config.php file, change permissions back to www-data or whatever user and group it gets assigned, and then start nextcloud again.
@thorn leaf
Oh no
the hdd constantly sound
Just being funny, but don't they usually make sound when powered on? Lol. But I understand what you are saying. Time to replace a hdd. I have one thats dying on me in my TrueNas server too but its also a WD hdd instead of Seagate.
This is the sound
listen to it fully as it's not constantly constantly sounding constantly
To me it sounds like a dying hdd or the reader head got stuck inside...but it is a little hard to hear it. Did truenas show any errors?
That doesn't sound good though. Playing it through my phone I could hear it better.
ni
no
dying hdd after 2 months of usage?
It's possible. I've had hdds dead on arrival
Yes the manufacturer warranty should cover it. You could also try to power down the server, or take out the hdd in question and toss it into your personal pc and run some tests on it, or maybe install Scrutiny on to truenas, but this gives more detailed SMART results, doesn't do anything else. If your pool is sufficient to run without the hdd in question, obviously in a degraded state, you could try to pull the hdd, format it on your personal pc and then replace it with the same disk in truenas. when you format it on your personal pc, it should show up as a new drive in Truenas, and then just choose Replace.
For me, I only know I have a failing HDD because Truenas shows 1 disk with an error and the error count increases. But I honestly don't think it's my hdd that's failing. I think it has to do with HBA or the backplane that is in the hdd bays.
oh ok
hard disk either last a few weeks/months, or they last 5+ years
I already had that enabled
@grim mason ๐
How do I fix nextcloud Oauth );
maby this helps:
in nextcloud logs
Are using the scope mapping not that is provided by authenik?
I would still enable the group provisioning and type group in the attributes box
You also shouldn't need any extra attribute mappings
I use what is here, I did not create anything other custom for groups or scopes as I do not require storage quotas. ( as it said in the authentik setup guide afaik )
I don't see how changing those would help solving "discvoery enpoint not reachable"
I belive there is some network setting in nextcloud that is stopping it
specifically dns
But I did test the reachabilty of authentik using the pods shell and it was successful
or perhaps could it be that I need to add the authentik domain to trusted domains
no fucking way I got seafile to work with Oauth after many tries
Is this picture for the nextcloud oauth provider above it? If so, do you have another provider for nextcloud with the same slug?? You should have 2 applications and 2 providers, 1 for nextcloud to route correctly, and 1 for the oauth.
I also now see that the authentication flow is enabled in the pic above too. I usually don't have that set.
the two picture I sent is the nextcloud Oauth provider (upper one) and then the nextcloud application (lower one)
Do you have your reverse proxy allowed in nextcloud config file?
I don't know
I was never told to do something like that in the authentik guide
was I?
Not that I know of but its something I found in the nextcloud docs.
I saw it too but I ignored it as It has worked without any issues on immich
Maby I should take a look at it
Let me do that
sorry
Yea nextcloud is more robust and security happy from what I could tell so you need to tell nextcloud everything that is allowed to it.
No need to be sorry. We are all here to help each other.
I had to add the trusted proxies to nextcloud before I could get it to work
I am using traeifk but I can't understand where I am supposed to add these:
Wait
I asked somone in truecharts and they said those were already baked into helm
It shouldn't be in traefik, it would be in your nextcloud config file.
It would be a command something like this:
nextcloud.occ config:system:set trusted_proxies 0 --value=auth.domain.example
It show up as an array in the nextcloud config.
I can send you an example of what my config looks like in nextcloud so you can compare. Just give a little bit to get back to my computer
So in my nextcloud config file, even when I had it on TrueNas, I had to add these to it to get Authentik to work correctly, this is also when I tried a different authentication method, SAML, other than OpenID
Trusted Domains = IP address or domain name for Nextcloud
Trusted Proxies = IP address or domain name for Authentik
Not sure if the forwarded for headers is required but I have it there.
'trusted_domains' =>
array (
0 => '127.0.0.1',
1 => '192.168.1.20',
2 => 'nextcloud.domain.example',
),
'trusted_proxies' =>
array (
0 => '192.168.1.10',
1 => 'auth.domain.example',
),
'forwarded_for_headers' =>
array (
0 => 'HTTP_X_FORWARDED',
1 => 'HTTP_FORWARDED_FOR',
),
my proxy is not auth.domain.tld
Tha's fine, just change accordingly
does your proxy run on auth....?
yes
so ngninx runs on the domain auth.domain.tld?
I only run Authentik as my proxy so i have a CNAME set for auth.mydomain.example that points directly to Authentik