Skip to content

Instantly share code, notes, and snippets.

@scudo005
Last active January 17, 2025 11:24
Show Gist options
  • Select an option

  • Save scudo005/70f84fb4a8543b1436aeabe49d21ad64 to your computer and use it in GitHub Desktop.

Select an option

Save scudo005/70f84fb4a8543b1436aeabe49d21ad64 to your computer and use it in GitHub Desktop.
A SystemD unit to start your Immich server at boot
# Before doing anything, enable your Docker service via systemctl.
# You can now extract the Docker image anywhere you want.
# To start the server automatically, put this unit file in /etc/systemd/system, chmod 664 the unit file and run systemctl enable immich.service to enable the unit.
# If systemctl says it can't find the unit file, and you are sure it is in the correct path, it might be that SELinux is blocking the unit file from being read by SystemD.
# First of all, check if this is the case by running sealert -l "*"; if it reports that SystemD was prevented from reading the unit file, you can make an exception
# in the SELinux context by running restorecon -v /etc/systemd/system/immich.service.
[Unit]
Description=Immich server
Requires=docker.service
After=docker.service
[Service]
Restart=always
ExecStart=/usr/bin/docker compose -f /path/to/your/docker-compose.yml up -d
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment