I'm running Docker on a virtual machine hosted by Proxmox, and I've set up a Docker Compose configuration for two services: Tailscale and Jellyfin. When I use `docker compose up -d`, both containers launch perfectly, and I can access Jellyfin via Tailscale's magicDNS without any issues. However, after I reboot the VM, only the Tailscale container starts automatically. The Jellyfin container doesn't generate any log entries after the reboot, so it seems like it's not starting up at all. I'm quite new to this and might be missing a crucial step. Can anyone guide me on how to make sure Jellyfin starts up after a reboot? Here's my docker-compose.yml configuration for reference.
3 Answers
It looks like the main issue is that your Jellyfin service doesn't have a `restart` policy defined. You have `restart: always` set for your Tailscale container, but without it for Jellyfin, it won't automatically start after a reboot. Try adding `restart: always` to the Jellyfin section as well, and see if that fixes the problem! Some people also prefer `restart: unless-stopped` as it allows for safer maintenance reboots, but either should work fine here.
Just a heads up—Docker Compose doesn’t manage dependencies perfectly after a reboot. Having `depends_on` in your configuration might not be reliable in this case. You might want to explore creating a systemd service or startup script to handle starting your containers in the correct order after a system reboot. It may sound daunting, but it could really simplify things down the road.
You definitely want to ensure that both services have the same restart policy. Right now, Jellyfin lacks the `restart: always` setting, which means Docker won't start it automatically after a reboot. If adding that doesn't solve the issue, you might need to look into creating a startup script or using systemd to manage your containers. Docker Compose doesn’t automatically handle service dependencies during reboots, so a little extra setup might be necessary.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures