Immich¶
| Description / name | Input element |
|---|---|
| Your domain name |
Overview¶
Immich is a self-hosted photo and video backup tool, similar to google photos and apple photos.
Deployment¶
sb install sandbox-immich
Usage¶
Visit https://immich.iYOUR_DOMAIN_NAMEi.
Basics¶
Info
📢 Again, no default user is configured until you run through the setup screen, so you would ideally run through setup as soon as immich is deployed to secure the site. It is not behind authelia by default.
Tip
In Administration > Settings is a button to copy the current admin configuration to your clipboard. So you can just grab it from there, and paste it into a file.
If you would like to have the config file available, create a new config file (e.g. immich.config, and the config format is .json) and map it in inventory; just keep in mind that this disallows you from configuring Immich admin settings from the web ui.
immich_docker_envs_custom:
IMMICH_CONFIG_FILE: "/config/immich.config"
Role Defaults¶
Use the Inventory to customize variables. (1)
-
Example override
immich_name: "custom_value"Avoid overriding variables ending in
_defaultWhen overriding variables that end in
_default(likeimmich_docker_envs_default), you replace the entire default configuration. Future updates that add new default values will not be applied to your setup, potentially breaking functionality.Instead, use the corresponding
_customvariable (likeimmich_docker_envs_custom) to add your changes. Custom values are merged with defaults, ensuring you receive updates.
immich_name
# Type: string
immich_name: immich
immich_role_photos_location
# Type: string
immich_role_photos_location: "/mnt/unionfs/Media/Photos"
immich_role_postgres_deploy
# Type: bool (true/false)
immich_role_postgres_deploy: true
immich_role_postgres_name
# Type: string
immich_role_postgres_name: "{{ immich_name }}-postgres"
immich_role_postgres_user
# Type: string
immich_role_postgres_user: "{{ postgres_role_docker_env_user }}"
immich_role_postgres_password
# Type: string
immich_role_postgres_password: "{{ postgres_role_docker_env_password }}"
immich_role_postgres_docker_env_db
# Type: string
immich_role_postgres_docker_env_db: "{{ immich_name }}"
immich_role_postgres_docker_image_tag
# Type: string
immich_role_postgres_docker_image_tag: "14-vectorchord0.4.3-pgvectors0.2.0"
immich_role_postgres_docker_image_repo
# Type: string
immich_role_postgres_docker_image_repo: "ghcr.io/immich-app/postgres"
immich_role_postgres_docker_healthcheck
# Type: dict
immich_role_postgres_docker_healthcheck:
test: ["CMD-SHELL", "pg_isready -d {{ lookup('role_var', '_postgres_docker_env_db', role='immich') }} -U {{ postgres_role_docker_env_user }}"]
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
immich_role_postgres_docker_shm_size
# Type: string
immich_role_postgres_docker_shm_size: "128M"
immich_role_postgres_paths_folder
# Type: string
immich_role_postgres_paths_folder: "{{ immich_name }}"
immich_role_postgres_paths_location
# Type: string
immich_role_postgres_paths_location: "{{ server_appdata_path }}/{{ immich_role_postgres_paths_folder }}/postgres"
immich_role_postgres_docker_envs_custom
# Type: dict
immich_role_postgres_docker_envs_custom:
POSTGRES_INITDB_ARGS: '--data-checksums'
immich_role_web_subdomain
# Type: string
immich_role_web_subdomain: "{{ immich_name }}"
immich_role_web_domain
# Type: string
immich_role_web_domain: "{{ user.domain }}"
immich_role_web_port
# Type: string
immich_role_web_port: "8080"
immich_role_web_url
# Type: string
immich_role_web_url: "{{ 'https://' + (lookup('role_var', '_web_subdomain', role='immich') + '.' + lookup('role_var', '_web_domain', role='immich')
if (lookup('role_var', '_web_subdomain', role='immich') | length > 0)
else lookup('role_var', '_web_domain', role='immich')) }}"
immich_role_dns_record
# Type: string
immich_role_dns_record: "{{ lookup('role_var', '_web_subdomain', role='immich') }}"
immich_role_dns_zone
# Type: string
immich_role_dns_zone: "{{ lookup('role_var', '_web_domain', role='immich') }}"
immich_role_dns_proxy
# Type: bool (true/false)
immich_role_dns_proxy: "{{ dns_proxied }}"
immich_role_traefik_sso_middleware
# Type: string
immich_role_traefik_sso_middleware: ""
immich_role_traefik_middleware_default
# Type: string
immich_role_traefik_middleware_default: "{{ traefik_default_middleware }}"
immich_role_traefik_middleware_custom
# Type: string
immich_role_traefik_middleware_custom: ""
immich_role_traefik_certresolver
# Type: string
immich_role_traefik_certresolver: "{{ traefik_default_certresolver }}"
immich_role_traefik_enabled
# Type: bool (true/false)
immich_role_traefik_enabled: true
immich_role_traefik_api_enabled
# Type: bool (true/false)
immich_role_traefik_api_enabled: false
immich_role_traefik_api_endpoint
# Type: string
immich_role_traefik_api_endpoint: ""
Container
immich_role_docker_container
# Type: string
immich_role_docker_container: "{{ immich_name }}"
Image
immich_role_docker_image_pull
# Type: bool (true/false)
immich_role_docker_image_pull: true
immich_role_docker_image_repo
# Type: string
immich_role_docker_image_repo: "ghcr.io/imagegenius/immich"
immich_role_docker_image_tag
# Type: string
immich_role_docker_image_tag: "latest"
immich_role_docker_image
# Type: string
immich_role_docker_image: "{{ lookup('role_var', '_docker_image_repo', role='immich') }}:{{ lookup('role_var', '_docker_image_tag', role='immich') }}"
Envs
immich_role_docker_envs_default
# Type: dict
immich_role_docker_envs_default:
PUID: "{{ uid }}"
PGID: "{{ gid }}"
TZ: "{{ tz }}"
DB_HOSTNAME: "{{ lookup('role_var', '_postgres_name', role='immich') }}"
DB_USERNAME: "{{ lookup('role_var', '_postgres_user', role='immich') }}"
DB_PASSWORD: "{{ lookup('role_var', '_postgres_password', role='immich') }}"
DB_DATABASE_NAME: "{{ lookup('role_var', '_postgres_docker_env_db', role='immich') }}"
REDIS_HOSTNAME: "{{ immich_name }}-redis"
DISABLE_MACHINE_LEARNING: "false"
MACHINE_LEARNING_WORKERS: "1"
MACHINE_LEARNING_WORKER_TIMEOUT: "120"
immich_role_docker_envs_custom
# Type: dict
immich_role_docker_envs_custom: {}
Volumes
immich_role_docker_volumes_default
# Type: list
immich_role_docker_volumes_default:
- "{{ lookup('role_var', '_paths_location', role='immich') }}:/config"
- "{{ lookup('role_var', '_photos_location', role='immich') }}:/photos"
immich_role_docker_volumes_custom
# Type: list
immich_role_docker_volumes_custom: []
Hostname
immich_role_docker_hostname
# Type: string
immich_role_docker_hostname: "{{ immich_name }}"
Networks
immich_role_docker_networks_alias
# Type: string
immich_role_docker_networks_alias: "{{ immich_name }}"
immich_role_docker_networks_default
# Type: list
immich_role_docker_networks_default: []
immich_role_docker_networks_custom
# Type: list
immich_role_docker_networks_custom: []
Restart Policy
immich_role_docker_restart_policy
# Type: string
immich_role_docker_restart_policy: unless-stopped
State
immich_role_docker_state
# Type: string
immich_role_docker_state: started
Dependencies
immich_role_depends_on
# Type: string
immich_role_depends_on: "{{ lookup('role_var', '_postgres_name', role='immich') }},{{ immich_name }}-redis"
immich_role_depends_on_delay
# Type: string (quoted number)
immich_role_depends_on_delay: "0"
immich_role_depends_on_healthchecks
# Type: string ("true"/"false")
immich_role_depends_on_healthchecks: "false"
The following advanced options are available via create_docker_container but are not defined in the role. See: docker_container module
Resource Limits
immich_role_docker_blkio_weight
# Type: int
immich_role_docker_blkio_weight:
immich_role_docker_cpu_period
# Type: int
immich_role_docker_cpu_period:
immich_role_docker_cpu_quota
# Type: int
immich_role_docker_cpu_quota:
immich_role_docker_cpu_shares
# Type: int
immich_role_docker_cpu_shares:
immich_role_docker_cpus
# Type: string
immich_role_docker_cpus:
immich_role_docker_cpuset_cpus
# Type: string
immich_role_docker_cpuset_cpus:
immich_role_docker_cpuset_mems
# Type: string
immich_role_docker_cpuset_mems:
immich_role_docker_kernel_memory
# Type: string
immich_role_docker_kernel_memory:
immich_role_docker_memory
# Type: string
immich_role_docker_memory:
immich_role_docker_memory_reservation
# Type: string
immich_role_docker_memory_reservation:
immich_role_docker_memory_swap
# Type: string
immich_role_docker_memory_swap:
immich_role_docker_memory_swappiness
# Type: int
immich_role_docker_memory_swappiness:
immich_role_docker_shm_size
# Type: string
immich_role_docker_shm_size:
Security & Devices
immich_role_docker_cap_drop
# Type: list
immich_role_docker_cap_drop:
immich_role_docker_cgroupns_mode
# Type: string
immich_role_docker_cgroupns_mode:
immich_role_docker_device_cgroup_rules
# Type: list
immich_role_docker_device_cgroup_rules:
immich_role_docker_device_read_bps
# Type: list
immich_role_docker_device_read_bps:
immich_role_docker_device_read_iops
# Type: list
immich_role_docker_device_read_iops:
immich_role_docker_device_requests
# Type: list
immich_role_docker_device_requests:
immich_role_docker_device_write_bps
# Type: list
immich_role_docker_device_write_bps:
immich_role_docker_device_write_iops
# Type: list
immich_role_docker_device_write_iops:
immich_role_docker_devices
# Type: list
immich_role_docker_devices:
immich_role_docker_devices_default
# Type: string
immich_role_docker_devices_default:
immich_role_docker_groups
# Type: list
immich_role_docker_groups:
immich_role_docker_privileged
# Type: bool (true/false)
immich_role_docker_privileged:
immich_role_docker_security_opts
# Type: list
immich_role_docker_security_opts:
immich_role_docker_user
# Type: string
immich_role_docker_user:
immich_role_docker_userns_mode
# Type: string
immich_role_docker_userns_mode:
Networking
immich_role_docker_dns_opts
# Type: list
immich_role_docker_dns_opts:
immich_role_docker_dns_search_domains
# Type: list
immich_role_docker_dns_search_domains:
immich_role_docker_dns_servers
# Type: list
immich_role_docker_dns_servers:
immich_role_docker_domainname
# Type: string
immich_role_docker_domainname:
immich_role_docker_exposed_ports
# Type: list
immich_role_docker_exposed_ports:
immich_role_docker_hosts
# Type: dict
immich_role_docker_hosts:
immich_role_docker_hosts_use_common
# Type: bool (true/false)
immich_role_docker_hosts_use_common:
immich_role_docker_ipc_mode
# Type: string
immich_role_docker_ipc_mode:
immich_role_docker_links
# Type: list
immich_role_docker_links:
immich_role_docker_network_mode
# Type: string
immich_role_docker_network_mode:
immich_role_docker_pid_mode
# Type: string
immich_role_docker_pid_mode:
immich_role_docker_ports
# Type: list
immich_role_docker_ports:
immich_role_docker_uts
# Type: string
immich_role_docker_uts:
Storage
immich_role_docker_keep_volumes
# Type: bool (true/false)
immich_role_docker_keep_volumes:
immich_role_docker_mounts
# Type: list
immich_role_docker_mounts:
immich_role_docker_storage_opts
# Type: dict
immich_role_docker_storage_opts:
immich_role_docker_tmpfs
# Type: list
immich_role_docker_tmpfs:
immich_role_docker_volume_driver
# Type: string
immich_role_docker_volume_driver:
immich_role_docker_volumes_from
# Type: list
immich_role_docker_volumes_from:
immich_role_docker_volumes_global
# Type: bool (true/false)
immich_role_docker_volumes_global:
immich_role_docker_working_dir
# Type: string
immich_role_docker_working_dir:
Monitoring & Lifecycle
immich_role_docker_auto_remove
# Type: bool (true/false)
immich_role_docker_auto_remove:
immich_role_docker_cleanup
# Type: bool (true/false)
immich_role_docker_cleanup:
immich_role_docker_force_kill
# Type: string
immich_role_docker_force_kill:
immich_role_docker_healthcheck
# Type: dict
immich_role_docker_healthcheck:
immich_role_docker_healthy_wait_timeout
# Type: int
immich_role_docker_healthy_wait_timeout:
immich_role_docker_init
# Type: bool (true/false)
immich_role_docker_init:
immich_role_docker_kill_signal
# Type: string
immich_role_docker_kill_signal:
immich_role_docker_log_driver
# Type: string
immich_role_docker_log_driver:
immich_role_docker_log_options
# Type: dict
immich_role_docker_log_options:
immich_role_docker_oom_killer
# Type: bool (true/false)
immich_role_docker_oom_killer:
immich_role_docker_oom_score_adj
# Type: int
immich_role_docker_oom_score_adj:
immich_role_docker_output_logs
# Type: bool (true/false)
immich_role_docker_output_logs:
immich_role_docker_paused
# Type: bool (true/false)
immich_role_docker_paused:
immich_role_docker_recreate
# Type: bool (true/false)
immich_role_docker_recreate:
immich_role_docker_restart_retries
# Type: int
immich_role_docker_restart_retries:
immich_role_docker_stop_timeout
# Type: int
immich_role_docker_stop_timeout:
Other Options
immich_role_docker_capabilities
# Type: list
immich_role_docker_capabilities:
immich_role_docker_cgroup_parent
# Type: string
immich_role_docker_cgroup_parent:
immich_role_docker_commands
# Type: list
immich_role_docker_commands:
immich_role_docker_create_timeout
# Type: int
immich_role_docker_create_timeout:
immich_role_docker_entrypoint
# Type: string
immich_role_docker_entrypoint:
immich_role_docker_env_file
# Type: string
immich_role_docker_env_file:
immich_role_docker_labels
# Type: dict
immich_role_docker_labels:
immich_role_docker_labels_use_common
# Type: bool (true/false)
immich_role_docker_labels_use_common:
immich_role_docker_read_only
# Type: bool (true/false)
immich_role_docker_read_only:
immich_role_docker_runtime
# Type: string
immich_role_docker_runtime:
immich_role_docker_sysctls
# Type: list
immich_role_docker_sysctls:
immich_role_docker_ulimits
# Type: list
immich_role_docker_ulimits:
immich_role_autoheal_enabled
# Enable or disable Autoheal monitoring for the container created when deploying
# Type: bool (true/false)
immich_role_autoheal_enabled: true
immich_role_depends_on
# List of container dependencies that must be running before the container start
# Type: string
immich_role_depends_on: ""
immich_role_depends_on_delay
# Delay in seconds before starting the container after dependencies are ready
# Type: string (quoted number)
immich_role_depends_on_delay: "0"
immich_role_depends_on_healthchecks
# Enable healthcheck waiting for container dependencies
# Type: string ("true"/"false")
immich_role_depends_on_healthchecks:
immich_role_diun_enabled
# Enable or disable Diun update notifications for the container created when deploying
# Type: bool (true/false)
immich_role_diun_enabled: true
immich_role_dns_enabled
# Enable or disable automatic DNS record creation for the container
# Type: bool (true/false)
immich_role_dns_enabled: true
immich_role_docker_controller
# Enable or disable Saltbox Docker Controller management for the container
# Type: bool (true/false)
immich_role_docker_controller: true
immich_role_docker_image_repo
# Type: string
immich_role_docker_image_repo:
immich_role_docker_image_tag
# Type: string
immich_role_docker_image_tag:
immich_role_docker_volumes_download
# Type: bool (true/false)
immich_role_docker_volumes_download:
immich_role_paths_location
# Type: string
immich_role_paths_location:
immich_role_photos_location
# Type: string
immich_role_photos_location:
immich_role_postgres_docker_env_db
# Type: string
immich_role_postgres_docker_env_db:
immich_role_postgres_name
# Type: string
immich_role_postgres_name:
immich_role_postgres_password
# Type: string
immich_role_postgres_password:
immich_role_postgres_user
# Type: string
immich_role_postgres_user:
immich_role_themepark_addons
# Type: string
immich_role_themepark_addons:
immich_role_themepark_app
# Type: string
immich_role_themepark_app:
immich_role_themepark_theme
# Type: string
immich_role_themepark_theme:
immich_role_traefik_api_endpoint
# Type: dict/omit
immich_role_traefik_api_endpoint:
immich_role_traefik_api_middleware
# Type: string
immich_role_traefik_api_middleware:
immich_role_traefik_api_middleware_http
# Type: string
immich_role_traefik_api_middleware_http:
immich_role_traefik_autodetect_enabled
# Enable Traefik autodetect middleware for the container
# Type: bool (true/false)
immich_role_traefik_autodetect_enabled: false
immich_role_traefik_certresolver
# Type: string
immich_role_traefik_certresolver:
immich_role_traefik_crowdsec_enabled
# Enable CrowdSec middleware for the container
# Type: bool (true/false)
immich_role_traefik_crowdsec_enabled: false
immich_role_traefik_error_pages_enabled
# Enable custom error pages middleware for the container
# Type: bool (true/false)
immich_role_traefik_error_pages_enabled: false
immich_role_traefik_gzip_enabled
# Enable gzip compression middleware for the container
# Type: bool (true/false)
immich_role_traefik_gzip_enabled: false
immich_role_traefik_middleware_http
# Type: string
immich_role_traefik_middleware_http:
immich_role_traefik_middleware_http_api_insecure
# Type: bool (true/false)
immich_role_traefik_middleware_http_api_insecure:
immich_role_traefik_middleware_http_insecure
# Type: bool (true/false)
immich_role_traefik_middleware_http_insecure:
immich_role_traefik_priority
# Type: string
immich_role_traefik_priority:
immich_role_traefik_robot_enabled
# Enable robots.txt middleware for the container
# Type: bool (true/false)
immich_role_traefik_robot_enabled: true
immich_role_traefik_tailscale_enabled
# Enable Tailscale-specific Traefik configuration for the container
# Type: bool (true/false)
immich_role_traefik_tailscale_enabled: false
immich_role_traefik_wildcard_enabled
# Enable wildcard certificate for the container
# Type: bool (true/false)
immich_role_traefik_wildcard_enabled: true
immich_role_web_domain
# Type: string
immich_role_web_domain:
immich_role_web_fqdn_override
# Override the Traefik fully qualified domain name (FQDN) for the container
# Type: list
immich_role_web_fqdn_override:
Example Override
immich_role_web_fqdn_override:
- "{{ traefik_host }}"
- "immich2.{{ user.domain }}"
- "immich.otherdomain.tld"
Note: Include {{ traefik_host }} to preserve the default FQDN alongside your custom entries
immich_role_web_host_override
# Override the Traefik web host configuration for the container
# Type: string
immich_role_web_host_override:
Example Override
immich_role_web_host_override: "Host(`{{ traefik_host }}`) || Host(`{{ 'immich2.' + user.domain }}`)"
Note: Use {{ traefik_host }} to include the default host configuration in your custom rule
immich_role_web_http_port
# Type: string (quoted number)
immich_role_web_http_port:
immich_role_web_http_scheme
# Type: string ("http"/"https")
immich_role_web_http_scheme:
immich_role_web_http_serverstransport
# Type: dict/omit
immich_role_web_http_serverstransport:
immich_role_web_scheme
# URL scheme to use for web access to the container
# Type: string ("http"/"https")
immich_role_web_scheme:
immich_role_web_serverstransport
# Type: dict/omit
immich_role_web_serverstransport:
immich_role_web_subdomain
# Type: string
immich_role_web_subdomain: