coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: Server with already installed docker engine cannot be added/validated

Open linozen opened this issue 1 year ago • 8 comments

Description

I cannot seem to add a server (based on NixOS) with a running docker engine to Coolify. It's stuck on:

Server OS type is not supported for automated installation. Please install Docker manually before continuing: <Link to docs>

However, if I run command -v docker on the NixOS server, everything is working OK. The only difference to a Ubuntu-based server is that the executable is located at: /run/current-system/sw/bin/docker instead of /usr/bin/docker. But adding a symbolic link from /usr/bin/docker to the binary location on Ubuntu does not work either.

Minimal Reproduction (if possible, example repository)

  1. install docker engine on NixOS-based server
  2. Try to add the server in Coolify
  3. Validate that SSH connection succeeds
  4. Run into error mentioned above

Exception or Error

Server OS type is not supported for automated installation. Please install Docker manually before continuing: <Link to docs>

Version

v4.0.0-beta.174

linozen avatar Dec 29 '23 12:12 linozen

I never used NixOS based server, so it is time to test it.

andrasbacsai avatar Dec 30 '23 09:12 andrasbacsai

@andrasbacsai Haha, thanks @andrasbacsai! NixOS is a great system for container hosts as its package manager stores data on a read-only partition. All configuration for a host can be done in configuration files. For quick installation of a NixOS server instance on e.g. Hetzner, I recommend nixos-anywhere. They have an example file which works perfectly for a Hetzner host (it does everything including disk partitioning). If you need any further help debugging, let me know.

linozen avatar Dec 30 '23 12:12 linozen

@andrasbacsai Recently tried coolify on cloudlinux which is provided by our VPS provider, but having the same issue. Will this issue be any closer to getting solved?

theashishmaurya avatar May 21 '24 16:05 theashishmaurya

Having the same issue

Xallt avatar Jun 09 '24 15:06 Xallt

Managed to pinpoint it to this

https://github.com/coollabsio/coolify/blob/88581c898356e7292f999890a8aa6fff29e650ad/app/Livewire/Server/ValidateAndInstall.php#L83-L87

So it recommends manual installation but does not have a branch of logic for the case where the user did do a manual installation.

I suggest either:

  1. Adding the Docker-Engine checks inside of the if (!$this->supported_os_type) and proceed with version checking if that was successful
  2. Just prevent this from returning an error - make it so that the message is printed, but it doesn't exit with an error

Xallt avatar Jun 09 '24 16:06 Xallt

A temporary hack-fix was easy:

sudo su
cp /etc/os-release /etc/os-release.backup
vim /etc/os-release
<Change the ID field to `ubuntu` and exit>

Run the validation, it passes, then just restore the os-release

cp /etc/os-release.backup /etc/os-release
rm /etc/os-release.backup

Xallt avatar Jun 09 '24 16:06 Xallt

Same issue in Ubuntu, we have docker installed already and need to skip install docker in "validate and install docker" process

ananth-iyer avatar Jun 26 '24 09:06 ananth-iyer

Same issue on ID=manjaro - method for temporary change ID to ubuntu in /etc/os-release worked. Everything installed as needed.

kzakrzewski-photon avatar Jul 01 '24 12:07 kzakrzewski-photon

Same temp fix works with ID=pop (popos). Can this be fixed so that we dont need this workaround?

nmpereira avatar Jul 10 '24 16:07 nmpereira