Win 11: Docker Desktop Alternate UserID

Hi,

I’m running the latest Docker Desktop on Win 11 Pro to allow myself to run Nextcloud however I was stupid enough to install it under an admin ID which I’d rather not use. Docker Desktop doesn’t appear to run as a service i.e. it needs to log on… please correct me if I’m wrong as that might mean all my problems go away :slight_smile:

On the assumption that DD can’t run as a service, I’ve created a new UserID (without admin privileges) and have configured auto-logon. When I try to run DD, it takes me through the configuration again and, since I’ve spent some time configuring Nextcloud on DD, I don’t want to lose what I’ve done.

My aim is to create (on Win 11) a system that runs Nextcloud automatically from boot so I’m open to ideas.

Thanks :slight_smile:

James

Hi. Docker Desktop is for development not for using it as a service. There were discussions about it in many other topics and some users managed to find some tricky ways, but I would not recommend it if you are planning to use it in the long term. Since it was not designed to run as a service, whatever you do, it can break with any update.

If you want to keep what you already configured as an admin user, you can run Docker Desktop there again and export the volumes, move the configuration files to another users.

If you are just playing with Docker, it is okay to try it interactively and learn about what it can do, but when you intention is to run it for long, you should configure it in a way that allows you to move the project to a new machne or just restore the project when anything happens with Docker Desktop.

So hopefully you used a compose file you still have the command to recreate the project under another user using the same images and parameters, and have the config files mounted from Windows. If not, you need to figure out where data was stored, and copy that out and move to the new location.

Everything depends on what and how you did so far, so I would not describe the whole process yet, but if you want, we can discuss how you can move your work under the new user.

Docker Desktop stores its virtual machine image under “AppData”, the hidden folder in the user’s profile folder, but I have no idea if just copying that to the new user could work. It seems risky at least.

Regarding starting your container automatically on Windows boot, the safer way is to start a Linux virtual machine and configure that to start automatically, and install Docker CE in that virtual machine.

If it really has to work as a server, the best would be using a bare metal Linux or Windows Server machine instead of a VM running on Windows 11 Pro, but that should work too as long as you know how to create and configure the VM to start automatically.

That’s a shame, I was hoping for a way to avoid Linux since it mostly baffles the hell outta me!

Containerisation within a Linux virtual machine? That seems like overkill… I mean, wouldn’t it be simpler just running a Linux VM and installing the app natively within it?

I did try installing the docker daemon but that mucked everything up so…

Thanks anyway.

James

That’s how most containers are run, regardless whether it’s for an enterprise or within a home lab.

If you feel it is simpler to follow the installation instructions of the application and it’s dependencies, then go for it!

I personally don’t like that config files and persistent data could be scattered over the file system. With a container someone usually came up with an image that has a more or less clever entrypoint script that allows configuring the application conveniently using environment variables, instead of having to edit files manually. They share which container paths are used to store persistent data, so you can bind a host folder into those container paths and have full control where the files/folders are on the host. And with docker compose, you have a repeatable way to setup and update a set of containers on any docker host without much effort..

You are still using Linux containers, so there is always a Linux. Docker Desktop just hides it from you.

Depends on what the app is. @meyay explained how containers and a container image cat help, but there are other ways to run an application easily if you have only one app and you don’t want to use containers, but as long as you want to use an app made for Linux, you will always have a Linux VM at least. Sicne you also want it to start automatically, that requires a tool made for servers not a developer tool for interactive users.

I hope you will find the best for you, but if you have problems with Docker in the future, we are still happy to help.

You mean you tried installing the Docker daemon on Windows or in a Linux VM?