I’m running Ubuntu 22.04 on an ESXi VM. I’ve got a container that needs to run 24/7. When my server boots up, the VM auto starts. But Docker Desktop will not start until after I’ve logged into the Ubuntu VM. Is there a way to get it to autostart without needing me to log in?
Docker Desktop is for development. If you want to run containers in production 24/7, you need Docker CE.
I’m using Ubuntu 24.04 LTS and had same issue
This is how to auto start Docker Desktop at user login (You must configure your user to auto login)
cd to ~/.config/autostart/
OR
cd /home/username/.config/autostart
If you don’t have a folder named autostart then create one with that name using mkdir autostart.
Create a new file with the name “Docker-Desktop.desktop”
nano Docker-Desktop.desktop
Add the following lines
[Desktop Entry]
Exec=/opt/docker-desktop/bin/docker-desktop
Name=Docker Desktop
Type=Application
Reboot
Done! … problem solved
2 Likes