* feat(mobile): drift archive page
* fix: lint
* feat: include local indicator
* remove join in bucket
* remove showing local indicator in bucket
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
Co-authored-by: alex <alex@localhost-live.localdomain>
* reduce timeline rebuilds
* feat: adds bottom sheet map and actions (#19692)
* adds bottom sheet map and actions
* PR feedbacks
* only reload the asset viewer if asset is changed
* styling tweak
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* rename singleton and remove event prefix
* adds bottom sheet map and actions
* PR feedbacks
* refactor: use provider for viewer state
* feat: adds top and bottom app bar
* add safe area to bottom app bar
* change app and bottom bar color
* viewer - always have black background
* use the full width for the bottom sheet on landscape as well
* constraint the bottom sheet to not expand all the way
* add padding for location details in landscape
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* add full image provider and refactor thumb providers
* photo_view updates
* wip: asset-viewer
* fix controller dispose on page change
* wip: bottom sheet
* fix interactions
* more bottomsheet changes
* generate schema
* PR feedback
* refactor asset viewer
* never rotate and fix background on page change
* use photoview as the loading builder
* precache after delay
* claude: optimizing rebuild of image provider
* claude: optimizing image decoding and caching
* use proper cache for new full size image providers
* chore: load local HEIC fullsize for iOS
* make controller callbacks nullable
* remove imageprovider cache
* do not handle drag gestures when zoomed
* use loadOriginal setting for HEIC / larger images
* preload assets outside timer
* never use same controllers in photo-view gallery
* fix: cannot scroll down once swipe with bottom sheet
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* feat(server): check additional exif date tags
- Add support for UTC date tags (GPSDateTime, DateTimeUTC, GPSDateStamp, SonyDateTime2)
- This matches tags that exiftool-vendored uses for tzSource in extractTzOffsetFromUTCOffset()
* Review comments
* nit
* review comments
* lots of tests for exif datetime
* missed
* format
* format again
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* feat(mobile): add album asset sync
* add SyncAlbumToAssetDeleteV1 to openapi-spec
* update delete queries to use where in statements
* clear remote album when clear remote data
* fix: bad merge
* fix: bad merge
* fix: _SyncAckV1 return type
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: wuzihao051119 <wuzihao051119@outlook.com>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
wip: fix album asset exif and some other refactorings
feat: add album assets sync
feat: album to assets relation sync
Co-authored-by: Zack Pollard <zackpollard@ymail.com>
* feat: sliver appbar
* feat: snapping segment
* Date label font size
* lint
* fix: scrollController reinitialize multiple times
* feat: tab navigation
* chore: refactor to private widget
* feat: new control bottom app bar
* bad merge
* feat: sliver control bottom app bar
Exit slideshow when exiting fullscreen.
Browsers do not send a keyboard event when exiting fullscreen, so if
the user exits fullscreen with the escape key, the slideshow
remains open, requiring another escape key press to close it. Fix this
by listening for the fullscreenchange event and closing the slideshow
when exiting fullscreen.
* fix: devcontainer perms
* Fix host based auth
* use path tricks to get to volume mount, but remain compat with current meaning of variables
* eureka, i think
* bit of cleanup
* feat: working widgets
* chore/feat: cleaned up API, added album picker to random widget
* album filtering for requests
* check album and throw if not found
* fix app IDs and project configuration
* switch to repository/service model for updating widgets
* fix: remove home widget import
* revert info.plist formatting changes
* ran swift-format on widget code
* more formatting changes (this time run from xcode)
* show memory on widget picker snapshot
* fix: dart changes from code review
* fix: swift code review changes (not including task groups)
* fix: use task groups to run image retrievals concurrently, get rid of do catch in favor of if let
* chore: cleanup widget service in dart app
* chore: format swift
* fix: remove comma
why does xcode not freak out over this >:(
* switch to preview size for thumbnail
* chore: cropped large image
* fix: properly resize widgets so we dont OOM
* fix: set app group on logout
happens on first install
* fix: stupid app ids
* fix: revert back to thumbnail
we are hitting OOM exceptions due to resizing, once we have on-the-fly resizing on server this can be upgraded
* fix: more memory efficient resizing method, remove extraneous resize commands from API call
* fix: random widget use 12 entries instead of 24 to save memory
* fix: modify duration of entries to 20 minutes and only generate 10 at a time to avoid OOM
* feat: toggle to show album name on random widget
* Podfile lock
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* - create constants for thet asset-viewer stack thumbnail sizes
- use 2x selected thumbnail size to set the max-height of the stack-slideshow container.
* - increase the stack-slideshow max-height as it's scrolled
* Revert "- increase the stack-slideshow max-height as it's scrolled"
This reverts commit da4614547a.
* change asset stack veritcal scroll to horizontal scroll
* Fix fade in for video-native-viewer.
The previous implementation never actually faded in the video element.
Fix this by ensuring the video element is only added to the DOM after
mounting, so Svelte can handle the fade-in transition correctly.
* Refactor asset viewing in memory page.
Split photo and video viewing into separate components to ensure they
work similarly to the assets viewer. The previous implementation faded
out the assets, while the assets-viewer only fades assets in. For
images, add a spinner while waiting for the image to load, before adding
the image to the DOM. For videos, add the video to the DOM after
mounting the component. In both cases, the assets fade in smoothly, like
the regular assets viewer.
* fix: styling
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* re-write localization service and add translation extension
* Revert "re-write localization service and add translation extension"
This reverts commit fdd7386020.
* fix can't use context for easy_localization
* fix lint
* update new translate context
* handle context null
* revert main file
* Revert "revert main file"
This reverts commit 16faca46d0.
* remove fix nested MaterialApp
* change use t extenstion and remove translation utils
* update function call similar for consistently
---------
Co-authored-by: dvbthien <dvbthien@gmail.com>
* Match fade transition timing between photo-viewer and memory-viewer.
* Fix blank page after refreshing memory page.
If the user refreshed in the browser while on the memory page, the page
would show a blank page. This was caused by skipping initialization in
afterNavigate. Fix by always initializing the memory page in
afterNavigate.
* WIP: adding screen reader support to mobile
* implemented getAltText
* implemented alt text solution that stores the alt text in the DB, which isn't really great
* moved alt text computation to immich_thumbnail.dart
* added unit tests
* revert unintended changes
* Added text to remaining buttons in Photo page
* fixed import
* Fixed issue of easy_localization not parsing select blocks
* Transferred the new screen reader help to web frontend
* remove unused property
* npm run format:fix
* code review
* revert unwanted change
* dart fmt
* revert web changes
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
* Update synology.md
Make sure to change example.env to .env, this is not trivial for non-Docker experts.
* Update synology.md
Wrapped file names in code tags
* chore: linting
---------
Co-authored-by: Jason Rasmussen <jason@rasm.me>
* feat(mobile): Add Scrollbar for vertical scrolling on the actions button of a selected asset.
* fixed error scroll position and add more space for the scrollbar
* revert scrollbar change and display always 5.5 icons button
* minWidth set to 5.5 and used
* fix: logic and fine tuning
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* refactor: timeline manager renames
* refactor(web): improve timeline manager naming consistency
- Rename AddContext → GroupInsertionCache for clearer purpose
- Rename TimelineDay → DayGroup for better clarity
- Rename TimelineMonth → MonthGroup for better clarity
- Replace all "bucket" references with "monthGroup" terminology
- Update all component props, method names, and variable references
- Maintain consistent naming patterns across TypeScript and Svelte files
* refactor(web): rename buckets to months in timeline manager
- Rename TimelineManager.buckets property to months
- Update all store.buckets references to store.months
- Use 'month' shorthand for monthGroup arguments (not method names)
- Update component templates and test files for consistency
- Maintain API-related 'bucket' terminology (bucketHeight, getTimeBucket)
* refactor(web): rename assetStore to timelineManager and update types
- Rename assetStore variables to timelineManager in all .svelte files
- Update parameter names in actions.ts and asset-utils.ts functions
- Rename AssetStoreLayoutOptions to TimelineManagerLayoutOptions
- Rename AssetStoreOptions to TimelineManagerOptions
- Move assets-store.spec.ts to timeline-manager.spec.ts
* refactor(web): rename intersectingAssets to viewerAssets and fix property references
- Rename intersectingAssets to viewerAssets in DayGroup and MonthGroup classes
- Update arrow function parameters to use viewerAsset/viewAsset shorthand
- Rename topIntersectingBucket to topIntersectingMonthGroup
- Fix dateGroups references to dayGroups in asset-utils.ts and album page
- Update template loops and variable names in Svelte components
* refactor(web): rename #initializeTimeBuckets to #initializeMonthGroups and bucketDateFormatted to monthGroupTitle
* refactor(web): rename monthGroupHeight to height
* refactor(web): rename bucketCount to assetsCount, bucketsIterator to monthGroupIterator, and related properties
* refactor(web): rename count to assetCount in TimelineManager
* refactor(web): rename LiteBucket to ScrubberMonth and update scrubber variables
- Rename LiteBucket type to ScrubberMonth
- Rename bucketDateFormattted to title in ScrubberMonth type
- Rename bucketPercentY to monthGroupPercentY in scrubber component
- Rename scrubBucket to scrubberMonth and scrubBucketPercent to scrubberMonthPercent
* fix remaining refs to bucket
* reset submodule to correct commit
* reset submodule to correct commit
* refactor(web): extract TimelineManager internals into separate modules
- Move search-related functions to internal/search-support.svelte.ts
- Extract websocket event handling into WebsocketSupport class
- Move utility functions (updateObject, isMismatched) to internal/utils.svelte.ts
- Update imports in tests to use new module structure
* refactor(web): extract intersection logic from TimelineManager
- Create intersection-support.svelte.ts with updateIntersection and calculateIntersecting functions
- Remove private intersection methods from TimelineManager
- Export findMonthGroupForAsset from search-support for reuse
- Update TimelineManager to use the extracted intersection functions
* refactor(web): rename a few methods in intersecting
* refactor(web): rename a few methods in intersecting
* refactor(web): extract layout logic from TimelineManager
- Create layout-support.svelte.ts with updateGeometry and layoutMonthGroup functions
- Remove private layout methods from TimelineManager
- Update TimelineManager to use the extracted layout functions
- Remove unused UpdateGeometryOptions import
* refactor(web): extract asset operations from TimelineManager
- Create operations-support.svelte.ts with addAssetsToMonthGroups and runAssetOperation functions
- Remove private asset operation methods from TimelineManager
- Update TimelineManager to use extracted operation functions with proper AssetOrder handling
- Rename getMonthGroupIndexByAssetId to getMonthGroupByAssetId for consistency
- Move utility functions from utils.svelte.ts to internal/utils.svelte.ts
- Fix method name references in asset-grid.svelte and tests
* refactor(web): extract loading logic from TimelineManager
- Create load-support.svelte.ts with loadFromTimeBuckets function
- Extract time bucket loading, album asset handling, and error logging
- Simplify TimelineManager's loadMonthGroup method to use extracted function
* refresh timeline after archive keyboard shortcut
* remove debugger
* rename
* Review comments - remove shadowed var
* reduce indents - early return
* review comment
* refactor: simplify asset filtering in addAssets method
Replace for loop with filter operation for better readability
* fix: bad merge
* refactor(web): simplify timeline layout algorithm
- Replace rowSpaceRemaining array with direct cumulative width tracking
- Invert logic from tracking remaining space to tracking used space
- Fix spelling: cummulative to cumulative
- Rename lastRowHeight to currentRowHeight for clarity
- Remove confusing lastRow variable and simplify final height calculation
- Add explanatory comments for clarity
- Rename loop variable assetGroup to dayGroup for consistency
* simplify assetsIterator usage
* merge/lint
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
The first step was missing—it's probably obvious for those already
familiar with Immich.
After I added the external library, no photos showed up anywhere and
all interfaces indicated that I had no photos
Eventually I found this "Scan" button, and after clicking it photos
started to appear. This is a necessary step before photos from the
library actually show up anywhere, so point it out explicitly.
* - updated dtos
- added inAlbums to search builder
- only check isNotInAlbum if albumIds is blank/empty
* - consider inAlbums as OR
* - make open-api-dart
* - lint & format
* - remove inAlbums groupBy clause
* - merge main open-api
* - make open-api
* - inAlbums filter AND instead of OR
* fix handling historical timezones in web client
* honor dst when calculating the timezone offset
* fix variable used to construct timezones list to honor dst
* remove unused variable. fix lint
* initial cast framework complete and mocked cast dialog working
* wip casting
* casting works!
just need to add session key check and remote video controls
* cleanup of classes
* add session expiration checks
* cast dialog now shows connected device at top of list with a list header. Discovered devices are also cached for app session.
* cast video player finalized
* show fullsize assets on casting
* translation already happens on the text element
* remove prints
* fix lintings
* code review changes from @shenlong-tanwen
* fix connect method override
* fix alphabetization
* remove important
* filter chromecast audio devices
* fix some disconnect command ordering issues and unawaited futures
* remove prints
* only disconnect if we are connected
* don't try to reconnect if its the current device
* add cast button to top bar
* format sessions api
* more formatting issues fixed
* add snack bar to tell user that we cannot cast an asset that is not uploaded to server
* make casting icon change to primary color when casting is active
* only show casting snackbar if we are casting
* dont show cast button if asset is remote and we are not casting
* stop playing media if we seek to an asset that is not remote
* remove https check since it works with local http IP addresses
* remove unneeded imports
* fix recasting when socket closes
* fix info plist formatting
* only show cast button if there is an active websocket connection (ie the server is accessible)
* add device capability bitmask checks
* small comment about bitmask
* - Add set primary primary asset button to asset viewer
* - Cleanup
- change AssetAction to contain a StackResponseDto
- Properly update displayed stack at bottom of the asset viewer
* - update the assetStore with the changed stack
* - Cleanup
* fix(mobile): remove dialog wrapper around share asset
* removed from multiple share and delete share dialog class
* Revert change to ShareDialog and useRootNavigator: false for showDialog
* Add a user setting for default album sort order.
Add a user setting under "Features" to control the initial sort order
when creating an album. Default to the existing behavior of
"newest first".
* chore: patch openapi
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix: regression: sort day by fileCreatedAt again
* lint
* e2e test
* inline function
* e2e
* Address comments. Drop dayGroup and timezone in favor of localOffsetMinutes
* lint and some api-doc
* lint, more api-doc
* format
* Move minutes to fractional hours
* make sql
* merge/conflict
* merge fallout, review comments
* spelling
* drop offset from returned date
* move description into decorator where possible, regen api
* refactor: asset-store
* Potential fix for code scanning alert no. 152: Prototype-polluting function
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* feat: display number of likes
* fix: properly decrement like count on unlike
Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
* chore: pr feedback
* chore: updated related test
* chore: formatter run
* chore: force numberOfLikes to null in album context to pass lint
* chore: open-api updated
* fix: use undefined, not null
* styling tweaks
* chore: updated sql
---------
Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
* feat(mobile): add album description functionality
- Introduced a new optional `description` field in the `Album` entity.
- Updated `AlbumViewerPageState` to manage `editDescriptionText`.
- Created `AlbumDescription` and `AlbumViewerEditableDescription` widgets for displaying and editing album descriptions.
- Enhanced `CreateAlbumPage` to include a description input field.
- Implemented backend support for updating album descriptions in `AlbumApiRepository` and `AlbumService`.
- Updated sync logic to handle album descriptions during data synchronization.
- Adjusted UI components to accommodate the new description feature.
* fix dart analysis error
* remove comment that shouldn't be there
* Album header styling
* fix: disable edit after album creation
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* feat(mobile): add bulk download functionality and update UI messages
- Added `downloadAll` method to `IDownloadRepository` and its implementation in `DownloadRepository` to handle multiple asset downloads.
- Implemented `downloadAllAsset` in `DownloadStateNotifier` to trigger bulk downloads.
- Updated `DownloadService` to create download tasks for all selected assets.
- Enhanced UI with new download success and failure messages in `en.json`.
- Added download button to `ControlBottomAppBar` and integrated download functionality in `MultiselectGrid`.
* translations use i18n method t()
* Update mobile/lib/services/download.service.dart
Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>
* fix(mobile): update download logic in DownloadService
- Changed the download method to utilize downloadAll for handling multiple tasks.
- Simplified remoteId check by removing unnecessary condition.
* sort i18n keys
* remove the download signature from interface and logic as we use the downloadAll now
---------
Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>
fix(mobile): prevent upload intent replacement in splash screen
- Added a check in the SplashScreenPage to ensure that the route is only replaced when it's not a share intent
- Added lifecycle event to reset the isUpload.value when minimize the app
* improve language ui
* fix lint
* add search language, add safe area, fix button in dark
* hide apply button when search not found
---------
Co-authored-by: dvbthien <dvbthien@gmail.com>
* wip
* added user metadata key
* wip
* restructure onboarding system and add initial locale
* update language card and fix translation updating
* remove prints
* new card formattings
* fix cursed unmount effect
* add OAuth route onboarding
* remove required admin auth for onboarding
* delete the hotwire button
* update open-api files
* delete import
* fix failing oauth onboarding fields
* fix e2e test
* fix web e2e test
* add onboarding to user registration e2e test
* remove todo
this was a holdover during dev and didn't get deleted
* fix server small tests
* use onDestroy to save settings rather than a bind:this
* change to false for isOnboarded
* fix other auth small test
* provide type annotation in user factory metadata field
* remove onboardingCompelted from UserDto
* move translations to onboarding steps array and mark as derived so they update
* break language selector out into its own component as per @danieldietzler suggestion
* remove hello header on card
* fix flixkering on server privacy card
* label/id fixes
* openapi
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
* remove import and referenced file
* first pass at replacing all CircleIconButtons
* fix linting issues
* fix combobox formatting issues
* fix button context menu coloring
* remove circle icon button from search history box
* use theme switcher from UI lib
* dark mode force the asset viewer icons
* fix forced dark mode icons
* dark mode memory viewer icons
* fix: back button in memory viewer
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Add a new setting to toggle autoplay when showing the slideshow.
* Fix an issue where the slideshow would restart automatically when
navigating after it was paused.
* Add a keyboard shortcut 's' to start the slideshow from the asset
viewer.
* Add a keyboard shortcut ' ' to toggle the slideshow play/paused.
* Change the timeout for hiding the slideshow controls from 10 to 2.5
seconds.
* Add English translation for the 'autoplay_slideshow' setting.
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Fix an issue where clicking the zoom-button after having zoomed in
would not zoom completely out, but leave the image in the zoomed-in
state. The new behavior properly zoomes the image completely out after
clicking the zoom-button.
* Revert to the default setting for `wheelZoomRatio` as the previous
setting of 0.2 was borderline unusable on a trackpad. This could
probably be moved to a user setting if needed.
* Add a keyboard shortcut 'z' to toggle image zoom.
* fix(docs): update the cli upload usage
The cli upload usage is missing some options compared to what is the current
output of `immich upload --help`. Update the docs accordingly.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
* feat(cli): add --json-output option to upload command
Add an option that allows retrieving per-file information about the
upload process. The output includes the newFiles, duplicates and
newAssets lists, but could accommodate more information later if needed.
One use case this allows for is using --dry-run to get a list of all the
files that would be uploaded, and checking them manually before an
upload. This can be particularly useful when a curated subset of images
have already been uploaded to immich and we want to double check for
some stragglers without uploading everything to immich.
The upload command has a few lines of logging, so to get an actually
parsable json one needs to strip those lines:
immich upload --dry-run * | tail -n +4 | jq .newFiles[]
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
---------
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
* Add automatic OpenID Connect login by using parameter `autoLaunch=1`
By launching Immich with `/auth/login?autoLaunch=1` an OpenID Connect login attempt is directly initated on installations where OAuth Auto Launch is not enabled. The intended use for this parameter is to enable Immich to be launched from e.g. Nextcloud using the _External sites_ app and the _oids_ OpenID Connect provider app so as to enable the user to directly interact with Immich without the need to press the `Login with ...` button.
* Add documentation for autolaunch by navigating to `/auth/login?autoLaunch=1`
* Look ma, no braces!
_This could be a single line_
And now it is, as is its predecessor.
* Change formatting to satisfy _prettier_
* if (condition) return true -> return condition
* More _prettier_ reformatting
* Look ma, braces!
* Update locked folder text and remove unused translations
* uppercase Locked folder in Menu
* convert some translates to icu and improve
* add iOS debug info translations for background processes
* fix lint
---------
Co-authored-by: dvbthien <dvbthien@gmail.com>
* feat: delta sync
* fix: ignore iCloud assets
* feat: dev logs
* add full sync button
* remove photo_manager dep for sync
* misc logs and fix
* add time taken to DLog
* fix: build release iOS
* ios sync go brrr
* rename local sync service
* update isar fork
* rename to platform assets / albums
* fix ci check
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Change photo zoom logic
To properly zoom to current position and pan at the correct speed
TODO: zoom to current pinch position
* zoom to current pinch position
* Clean unused variable
* Formatting
* fix: lint
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* add setting switch
this isnt bound to anything yet
* make google casting opt-in
* doc updates
* lint docs
* remove unneeded translation items
* update mobile openai defs
* fix failing test
we need to mock user prefs since CastButton uses it
* feat: api access control
* feat(web): granular api access controls
* fix test
* fix e2e test
* fix: lint
* pr feedback
* merge main + new design
* finalize styling
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* move support & feedback button to user modal
* cleanup styling of link
* update sign out button to use immich/ui
* revise sign out button to match design from @alextran1502
* more margin on support/feedback
* feat(web): add to locked folder in album and search
* feat(web): add to locked folder in favorite and archive
* fix: lint
* feat: add to person page
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* recreate #13966
* gcast button works
* rewrote gcast-player to be GCastDestination and CastManager manages the interface between UI and casting destinations
* remove unneeded imports
* add "Connected to" translation
* Remove css for cast launcher
* fix tests
* fix doc tests
* fix the receiver application ID
* remove casting app ID
* remove cast button from nav bar
It is now present at the following locations:
- shared link album and single asset views
- asset viewer (normal user)
- album view (normal user)
* part 1 of fixes from @danieldietzler code review
* part 2 of code review changes from @danieldietzler and @jsram91
* cleanup documentation
* onVideoStarted missing callback
* add token expiry validation
* cleanup logic and logging
* small cleanup
* rename to ICastDestination
* cast button changes
* Add class to apply SSL options
* Apply client certificate for native Android code
* Refactor self-signed check
* Allow self-signed certificates
* Fix Dart analysis
* Add HostnameVerifier
Android explicitly does NOT check the Common Name of a certificate,
only the Subject Alt Names. Chances are that someone who self-signs a
certificate doesn't go through the extra steps to add a SAN, and in
that case the connection would be prevented by the HostnameVerifier
even thought the TrustManager was fine with the certificate itself.
* Rename parameter like in Dart
* Fix NPE
* Catch all native errors in HttpSSLOptionsPlugin
* Workaround for too early onChanged() callback
* Fix formatting
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* more robust person thumbnail generation
* clamp bounding boxes
* update sql
* no need to process invalid images after decoding
* cursed knowledge
* new line
* feat: private view
* pr feedback
* sql generation
* feat: visibility column
* fix: set visibility value as the same as the still part after unlinked live photos
* fix: test
* pr feedback
* Transform imported face RegionInfo according to Exif Orientation
* Add unit tests for re-orienting metadata face regions
* Make code DRY using ImmichTagsWithFaces instead of NonNullable
* Add e2e test for importing metadata face regions when orientation is RotateCW90
* Disable new e2e test until its asset is added to the test-assets project
* Simplify unit tests by using the same face tag definition
* Combine similar e2e tests
* Disable new e2e test until portrait-orientation-6.jpg is added to test-assets
* Fix lint error: Expected property shorthand
* Update test-assets ref to latest
* Enable new e2e test after updating test-assets
* add btn, map and marker
* Fix bug in navigation assetviewer
* Correct bug on main Viewer
* Add to user album the map of his pictures
* change icon to outline
* lint & format
* with manager instead of variable
* remove duplicate
* chore: minor styling change
* formatting
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
We would like to move away from the concept of finding and removing pending
jobs. The only place this is used is for album update notifications, and this
is done so that users who initially uploaded assets to an album will also
receive a notification if someone else then adds assets to the same album. This
can also be achieved with a job for each recipient. Multiple jobs also has the
advantage that it will scale better for albums with many users, it's possible
to send notifications concurrently, retries are possible without sending
duplicate notifications, and it's clear what recipient a job failed for.
* chore(server): don't insert embeddings if the model has changed
We're moving away from the heuristic of waiting for queues to complete. The job
which inserts embeddings can simply check if the model has changed before
inserting, rather than attempting to lock the queue.
* more robust dim size update
* use check constraint
* index command cleanup
* add create statement
* update medium test, create appropriate extension
* new line
* set dimension size when running on all assets
* why does it want braces smh
* take 2
---------
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
* feat: responsive date group header height
* update tests
* feat(web): improve perf when changing mobile orientation (#17945)
fix: improve perf when changing mobile orientation
* feat: Create .well-known/security.txt
* feat: Add another security.txt for the main website
* fix: deploy hidden files
---------
Co-authored-by: Jason Rasmussen <jason@rasm.me>
* feat: Service Worker to preload/cancel images and other resources
* Remove caddy configuration, localhost is secure if port-forwarded
* fix e2e tests
* Cache/return the app.html for all web entry points
* Only handle preload/cancel
* fix e2e
* fix e2e
* e2e-2
* that'll do it
* format
* fix test
* lint
* refactor common code to conditionals
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fixed missing $locale parameter to .toLocaleString
* Remove unused types and functions in timeline-util
* remove unused export
* re-enable export because it is needed for tests
* format
* bump sharp
* test linking
* link in prod image too
* force global
* keep unnecessary libraries
* override sharp version
* revert dockerfile changes
* add node-gyp and napi
* dev dependency
* Remove small thumbnail and cache generated thumbnails
* Creating the small thumbnails takes quite some time, which should not be underestimated.
* The time needed to generate the small or big thumbnail is not too different from each other. Therefore there is no real benefit of the small thumbnail and it only adds frustration to the end user experience. That is because the image appeared to have loaded (the visual move from blur to something better) but it's still so bad that it is basically a blur. The better solution is therefore to stay at the blur until the actual thumbnail has loaded.
* Additionaly to the faster generation of the thumbnail, it now also gets cached similarly to the remote thumbnail which already gets cached. This further speeds up the all over usage of the app and prevents a repeatet thumbnail generation when opening the app.
* Decreased the quality from the default 95 to 80 to provide similar quality with much reduces thumbnail size.
* Use try catch around the read of the cache file.
* Use the key provided in the loadImage method instead of the asset of the constructor.
* Use userId instead of ownerId
* Remove import
* Add checksum to thumbnail cache key
Job workers are currently started on app init, which means they are started
before the DB is initialised. This can be problematic if jobs which need to use
the DB start running before it's ready. It also means that swapping out the
queue implementation for something which uses the DB won't work.
* fix: ensure oauth state param matches before finishing oauth flow
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* chore: upgrade openid-client to v6
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* feat: use PKCE for oauth2 on supported clients
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* feat: use state and PKCE in mobile app
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: remove obsolete oauth repository init
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: rewrite callback url if mobile redirect url is enabled
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: propagate oidc client error cause when oauth callback fails
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: adapt auth service tests to required state and PKCE params
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: update sdk types
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: adapt oauth e2e test to work with PKCE
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: allow insecure (http) oauth clients
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
---------
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
Co-authored-by: Jason Rasmussen <jason@rasm.me>
Remove loading of thumbnail in the image provider
* Removed the load of the thumbnail from the local and remote image provider as they shall provide the image, not the thumbnail. The thumbnail gets provided by the thumbnail provider.
* The thumbnail provider is used as the loadingBuilder and the image provider as the imageProvider. Therefore loading the thumbnail in the image provider loads it a second time which is completely redundant, uses precious time and yields no results.
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Revert "fix(mobile): use immutable cache keys for local images (#17736)"
This reverts commit 010b144754.
* Revert "perf(mobile): remove small thumbnail and cache generated thumbnails (#17682)"
This reverts commit b71039e83c.
* Remove small thumbnail and cache generated thumbnails
* Creating the small thumbnails takes quite some time, which should not be underestimated.
* The time needed to generate the small or big thumbnail is not too different from each other. Therefore there is no real benefit of the small thumbnail and it only adds frustration to the end user experience. That is because the image appeared to have loaded (the visual move from blur to something better) but it's still so bad that it is basically a blur. The better solution is therefore to stay at the blur until the actual thumbnail has loaded.
* Additionaly to the faster generation of the thumbnail, it now also gets cached similarly to the remote thumbnail which already gets cached. This further speeds up the all over usage of the app and prevents a repeatet thumbnail generation when opening the app.
* Decrease quality and use try catch
* Decreased the quality from the default 95 to 80 to provide similar quality with much reduces thumbnail size.
* Use try catch around the read of the cache file.
* Replace ImmutableBuffer.fromUint8List with ImmutableBuffer.fromFilePath
* Removed unnecessary comment
* Replace debugPrint with log.severe for catch of error
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* refactor: user entity
* chore: rebase fixes
* refactor: remove int user Id
* refactor: migrate store userId from int to string
* refactor: rename uid to id
* feat: drift
* pr feedback
* refactor: move common overrides to mixin
* refactor: remove int user Id
* refactor: migrate store userId from int to string
* refactor: rename uid to id
* feat: user & partner sync stream
* pr changes
* refactor: sync service and add tests
* chore: remove generated change
* chore: move sync model
* rebase: convert string ids to byte uuids
* rebase
* add processing logs
* batch db calls
* rewrite isolate manager
* rewrite with worker_manager
* misc fixes
* add sync order test
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
Clear the backup detail view when no backup is in progress
* When no backup is in progress, display a simple "-" for the details in the upload file info, instead of the data of the last uploaded asset.
* This prevents confusion if a upload job is stuck or just finished.
* perf(mobile): optimize date loading with batch loading
Introduce DateBatchLoader to reduce the number of database queries by loading dates in batches, improving performance when querying large lists.
* remove unused totalCount parameter from DateBatchLoader
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
Dont show drag scroll date in search page
* When using the drag scroll, the date of the current image is shown. This is now made toggleable.
* For the mobile search result page, the display of the date is now disabled because the results are not sorted by date and therefore a display of the date is not desirable.
It seems insta360 stores metadata in XMP GPano tags, with their own
non-standard and undocumented addition `SourceImageCreateTime`. For some
pictures this is the only EXIF tag containing a creation time.
* fix(web): search bar deactivates when focus exits
* fix: disable search bar on destroy
For example, on the search page. If the escape key is pressed while the advanced filters button is focused, the search page will close but the search bar will remain activated.
* remove face, person and face search entities
update tests and mappers
check if face relation exists
update sql
unused imports
* pr feedback
generate sql, remove unused imports
* feat: sync pictureFile with oidc if it isn't set already
fix: move picture writer to get userId
fix: move await promise to the top of the setPicure function before checking its value and automatically create the user folder
chore: code cleanup
* fix: extension double dot
---------
Co-authored-by: Jason Rasmussen <jason@rasm.me>
* always patch package when running npm i, install immich CLI outside of directory so post install doesnt run
* handles case where query is an object and defined but origin is not.
* move patch-package from a dev dependency to a normal dependency. Also copy the patches folder for the docker build to use and patch with
* fix Dockerfile
* use query.reject instead of throw for queryError
* package-lock to reflect the dev dependency change
* dont throw the error, just provide an empty string for query.origin if it does not exist
* remove npm link and demote patch-package back to a dev dependency
* modify patch to add defensive check to catch queries that will fail to parse and reject
* fix(mobile): hide asset description text field if user is not owner
* If user is not the owner and asset has no description then hide the text field
* Apply suggestions from code review
Co-authored-by: Alex <alex.tran1502@gmail.com>
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Features: Local file movement to trash and restoration back to the album added. (Android)
* Comments fixes
* settings button marked as [EXPERIMENTAL]
* _moveToTrashMatchedAssets refactored, moveToTrash renamed.
* fix: bad merge
* Permission check and request for local storage added.
* Permission request added on settings switcher
* Settings button logic changed
* Method channel file_trash moved to BackgroundServicePlugin
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* chore: add geodata indexes to table definitions
* chore: rename incorrectly name geodata index
* fix: import into geodata places with correct index names
* refactor: device asset entity to use modified time
* chore: cleanup
* refactor: remove album media dependency from hashservice
* refactor: return updated copy of asset
* add hash service tests
* chore: rename hash batch constants
* chore: log the number of assets processed during migration
* chore: more logs
* refactor: use lookup and more tests
* use sort approach
* refactor hash service to use for loop instead
* refactor: rename to getByIds
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
* use original image if web compatible
* add e2e
* fix shared link handling
* handle redirect in e2e
* fix size not being passed to thumbnail url
* test fullsize in e2e
* feat(server): Avoid face matching with people born after file creation date (#4743)
* lint
* add medium tests for facial recognition
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix(web): don't show a scrollbar when hovering over the last row of images on the search page
* Format code
* Fix asset selection z-index
* Remove anchor overlay on mouseover
* Fix a test
* Fix merge
* Fix overlays
* fix merge
* fix stack thumbs in asset viewer
* fix dimmed bounds, animation
* lint
---------
Co-authored-by: Min Idzelis <min123@gmail.com>
* refactor: user entity
* chore: rebase fixes
* refactor: remove int user Id
* refactor: migrate store userId from int to string
* refactor: rename uid to id
* feat: drift
* pr feedback
* refactor: move common overrides to mixin
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
* feat: expand/collapse sidebar
* fix: general PR cleanup
- add skip link unit test
- remove unused tailwind styles
- adjust asset grid spacing
- fix event propogation
* fix: cleaning up event listeners
* fix: purchase modal and button on small screens
* fix: explicit tailwind classes
* fix: no animation on initial page load
* fix: sidebar spacing and reactivity
* chore: reverting changes to icons in nav and account info panel
* fix: remove left margin from the asset grid after merging in new timeline
* chore: extract search-bar changes for a separate PR
* fix: add margin to memories
* feat(server): extract full-size previews from RAW images
* feat(web): load fullsize preview for RAW images when zoomed in
* refactor: tweaks for code review
* refactor: rename "converted" preview/assets to "fullsize"
* feat(web/server): fullsize preview for non-web-friendly images
* feat: tweaks for code review
* feat(server): require ASSET_DOWNLOAD premission for fullsize previews
* test: fix types and interfaces
* chore: gen open-api
* feat(server): keep only essential exif in fullsize preview
* chore: regen openapi
* test: revert unnecessary timeout
* feat: move full-size preview config to standalone entry
* feat(i18n): update en texts
* fix: don't return fullsizePath when disabled
* test: full-size previews
* test(web): full-size previews
* chore: make open-api
* feat(server): redirect to preview/original URL when fullsize thumbnail not available
* fix(server): delete fullsize preview image on thumbnail regen after fullsize preview turned off
* refactor(server): AssetRepository.deleteFiles with Kysely
* fix(server): type of MediaRepository.writeExif
* minor simplification
* minor styling changes and condensed wording
* simplify
* chore: reuild open-api
* test(server): fix media.service tests
* test(web): fix photo-viewer test
* fix(server): use fullsize image when requested
* fix file path extension
* formatting
* use fullsize when zooming back out or when "display original photos" is enabled
* simplify condition
---------
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
* add patch-package to dev dependencies
this allows us to patch upstream packages without waiting for PRs to be merged (or not!). Patch-package does a pretty good job of notifying if upstream does a change to invalidate the patch (its a git patch under the hood).
* Patch implementation of https://github.com/porsager/postgres/pull/944
This PR has not been merged by upstream and helps produce verbose error messages when postgres fails to connect (usually incorrect credentials). This is in contrast to error messages such as
`TypeError: Cannot read properties of undefined (reading 'replace'), stack: TypeError: Cannot read properties of undefined (reading 'replace')`
* have postinstall only run when not installing a global package (such as immich-cli in the Docker build)
we can't run specifically the handleUserDeleteCheck tests concurrently due to one of the tests modifying the config in the shared database
if run concurrently you can get race conditions where the other tests pick up the change, even with resetting the config in the beforeEach
therefore the test that checks a delete actually happens, fails
there are many ways to solve this, disabling concurrency for the suite, forcing sequential tests for just handleUserDeleteCheck, increasing the delete test deletedAt to more than the custom duration tests deleteDelay
I applied all three of these. You could also force all the user tests to run in their own databases, but that feels overkill
* fix(server) optimize number of sql calls for GET /api/albums
remove unnecessary join for getMetadataForIds
remove separate call to getLastUpdatedAssetForAlbumId
* fix(server) remove unnecessary getLastUpdatedAssetForAlbumId call for GET /api/album/:id
also remove getLastUpdatedAssetForAlbumId query as it is no longer referenced
* fix(server): correct lastModifiedAssetTimestamp return type + formatting and typing
* chore(server): address type issue with tests found via npm:check
tests & lint still pass before this commit.
* feat: use my.immich.app for externalDomain fallback
This is probably more useful than localhost.
* chore: remove port param
* fix: update expected value in tests
* fix: update expected value in e2e
* chore: upgrade svelte-maplibre and enforce runes
* feat: maplibre-gl 5, globe view, style hot reloading, fast map markers
* fix: remove location-pin class that wasn't being used
---------
Co-authored-by: Zack Pollard <zackpollard@ymail.com>
should_run_.github:${{ steps.found_paths.outputs['.github'] == 'true' || steps.should_force.outputs.should_force == 'true' }}# redundant to have should_force but if someone changes the trigger then this won't have to be changed
Access the demo [here](https://demo.immich.app). The demo is running on a Free-tier Oracle VM in Amsterdam with a 2.4Ghz quad-core ARM64 CPU and 24GB RAM.
For the mobile app, you can use `https://demo.immich.app` for the `Server Endpoint URL`
Access the demo [here](https://demo.immich.app). For the mobile app, you can use `https://demo.immich.app` for the `Server Endpoint URL`.
### Login credentials
@@ -104,7 +102,7 @@ For the mobile app, you can use `https://demo.immich.app` for the `Server Endpoi
# The location where your uploaded files are stored
UPLOAD_LOCATION=./library
# The location where your database files are stored
# The location where your database files are stored. Network shares are not supported for the database
DB_DATA_LOCATION=./postgres
# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
@@ -23,23 +23,32 @@ Refer to the official [postgres documentation](https://www.postgresql.org/docs/c
It is not recommended to directly backup the `DB_DATA_LOCATION` folder. Doing so while the database is running can lead to a corrupted backup that cannot be restored.
:::
### Automatic Database Backups
### Automatic Database Dumps
For convenience, Immich will automatically create database backups by default. The backups are stored in `UPLOAD_LOCATION/backups`.
As mentioned above, you should make your own backup of these together with the asset folders as noted below.
You can adjust the schedule and amount of kept backups in the [admin settings](http://my.immich.app/admin/system-settings?isOpen=backup).
By default, Immich will keep the last 14 backups and create a new backup every day at 2:00 AM.
:::warning
The automatic database dumps can be used to restore the database in the event of damage to the Postgres database files.
There is no monitoring for these dumps and you will not be notified if they are unsuccessful.
:::
#### Trigger Backup
:::caution
The database dumps do **NOT** contain any pictures or videos, only metadata. They are only usable with a copy of the other files in `UPLOAD_LOCATION` as outlined below.
:::
You are able to trigger a backup in the [admin job status page](http://my.immich.app/admin/jobs-status).
Visit the page, open the "Create job" modal from the top right, select "Backup Database" and click "Confirm".
A job will run and trigger a backup, you can verify this worked correctly by checking the logs or the backup folder.
This backup will count towards the last X backups that will be kept based on your settings.
For disaster-recovery purposes, Immich will automatically create database dumps. The dumps are stored in `UPLOAD_LOCATION/backups`.
Please be sure to make your own, independent backup of the database together with the asset folders as noted below.
You can adjust the schedule and amount of kept database dumps in the [admin settings](http://my.immich.app/admin/system-settings?isOpen=backup).
By default, Immich will keep the last 14 database dumps and create a new dump every day at 2:00 AM.
#### Trigger Dump
You are able to trigger a database dump in the [admin job status page](http://my.immich.app/admin/jobs-status).
Visit the page, open the "Create job" modal from the top right, select "Create Database Dump" and click "Confirm".
A job will run and trigger a dump, you can verify this worked correctly by checking the logs or the `backups/` folder.
This dumps will count towards the last `X` dumps that will be kept based on your settings.
#### Restoring
We hope to make restoring simpler in future versions, for now you can find the backups in the `UPLOAD_LOCATION/backups` folder on your host.
We hope to make restoring simpler in future versions, for now you can find the database dumps in the `UPLOAD_LOCATION/backups` folder on your host.
Then please follow the steps in the following section for restoring the database.
### Manual Backup and Restore
@@ -48,7 +57,7 @@ Then please follow the steps in the following section for restoring the database
@@ -141,12 +150,10 @@ for more info read the [release notes](https://github.com/immich-app/immich/rele
- Preview images (small thumbnails and large previews) for each asset and thumbnails for recognized faces.
- Stored in `UPLOAD_LOCATION/thumbs/<userID>`.
- **Encoded Assets:**
- Videos that have been re-encoded from the original for wider compatibility. The original is not removed.
- Stored in `UPLOAD_LOCATION/encoded-video/<userID>`.
- **Postgres**
- The Immich database containing all the information to allow the system to function properly.
**Note:** This folder will only appear to users who have made the changes mentioned in [v1.102.0](https://github.com/immich-app/immich/discussions/8930) (an optional, non-mandatory change) or who started with this version.
- Stored in `DB_DATA_LOCATION`.
@@ -192,7 +199,6 @@ When you turn off the storage template engine, it will leave the assets in `UPLO
- Temporarily located in `UPLOAD_LOCATION/upload/<userID>`.
- Transferred to `UPLOAD_LOCATION/library/<userID>` upon successful upload.
- **Postgres**
- The Immich database containing all the information to allow the system to function properly.
**Note:** This folder will only appear to users who have made the changes mentioned in [v1.102.0](https://github.com/immich-app/immich/discussions/8930) (an optional, non-mandatory change) or who started with this version.
- Stored in `DB_DATA_LOCATION`.
@@ -210,3 +216,10 @@ When you turn off the storage template engine, it will leave the assets in `UPLO
Do not touch the files inside these folders under any circumstances except taking a backup. Changing or removing an asset can cause untracked and missing files.
You can think of it as App-Which-Must-Not-Be-Named, the only access to viewing, changing and deleting assets is only through the mobile or browser interface.
:::
## Backup ordering
A backup of Immich should contain both the database and the asset files. When backing these up it's possible for them to get out of sync, potentially resulting in broken assets after you restore.
The best way of dealing with this is to stop the immich-server container while you take a backup. If nothing is changing then the backup will always be in sync.
If stopping the container is not an option, then the recommended order is to back up the database first, and the filesystem second. This way, the worst case scenario is that there are files on the filesystem that the database doesn't know about. If necessary, these can be (re)uploaded manually after a restore. If the backup is done the other way around, with the filesystem first and the database second, it's possible for the restored database to reference files that aren't in the filesystem backup, thus resulting in broken assets.
@@ -20,7 +20,6 @@ Immich supports 3rd party authentication via [OpenID Connect][oidc] (OIDC), an i
Before enabling OAuth in Immich, a new client application needs to be configured in the 3rd-party authentication server. While the specifics of this setup vary from provider to provider, the general approach should be the same.
1. Create a new (Client) Application
1. The **Provider** type should be `OpenID Connect` or `OAuth2`
2. The **Client type** should be `Confidential`
3. The **Application** type should be `Web`
@@ -29,7 +28,6 @@ Before enabling OAuth in Immich, a new client application needs to be configured
2. Configure Redirect URIs/Origins
The **Sign-in redirect URIs** should include:
-`app.immich:///oauth-callback` - for logging in with OAuth from the [Mobile App](/docs/features/mobile-app.mdx)
-`http://DOMAIN:PORT/auth/login` - for logging in with OAuth from the Web Client
-`http://DOMAIN:PORT/user-settings` - for manually linking OAuth in the Web Client
@@ -37,21 +35,17 @@ Before enabling OAuth in Immich, a new client application needs to be configured
Redirect URIs should contain all the domains you will be using to access Immich. Some examples include:
Mobile
-`app.immich:///oauth-callback` (You **MUST** include this for iOS and Android mobile apps to work properly)
Localhost
-`http://localhost:2283/auth/login`
-`http://localhost:2283/user-settings`
Local IP
-`http://192.168.0.200:2283/auth/login`
-`http://192.168.0.200:2283/user-settings`
Hostname
-`https://immich.example.com/auth/login`
-`https://immich.example.com/user-settings`
@@ -68,6 +62,7 @@ Once you have a new OAuth client application configured, Immich can be configure
| Scope | string | openid email profile | Full list of scopes to send with the request (space delimited) |
| Signing Algorithm | string | RS256 | The algorithm used to sign the id token (examples: RS256, HS256) |
| Storage Label Claim | string | preferred_username | Claim mapping for the user's storage label**¹** |
| Role Claim | string | immich_role | Claim mapping for the user's role. (should return "user" or "admin")**¹** |
| Storage Quota Claim | string | immich_quota | Claim mapping for the user's storage**¹** |
| Default Storage Quota (GiB) | number | 0 | Default quota for user without storage quota claim (Enter 0 for unlimited quota) |
| Button Text | string | Login with OAuth | Text for the OAuth button on the web |
@@ -93,6 +88,7 @@ The `.well-known/openid-configuration` part of the url is optional and will be a
## Auto Launch
When Auto Launch is enabled, the login page will automatically redirect the user to the OAuth authorization url, to login with OAuth. To access the login screen again, use the browser's back button, or navigate directly to `/auth/login?autoLaunch=0`.
Auto Launch can also be enabled on a per-request basis by navigating to `/auth/login?authLaunch=1`, this can be useful in situations where Immich is called from e.g. Nextcloud using the _External sites_ app and the _oidc_ app so as to enable users to directly interact with a logged-in instance of Immich.
@@ -10,12 +10,16 @@ Running with a pre-existing Postgres server can unlock powerful administrative f
## Prerequisites
You must install pgvecto.rs into your instance of Postgres using their [instructions][vectors-install]. After installation, add `shared_preload_libraries = 'vectors.so'` to your `postgresql.conf`. If you already have some `shared_preload_libraries` set, you can separate each extension with a comma. For example, `shared_preload_libraries = 'pg_stat_statements, vectors.so'`.
You must install `pgvector` (`>= 0.7.0, < 1.0.0`), as it is a prerequisite for `vchord`.
The easiest way to do this on Debian/Ubuntu is by adding the [PostgreSQL Apt repository][pg-apt] and then
running `apt install postgresql-NN-pgvector`, where `NN` is your Postgres version (e.g., `16`).
You must install VectorChord into your instance of Postgres using their [instructions][vchord-install]. After installation, add `shared_preload_libraries = 'vchord.so'` to your `postgresql.conf`. If you already have some `shared_preload_libraries` set, you can separate each extension with a comma. For example, `shared_preload_libraries = 'pg_stat_statements, vchord.so'`.
:::note
Immich is known to work with Postgres versions 14, 15, and 16. Earlier versions are unsupported. Postgres 17 is nominally compatible, but pgvecto.rs does not have prebuilt images or packages for it as of writing.
Immich is known to work with Postgres versions `>= 14, < 18`.
Make sure the installed version of pgvecto.rs is compatible with your version of Immich. The current accepted range for pgvecto.rs is `>= 0.2.0, < 0.4.0`.
Make sure the installed version of VectorChord is compatible with your version of Immich. The current accepted range for VectorChord is `>= 0.3.0, < 0.5.0`.
ALTER DATABASE <immichdatabasename> OWNER TO <immichdbusername>;
CREATE EXTENSION vectors;
CREATE EXTENSION vchord CASCADE;
CREATE EXTENSION earthdistance CASCADE;
ALTER DATABASE <immichdatabasename> SET search_path TO "$user", public, vectors;
ALTER SCHEMA vectors OWNER TO <immichdbusername>;
COMMIT;
```
### Updating pgvecto.rs
### Updating VectorChord
When installing a new version of pgvecto.rs, you will need to manually update the extension by connecting to the Immich database and running `ALTER EXTENSION vectors UPDATE;`.
When installing a new version of VectorChord, you will need to manually update the extension and reindex by connecting to the Immich database and running:
### Common errors
```
ALTER EXTENSION vchord UPDATE;
REINDEX INDEX face_index;
REINDEX INDEX clip_index;
```
#### Permission denied for view
## Migrating to VectorChord
If you get the error `driverError: error: permission denied for view pg_vector_index_stat`, you can fix this by connecting to the Immich database and running `GRANT SELECT ON TABLE pg_vector_index_stat TO <immichdbusername>;`.
VectorChord is the successor extension to pgvecto.rs, allowing for higher performance, lower memory usage and higher quality results for smart search and facial recognition.
Support for pgvecto.rs will be dropped in a later release, hence we recommend all users currently using pgvecto.rs to migrate to VectorChord at their convenience. There are two primary approaches to do so.
The easiest option is to have both extensions installed during the migration:
<details>
<summary>Migration steps (automatic)</summary>
1. Ensure you still have pgvecto.rs installed
2. Install `pgvector` (`>= 0.7.0, < 1.0.0`). The easiest way to do this is on Debian/Ubuntu by adding the [PostgreSQL Apt repository][pg-apt] and then running `apt install postgresql-NN-pgvector`, where `NN` is your Postgres version (e.g., `16`)
3. [Install VectorChord][vchord-install]
4. Add `shared_preload_libraries= 'vchord.so, vectors.so'` to your `postgresql.conf`, making sure to include _both_ `vchord.so` and `vectors.so`. You may include other libraries here as well if needed
5. Restart the Postgres database
6. If Immich does not have superuser permissions, run the SQL command `CREATE EXTENSION vchord CASCADE;` using psql or your choice of database client
7. Start Immich and wait for the logs `Reindexed face_index` and `Reindexed clip_index` to be output
8. If Immich does not have superuser permissions, run the SQL command `DROP EXTENSION vectors;`
9. Drop the old schema by running `DROP SCHEMA vectors;`
10. Remove the `vectors.so` entry from the `shared_preload_libraries` setting
11. Restart the Postgres database
12. Uninstall pgvecto.rs (e.g. `apt-get purge vectors-pg14` on Debian-based environments, replacing `pg14` as appropriate). `pgvector` must remain installed as it provides the data types used by `vchord`
</details>
If it is not possible to have both VectorChord and pgvecto.rs installed at the same time, you can perform the migration with more manual steps:
<details>
<summary>Migration steps (manual)</summary>
1. While pgvecto.rs is still installed, run the following SQL command using psql or your choice of database client. Take note of the number outputted by this command as you will need it later
```sql
SELECT atttypmod as dimsize
FROM pg_attribute f
JOIN pg_class c ON c.oid = f.attrelid
WHERE c.relkind = 'r'::char
AND f.attnum > 0
AND c.relname = 'smart_search'::text
AND f.attname = 'embedding'::text;
```
2. Remove references to pgvecto.rs using the below SQL commands
```sql
DROP INDEX IF EXISTS clip_index;
DROP INDEX IF EXISTS face_index;
ALTER TABLE smart_search ALTER COLUMN embedding SET DATA TYPE real[];
ALTER TABLE face_search ALTER COLUMN embedding SET DATA TYPE real[];
```
3. [Install VectorChord][vchord-install]
4. Change the columns back to the appropriate vector types, replacing `<number>` with the number from step 1
```sql
CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
ALTER TABLE smart_search ALTER COLUMN embedding SET DATA TYPE vector(<number>);
ALTER TABLE face_search ALTER COLUMN embedding SET DATA TYPE vector(512);
```
5. Start Immich and let it create new indices using VectorChord
</details>
### Migrating from pgvector
<details>
<summary>Migration steps</summary>
1. Ensure you have at least 0.7.0 of pgvector installed. If it is below that, please upgrade it and run the SQL command `ALTER EXTENSION vector UPDATE;` using psql or your choice of database client
2. Follow the Prerequisites to install VectorChord
3. If Immich does not have superuser permissions, run the SQL command `CREATE EXTENSION vchord CASCADE;`
4. Remove the `DB_VECTOR_EXTENSION=pgvector` environmental variable as it will make Immich still use pgvector if set
5. Start Immich and let it create new indices using VectorChord
</details>
Note that VectorChord itself uses pgvector types, so you should not uninstall pgvector after following these steps.
@@ -31,7 +31,7 @@ Admin can send a welcome email if the Email option is set, you can learn here ho
Admin can specify the storage quota for the user as the instance's admin; once the limit is reached, the user won't be able to upload to the instance anymore.
In order to select a storage quota, click on the pencil icon and enter the storage quota in GiB. You can choose an unlimited quota using the value 0 (default).
In order to select a storage quota, click on the pencil icon and enter the storage quota in GiB. You can choose an unlimited quota by leaving it empty (default).
:::tip
The system administrator can see the usage quota percentage of all users in Server Stats page.
After making any changes in the `server/src/entities`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration.
After making any changes in the `server/src/schema`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration.
1. Run the command
```bash
npm run typeorm:migrations:generate <migration-name>
npm run migrations:generate <migration-name>
```
2. Check if the migration file makes sense.
3. Move the migration file to folder `./server/src/migrations` in your code editor.
3. Move the migration file to folder `./server/src/schema/migrations` in your code editor.
The server will automatically detect `*.ts` file changes and restart. Part of the server start-up process includes running any new migrations, so it will be applied immediately.
Dev Containers provide a consistent, reproducible development environment using Docker containers. With a single click, you can get started with an Immich development environment on Mac, Linux, Windows, or in the cloud using GitHub Codespaces.
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/immich-app/immich/)
[](https://codespaces.new/immich-app/immich/)
[Learn more about Dev Containers](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers)
| Server & Web | `immich-server` | Runs both API server and web frontend in development mode | 2283 (API)<br/>3000 (Web)<br/>9230 (Workers Debug)<br/>9231 (API Debug) |
The immich dev containers read environment variables from your shell environment, not from `.env` files. This allows them to work in cloud environments without pre-configuration.
:::important Required Configuration
When running locally, and if you want to create (or use an existing) DB and/or photo storage folder, you must set the `UPLOAD_LOCATION` variable in your shell environment before launching the Dev Container. This determines where uploaded files are stored and also where the DB stores it data.
2. Press `F1` or `Ctrl/Cmd+Shift+P` to open the command palette
3. Type and select "Dev Containers: Rebuild and Reopen in Container"
4. Select "Immich - Backend, Frontend and ML" from the list
5. Wait for the container to build and start (this may take several minutes on first run)
#### Using VS Code Quick Actions:
1. Open the repository in VS Code
2. You should see a popup asking if you want to reopen in a container
3. Click "Reopen in Container"
#### Using Command Line:
```bash
# Using the DevContainer CLI
devcontainer up --workspace-folder .
```
## Environment Variable Details
### How Dev Containers Handle Environment Variables
Unlike the Immich developer setup based on Docker Compose which uses `.env` files, Immich Dev Containers read environment variables from your shell environment. This is configured in `.devcontainer/devcontainer.json`:
Add these to your shell profile (`~/.bashrc`, `~/.zshrc`, `~/.bash_profile`, etc.):
```bash
# Required
exportUPLOAD_LOCATION=./Library # or absolute path
# Optional (only if using non-default values)
exportDB_PASSWORD=your_password
exportDB_USERNAME=your_username
exportDB_DATABASE_NAME=your_database
```
Remember to reload your shell configuration:
```bash
source ~/.bashrc # or ~/.zshrc, etc.
```
## Git Configuration
### SSH Keys and Authentication
To use your SSH keys for GitHub access inside the Dev Container:
1.**Start SSH Agent** on your host machine:
```bash
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa # or your key path
```
2. **VS Code automatically forwards your SSH agent** to the container
For detailed instructions, see the [VS Code guide on sharing Git credentials](https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials).
### Commit Signing
To use your SSH key for commit signing, see the [GitHub guide on SSH commit signing](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key#telling-git-about-your-ssh-key).
To see local changes to `@immich/ui` in Immich, do the following:
1. Install `@immich/ui` as a sibling to `immich/`, for example `/home/user/immich` and `/home/user/ui`
1. Build the `@immich/ui` project via `npm run build`
1. Uncomment the corresponding volume in web service of the `docker/docker-compose.dev.yaml` file (`../../ui:/usr/ui`)
1. Uncomment the corresponding alias in the `web/vite.config.js` file (`'@immich/ui': path.resolve(\_\_dirname, '../../ui')`)
1. Start up the stack via `make dev`
1. After making changes in `@immich/ui`, rebuild it (`npm run build`)
2. Build the `@immich/ui` project via `npm run build`
3. Uncomment the corresponding volume in web service of the `docker/docker-compose.dev.yaml` file (`../../ui:/usr/ui`)
4. Uncomment the corresponding alias in the `web/vite.config.js` file (`'@immich/ui': path.resolve(\_\_dirname, '../../ui')`)
5. Uncomment the import statement in `web/src/app.css` file `@import '/usr/ui/dist/theme/default.css';` and comment out `@import '@immich/ui/theme/default.css';`
6. Start up the stack via `make dev`
7. After making changes in `@immich/ui`, rebuild it (`npm run build`)
### Mobile app
The mobile app `(/mobile)` will required Flutter toolchain 3.13.x and FVM to be installed on your system.
#### Setup
Please refer to the [Flutter's official documentation](https://flutter.dev/docs/get-started/install) for more information on setting up the toolchain on your machine.
1. Setup Flutter toolchain using FVM.
2. Run `flutter pub get` to install the dependencies.
3. Run `make translation` to generate the translation file.
4. Run `fvm flutter run` to start the app.
#### Translation
To add a new translation text, enter the key-value pair in the `i18n/en.json` in the root of the immich project. Then, from the `mobile/` directory, run
```bash
make translation
```
The mobile app asks you what backend to connect to. You can utilize the demo backend (https://demo.immich.app/) if you don't need to change server code or upload photos. Alternatively, you can run the server yourself per the instructions above.
@@ -96,32 +115,72 @@ Note: Activating the license is not required.
### VSCode
Install `Flutter`, `DCM`, `Prettier`, `ESLint` and `Svelte` extensions.
Install `Flutter`, `DCM`, `Prettier`, `ESLint` and `Svelte` extensions. These extensions are listed in the `extensions.json` file under `.vscode/` and should appear as workspace recommendations.
in User `settings.json` (`cmd + shift + p` and search for `Open User Settings JSON`) add the following:
Here are the settings we use, they should be active as workspace settings (`settings.json`):
Immich supports the Google's Cast protocol so that photos and videos can be cast to devices such as a Chromecast and a Nest Hub. This feature is considered experimental and has several important limitations listed below. Currently, this feature is only supported by the web client, support on Android and iOS is planned for the future.
## Enable Google Cast Support
Google Cast support is disabled by default. The web UI uses Google-provided scripts and must retreive them from Google servers when the page loads. This is a privacy concern for some and is thus opt-in.
You can enable Google Cast support through `Account Settings > Features > Cast > Google Cast`
<img src={require('./img/gcast-enable.webp').default} width="70%" title='Enable Google Cast Support' />
## Limitations
To use casting with Immich, there are a few prerequisites:
1. Your instance must be accessed via an HTTPS connection in order for the casting menu to show.
2. Your instance must be publicly accessible via HTTPS and a DNS record for the server must be accessible via Google's DNS servers (`8.8.8.8` and `8.8.4.4`)
3. Videos must be in a format that is compatible with Google Cast. For more info, check out [Google's documentation](https://developers.google.com/cast/docs/media)
Please modify the `IMMICH_INSTANCE_URL` and `IMMICH_API_KEY` environment variables as suitable. You can also use a Docker env file to store your sensitive API key.
This `docker run` command will directly run the command `immich` inside the container. You can directly append the desired parameters (see under "usage") to the commandline like this:
```bash
docker run -it -v "$(pwd)":/import:ro -e IMMICH_INSTANCE_URL=https://your-immich-instance/api -e IMMICH_API_KEY=your-api-key ghcr.io/immich-app/immich-cli:latest upload -a -c 5 --recursive directory/
This will store your credentials in a `auth.yml` file in the configuration directory which defaults to `~/.config/`. The directory can be set with the `-d` option or the environment variable `IMMICH_CONFIG_DIR`. Please keep the file secure, either by performing the logout command after you are done, or deleting it manually.
This will store your credentials in a `auth.yml` file in the configuration directory which defaults to `~/.config/immich/`. The directory can be set with the `-d` option or the environment variable `IMMICH_CONFIG_DIR`. Please keep the file secure, either by performing the logout command after you are done, or deleting it manually.
Once you are authenticated, you can upload assets to your Immich server.
@@ -166,6 +175,16 @@ By default, hidden files are skipped. If you want to include hidden files, use t
@@ -72,7 +72,7 @@ In rare cases, the library watcher can hang, preventing Immich from starting up.
### Nightly job
There is an automatic scan job that is scheduled to run once a day. This job also cleans up any libraries stuck in deletion. It is possible to trigger the cleanup by clicking "Scan all libraries" in the library managment page.
There is an automatic scan job that is scheduled to run once a day. This job also cleans up any libraries stuck in deletion. It is possible to trigger the cleanup by clicking "Scan all libraries" in the library management page.
## Usage
@@ -112,12 +112,15 @@ _Remember to run `docker compose up -d` to register the changes. Make sure you c
These actions must be performed by the Immich administrator.
- Click on Administration -> Libraries
- Click on Create External Library
- Click on your avatar on the upper right corner
- Click on Administration -> External Libraries
- Click on Create an external library…
- Select which user owns the library, this can not be changed later
- Enter `/mnt/media/christmas-trip` then click Add
- Click on Save
- Click the drop-down menu on the newly created library
- Click on Scan
- Click the drop-down menu on the newly created library
- Click on Rename Library and rename it to "Christmas Trip"
NOTE: We have to use the `/mnt/media/christmas-trip` path and not the `/mnt/nas/christmas-trip` path since all paths have to be what the Docker containers see.
@@ -5,7 +5,7 @@ import TabItem from '@theme/TabItem';
Immich uses Postgres as its search database for both metadata and contextual CLIP search.
Contextual CLIP search is powered by the [pgvecto.rs](https://github.com/tensorchord/pgvecto.rs) extension, utilizing machine learning models like [CLIP](https://openai.com/research/clip) to provide relevant search results. This allows for freeform searches without requiring specific keywords in the image or video metadata.
Contextual CLIP search is powered by the [VectorChord](https://github.com/tensorchord/VectorChord) extension, utilizing machine learning models like [CLIP](https://openai.com/research/clip) to provide relevant search results. This allows for freeform searches without requiring specific keywords in the image or video metadata.
## Advanced Search Filters
@@ -45,7 +45,7 @@ Some search examples:
</TabItem>
<TabItem value="Mobile" label="Mobile">
<img src={require('./img/moblie-smart-serach.webp').default} width="30%" title='Smart search on mobile' />
<img src={require('./img/mobile-smart-search.webp').default} width="30%" title='Smart search on mobile' />
More powerful models can be used for more accurate search results, but are slower and can require more server resources. Check the dropdowns below to see how they compare in memory usage, speed and quality by language.
The default search model is fast, but there are many other options that can provide better search results. The tradeoff of using these models is that they're slower and/or use more memory (both when indexing images with background Smart Search jobs and when searching).
The first step of choosing the right model for you is to know which languages your users will search in.
If your users will only search in English, then the [CLIP][huggingface-clip] section is the first place to look. This is a curated list of the models that generally perform the best for their size class. The models here are ordered from higher to lower quality. This means that the top models will generally rank the most relevant results higher and have a higher capacity to understand descriptive, detailed, and/or niche queries. The models are also generally ordered from larger to smaller, so consider the impact on memory usage, job processing and search speed when deciding on one. The smaller models in this list are not too different in quality and many times faster.
[Multilingual models][huggingface-multilingual-clip] are also available so users can search in their native language. Use these models if you expect non-English searches to be common. They can be separated into two search patterns:
-`nllb` models expect the search query to be in the language specified in the user settings
-`xlm` and `siglip2` models understand search text regardless of the current language setting
`nllb` models tend to perform the best and are recommended when users primarily searches in their native, non-English language. `xlm` and `siglip2` models are more flexible and are recommended for mixed language search, where the same user might search in different languages at different times.
For more details, check the tables below to see how they compare in memory usage, speed and quality by language.
Once you've chosen a model, follow these steps:
@@ -79,9 +92,9 @@ Memory and execution time estimates were obtained without acceleration on a 7800
**Execution Time (ms)**: After warming up the model with one pass, the mean execution time of 100 passes with the same input.
**Memory (MiB)**: The peak RSS usage of the process afer performing the above timing benchmark. Does not include image decoding, concurrent processing, the web server, etc., which are relatively constant factors.
**Memory (MiB)**: The peak RSS usage of the process after performing the above timing benchmark. Does not include image decoding, concurrent processing, the web server, etc., which are relatively constant factors.
**Recall (%)**: Evaluated on Crossmodal-3600, the average of the recall@1, recall@5 and recall@10 results for zeroshot image retrieval.
**Recall (%)**: Evaluated on Crossmodal-3600, the average of the recall@1, recall@5 and recall@10 results for zeroshot image retrieval. Chinese (Simplified), English, French, German, Italian, Japanese, Korean, Polish, Russian, Spanish and Turkish are additionally tested on XTD-10. Chinese (Simplified) and English are additionally tested on Flickr30k. The recall metrics are the average across all tested datasets.
**Pareto Optimal**: Whether the model is not completely outclassed by another model. Try to use models that are optimal for the languages relevant to you. Specifically, for a given model and language, if there's another model that's better for that language in at least one respect (memory usage, execution time, recall) while being at least as good for that language in every other way, then the model is not optimal for that language.
@@ -93,59 +106,59 @@ Memory and execution time estimates were obtained without acceleration on a 7800
<summary>English</summary>
| Model | Memory (MiB) | Execution Time (ms) | Recall (%) | Pareto Optimal |
@@ -14,14 +14,14 @@ online generators you can use.
2. Paste the link to your JSON style in either the **Light Style** or **Dark Style**. (You can add different styles which will help make the map style more appropriate depending on whether you set **Immich** to Light or Dark mode.)
3. Save your selections. Reload the map, and enjoy your custom map style!
## Use Maptiler to build a custom style
## Use MapTiler to build a custom style
Customizing the map style can be done easily using Maptiler, if you do not want to write an entire JSON document by hand.
Customizing the map style can be done easily using MapTiler, if you do not want to write an entire JSON document by hand.
1. Create a free account at https://cloud.maptiler.com
2. Once logged in, you can either create a brand new map by clicking on **New Map**, selecting a starter map, and then clicking **Customize**, OR by selecting a **Standard Map** and customizing it from there.
3. The **editor** interface is self-explanatory. You can change colors, remove visible layers, or add optional layers (e.g., administrative, topo, hydro, etc.) in the composer.
4. Once you have your map composed, click on **Save** at the top right. Give it a unique name to save it to your account.
5. Next, **Publish** your style using the **Publish** button at the top right. This will deploy it to production, which means it is able to be exposed over the Internet. Maptiler will present an interactive side-by-side map with the original and your changes prior to publication.<br/>
6. Maptiler will warn you that changing the map will change it across all apps using the map. Since no apps are using the map yet, this is okay.
7. Clicking on the name of your new map at the top left will bring you to the item's **details** page. From here, copy the link to the JSON style under **Use vector style**. This link will automatically contain your personal API key to Maptiler.
5. Next, **Publish** your style using the **Publish** button at the top right. This will deploy it to production, which means it is able to be exposed over the Internet. MapTiler will present an interactive side-by-side map with the original and your changes prior to publication.<br/>
6. MapTiler will warn you that changing the map will change it across all apps using the map. Since no apps are using the map yet, this is okay.
7. Clicking on the name of your new map at the top left will bring you to the item's **details** page. From here, copy the link to the JSON style under **Use vector style**. This link will automatically contain your personal API key to MapTiler.
Keep in mind that mucking around in the database might set the moon on fire. Avoid modifying the database directly when possible, and always have current backups.
Keep in mind that mucking around in the database might set the Moon on fire. Avoid modifying the database directly when possible, and always have current backups.
# service: # set to one of [armnn, cuda, rocm, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
# service: # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
# For deduplicating backup programs such as Borg or Restic, compressing the content can increase backup size by making it harder to deduplicate. If you are using a different program or still prefer to compress, you can use the following command instead:
You can alternatively download these two files from your browser and move them to the directory that you created, in which case ensure that you rename `example.env` to `.env`.
## Step 2 - Populate the .env file with custom values
- Populate `UPLOAD_LOCATION` with your preferred location for storing backup assets. It should be a new directory on the server with enough free space.
- Consider changing `DB_PASSWORD` to a custom value. Postgres is not publicly exposed, so this password is only used for local authentication.
To avoid issues with Docker parsing this value, it is best to use only the characters `A-Za-z0-9`. `pwgen` is a handy utility for this.
- Set your timezone by uncommenting the `TZ=` line.
- Populate custom database information if necessary.
## Step 3 - Start the containers
From the directory you created in Step 1 (which should now contain your customized `docker-compose.yml` and `.env` files), run the following command to start Immich as a background service:
```bash title="Start the containers"
docker compose up -d
```
<DockerComposeSteps />
:::info Docker version
If you get an error such as `unknown shorthand flag: 'd' in -d` or `open <location of your .env file>: permission denied`, you are probably running the wrong Docker version. (This happens, for example, with the docker.io package in Ubuntu 22.04.3 LTS.) You can correct the problem by following the complete [Docker Engine install](https://docs.docker.com/engine/install/) procedure for your distribution, crucially the "Uninstall old versions" and "Install using the apt/rpm repository" sections. These replace the distro's Docker packages with Docker's official ones.
@@ -69,39 +29,4 @@ If you get an error `can't set healthcheck.start_interval as feature require Doc
## Next Steps
Read the [Post Installation](/docs/install/post-install.mdx) steps or setup optional features below.
### Setting up optional features
- [External Libraries](/docs/features/libraries.md): Adding your existing photo library to Immich
- [Hardware Transcoding](/docs/features/hardware-transcoding.md): Speeding up video transcoding
- [Hardware-Accelerated Machine Learning](/docs/features/ml-hardware-acceleration.md): Speeding up various machine learning tasks in Immich
### Upgrading
:::danger Read the release notes
Immich is currently under heavy development, which means you can expect [breaking changes][breaking] and bugs. Therefore, we recommend reading the release notes prior to updating and to take special care when using automated tools like [Watchtower][watchtower].
You can see versions that had breaking changes [here][breaking].
:::
If `IMMICH_VERSION` is set, it will need to be updated to the latest or desired version.
When a new version of Immich is [released][releases], the application can be upgraded and restarted with the following commands, run in the directory with the `docker-compose.yml` file:
```bash title="Upgrade and restart Immich"
docker compose pull && docker compose up -d
```
To clean up disk space, the old version's obsolete container images can be deleted with the following command:
| `DB_DATABASE_NAME` | Database name |`immich` | server, database<sup>\*1</sup> |
| `DB_SSL_MODE` | Database SSL mode | | server |
| `DB_VECTOR_EXTENSION`<sup>\*2</sup> | Database vector extension (one of [`vectorchord`, `pgvector`, `pgvecto.rs`]) | | server |
| `DB_SKIP_MIGRATIONS` | Whether to skip running migrations on startup (one of [`true`, `false`]) | `false` | server |
| `DB_STORAGE_TYPE` | Optimize concurrent IO on SSDs or sequential IO on HDDs ([`SSD`, `HDD`])<sup>\*3</sup> | `SSD` | server |
\*1: The values of `DB_USERNAME`, `DB_PASSWORD`, and `DB_DATABASE_NAME` are passed to the Postgres container as the variables `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB` in `docker-compose.yml`.
\*2: This setting cannot be changed after the server has successfully started up.
\*2: If not provided, the appropriate extension to use is auto-detected at startup by introspecting the database. When multiple extensions are installed, the order of preference is VectorChord, pgvecto.rs, pgvector.
\*3: Uses either [`postgresql.ssd.conf`](https://github.com/immich-app/base-images/blob/main/postgres/postgresql.ssd.conf) or [`postgresql.hdd.conf`](https://github.com/immich-app/base-images/blob/main/postgres/postgresql.hdd.conf) which mainly controls the Postgres `effective_io_concurrency` setting to allow for concurrenct IO on SSDs and sequential IO on HDDs.
@@ -25,11 +25,11 @@ When you're all done, you should have the following:
-`./docker/immich-app/postgres`
-`./docker/immich-app/library`
Download [`docker-compose.yml`](https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml) and [`example.env`](https://github.com/immich-app/immich/releases/latest/download/example.env) to your computer. Upload the files to the `./docker/immich-app` directory.
Download [`docker-compose.yml`](https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml) and [`example.env`](https://github.com/immich-app/immich/releases/latest/download/example.env) to your computer. Upload the files to the `./docker/immich-app` directory, and rename `example.env` to `.env`.
## Step 2 - Populate the .env file with custom values
Follow [Step 2 in Docker Compose](./docker-compose#step-2---populate-the-env-file-with-custom-values) for instructions on customizing the `.env` file, and then return back to this guide to continue.
Follow [Step 2 in Docker Compose](/docs/install/docker-compose#step-2---populate-the-env-file-with-custom-values) for instructions on customizing the `.env` file, and then return back to this guide to continue.
## Step 3 - Create a new project in Container Manager
@@ -67,10 +67,4 @@ Click "**Edit Rules**" and add the following firewall rules:
## Next Steps
Read the [Post Installation](/docs/install/post-install.mdx) steps or setup optional features below.
### Setting up optional features
- [External Libraries](/docs/features/libraries.md): Adding your existing photo library to Immich
- [Hardware Transcoding](/docs/features/hardware-transcoding.md): Speeding up video transcoding
- [Hardware-Accelerated Machine Learning](/docs/features/ml-hardware-acceleration.md): Speeding up various machine learning tasks in Immich
Read the [Post Installation](/docs/install/post-install.mdx) steps and [upgrade instructions](/docs/install/upgrading.md).
This is a community contribution and not officially supported by the Immich team, but included here for convenience.
Community support can be found in the dedicated channel on the [Discord Server](https://discord.immich.app/).
**Please report app issues to the corresponding [Github Repository](https://github.com/truenas/charts/tree/master/community/immich).**
**Please report app issues to the corresponding [Github Repository](https://github.com/truenas/apps/tree/master/trains/community/immich).**
:::
Immich can easily be installed on TrueNAS SCALE via the **Community** train application.
Consider reviewing the TrueNAS [Apps tutorial](https://www.truenas.com/docs/scale/scaletutorials/apps/) if you have not previously configured applications on your system.
Immich can easily be installed on TrueNAS Community Edition via the **Community** train application.
Consider reviewing the TrueNAS [Apps resources](https://apps.truenas.com/getting-started/) if you have not previously configured applications on your system.
TrueNAS SCALE makes installing and updating Immich easy, but you must use the Immich web portal and mobile app to configure accounts and access libraries.
TrueNAS Community Edition makes installing and updating Immich easy, but you must use the Immich web portal and mobile app to configure accounts and access libraries.
## First Steps
The Immich app in TrueNAS SCALE installs, completes the initial configuration, then starts the Immich web portal.
When updates become available, SCALE alerts and provides easy updates.
The Immich app in TrueNAS Community Edition installs, completes the initial configuration, then starts the Immich web portal.
When updates become available, TrueNAS alerts and provides easy updates.
Before installing the Immich app in SCALE, review the [Environment Variables](#environment-variables) documentation to see if you want to configure any during installation.
Before installing the Immich app in TrueNAS, review the [Environment Variables](#environment-variables) documentation to see if you want to configure any during installation.
You may also configure environment variables at any time after deploying the application.
### Setting up Storage Datasets
@@ -126,9 +126,9 @@ className="border rounded-xl"
Accept the default port `30041` in **WebUI Port** or enter a custom port number.
:::info Allowed Port Numbers
Only numbers within the range 9000-65535 may be used on SCALE versions below TrueNAS Scale 24.10 Electric Eel.
Only numbers within the range 9000-65535 may be used on TrueNAS versions below TrueNAS Community Edition 24.10 Electric Eel.
Regardless of version, to avoid port conflicts, don't use [ports on this list](https://www.truenas.com/docs/references/defaultports/).
Regardless of version, to avoid port conflicts, don't use [ports on this list](https://www.truenas.com/docs/solutions/optimizations/security/#truenas-default-ports).
:::
### Storage Configuration
@@ -173,7 +173,7 @@ className="border rounded-xl"
You may configure [External Libraries](/docs/features/libraries) by mounting them using **Additional Storage**.
The **Mount Path** is the location you will need to copy and paste into the External Library settings within Immich.
The **Host Path** is the location on the TrueNAS SCALE server where your external library is located.
The **Host Path** is the location on the TrueNAS Community Edition server where your external library is located.
<!-- A section for Labels would go here but I don't know what they do. -->
Accept the default **CPU** limit of `2` threads or specify the number of threads (CPUs with Multi-/Hyper-threading have 2 threads per core).
Accept the default**Memory** limit of `4096` MB or specify the number of MB of RAM. If you're using Machine Learning you should probably set this above 8000 MB.
Specify the**Memory** limit in MB of RAM. Immich recommends at least 6000 MB (6GB). If you selected **Enable Machine Learning** in **Immich Configuration**, you should probably set this above 8000 MB.
:::info Older SCALE Versions
Before TrueNAS SCALE version 24.10 Electric Eel:
:::info Older TrueNAS Versions
Before TrueNAS Community Edition version 24.10 Electric Eel:
The **CPU** value was specified in a different format with a default of `4000m` which is 4 threads.
The **Memory** value was specified in a different format with a default of `8Gi` which is 8 GiB of RAM. The value was specified in bytes or a number with a measurement suffix. Examples: `129M`, `123Mi`, `1000000000`
:::
Enable **GPU Configuration** options if you have a GPU that you will use for [Hardware Transcoding](/docs/features/hardware-transcoding) and/or [Hardware-Accelerated Machine Learning](/docs/features/ml-hardware-acceleration.md). More info: [GPU Passthrough Docs for TrueNAS Apps](https://www.truenas.com/docs/truenasapps/#gpu-passthrough)
Enable **GPU Configuration** options if you have a GPU that you will use for [Hardware Transcoding](/docs/features/hardware-transcoding) and/or [Hardware-Accelerated Machine Learning](/docs/features/ml-hardware-acceleration.md). More info: [GPU Passthrough Docs for TrueNAS Apps](https://apps.truenas.com/managing-apps/installing-apps/#gpu-passthrough)
Some Environment Variables are not available for the TrueNAS SCALE app. This is mainly because they can be configured through GUI options in the [Edit Immich screen](#edit-app-settings).
Some Environment Variables are not available for the TrueNAS Community Edition app. This is mainly because they can be configured through GUI options in the [Edit Immich screen](#edit-app-settings).
Some examples are: `IMMICH_VERSION`, `UPLOAD_LOCATION`, `DB_DATA_LOCATION`, `TZ`, `IMMICH_LOG_LEVEL`, `DB_PASSWORD`, `REDIS_PASSWORD`.
:::
## Updating the App
When updates become available, SCALE alerts and provides easy updates.
:::danger
Make sure to read the general [upgrade instructions](/docs/install/upgrading.md).
:::
When updates become available, TrueNAS alerts and provides easy updates.
To update the app to the latest version:
- Go to the **Installed Applications** screen and select Immich from the list of installed applications.
@@ -75,7 +75,6 @@ alt="Select Plugins > Compose.Manager > Add New Stack > Label it Immich"
5. Click "**Save Changes**", you will be prompted to edit stack UI labels, just leave this blank and click "**Ok**"
6. Select the cog ⚙️ next to Immich, click "**Edit Stack**", then click "**Env File**"
7. Paste the entire contents of the [Immich example.env](https://github.com/immich-app/immich/releases/latest/download/example.env) file into the Unraid editor, then **before saving** edit the following:
-`UPLOAD_LOCATION`: Create a folder in your Images Unraid share and place the **absolute** location here > For example my _"images"_ share has a folder within it called _"immich"_. If I browse to this directory in the terminal and type `pwd` the output is `/mnt/user/images/immich`. This is the exact value I need to enter as my `UPLOAD_LOCATION`
-`DB_DATA_LOCATION`: Change this to use an Unraid share (preferably a cache pool, e.g. `/mnt/user/appdata/postgresql/data`). This uses the `appdata` share. Do also create the `postgresql` folder, by running `mkdir /mnt/user/{share_location}/postgresql/data`. If left at default it will try to use Unraid's `/boot/config/plugins/compose.manager/projects/[stack_name]/postgres` folder which it doesn't have permissions to, resulting in this container continuously restarting.
@@ -131,6 +130,10 @@ For more information on how to use the application once installed, please refer
## Updating Steps
:::danger
Make sure to read the general [upgrade instructions](/docs/install/upgrading.md).
:::
Updating is extremely easy however it's important to be aware that containers managed via the Docker Compose Manager plugin do not integrate with Unraid's native dockerman UI, the label "_update ready_" will always be present on containers installed via the Docker Compose Manager.
Immich is currently under heavy development, which means you can expect [breaking changes][breaking] and bugs. You should read the release notes prior to updating and take special care when using automated tools like [Watchtower][watchtower].
You can see versions that had breaking changes [here][breaking].
:::
When a new version of Immich is [released][releases], you should read the release notes and account for any breaking changes noted (as mentioned above).
If you use `IMMICH_VERSION` in your `.env` file, it will need to be updated to the latest or desired version.
After that, the application can be upgraded and restarted with the following commands, run in the directory with the `docker-compose.yml` file:
```bash title="Upgrade and restart Immich"
docker compose pull && docker compose up -d
```
To clean up disk space, the old version's obsolete container images can be deleted with the following command:
import ExampleEnv from '!!raw-loader!../../../docker/example.env';
### Step 1 - Download the required files
Create a directory of your choice (e.g. `./immich-app`) to hold the `docker-compose.yml` and `.env` files.
```bash title="Move to the directory you created"
mkdir ./immich-app
cd ./immich-app
```
Download [`docker-compose.yml`](https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml) and [`example.env`](https://github.com/immich-app/immich/releases/latest/download/example.env) by running the following commands:
You can alternatively download these two files from your browser and move them to the directory that you created, in which case ensure that you rename `example.env` to `.env`.
### Step 2 - Populate the .env file with custom values
- Populate `UPLOAD_LOCATION` with your preferred location for storing backup assets. It should be a new directory on the server with enough free space.
- Consider changing `DB_PASSWORD` to a custom value. Postgres is not publicly exposed, so this password is only used for local authentication.
To avoid issues with Docker parsing this value, it is best to use only the characters `A-Za-z0-9`. `pwgen` is a handy utility for this.
- Set your timezone by uncommenting the `TZ=` line.
- Populate custom database information if necessary.
### Step 3 - Start the containers
From the directory you created in Step 1 (which should now contain your customized `docker-compose.yml` and `.env` files), run the following command to start Immich as a background service:
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.