Start docker desktop on windows without login

Is there any way to start docker desktop on boot without logging?

I have an arch linux docker container with a special LAMP stack setup. I am trying to deploy it in a windows environment to avoid needing separate hardware for the program. IT works as expected when I set the container to --restart and set docker to run on log in. This is problematic as logging in a user automatically on a server is a security issue.

I have tried task scheduler which does not work. I have also tried always up (windows service program) which seems to get the docker desktop application running but not with the correct user so the container wont auto start.

I understand docker desktop is not for devel but I have a finished web application that I want to start on boot with windows, if this is not possible, I guess I can readjust how its deployed but being able to standardize across docker would be huge.

Thanks for reading.

Can you share a link to a documentation where you read that Docker Desktop is officially supported on a server? Or is it a Windows 10 or Windows 11 which you use like a server?

Either way, Docker Desktop is for development and not for using it in production without logging in with a user so if it is possible somehow, I don’t know how and it is most likely not supported.

1 Like

@rimelek there is nowhere Docker claims official supports for start on boot, but being that everything else works so well I figured I would ask if anyone has had any luck running it on boot. The container works fine on server 2022 as well as win 10. If what you are saying is this is not possible then I will leave the idea of containerizing my application.

Here is a stack overflow link where people claim to have solutions for this issue, but none actually work on windows 10 or server 2022.

How to start Docker on boot

Anyways thanks for your input.

Windows 11 with WSL actually provides a better experience than Ubuntu Desktop for use as a server with negligible performance difference. Much more flexibility with the ability to run multiple distros, and windows based applications if needed. I foresee more and more people taking this route in a non-professional or personal settings.

An option to start Docker Desktop on boot and not login would be much appreciated.

1 Like

I understand that using Windows 11 feels more comfortable for users who are familiar with Windows, but that dosn’t change the fact that Docker Desktop was not made for running as a server. It is for development and as such, I don’t think there will be a feature to run it on boot. You mentioned WSL on which Docker Desktop is based. You can run a WSL2 distribution yourself and install Docker in it. Even on Windows Server 2022. Then you can probably create a script that runs on boot and starts the WSL distribution in which you enabled systemd so Docker will start automatically. When Docker Desktop is used for development, developers can start it when they need to use it.

You can ask new features however in the roadmap

I have this solved with Windows ARSO. Configure " Sign-in and lock last interactive user automatically after a restart" as well as "
Configure the mode of automatically signing in and locking last interactive user after a restart or cold boot". The latter one may need RegEdit, I was not able to configure it via GUI for some reason.

Set Docker Desktop to start on login and not display the dashboard.

If you’re LAMPing it up you may also want mirrored networking for WSL, and I recommend to fix time sync. Time sync is a doozy on consumer WIndows, scroll down to the time sync section in Eth Docker docs for some ideas on how to solve it.

1 Like