Fix Docker API Version Error for CasaOS (App Not Loading)

@dragonfire1119 Thanks, I got CasaOs running again.

1 run command bash -c “$(wget -qLO - https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/casaos-fix-docker-api-version/run.sh)”

  1. run command wget -qO- https://get.casaos.io | sudo bash.

Everything is working again for me… thanks for the help.

1 Like

Didn’t work for me - got this error during the script -

Adding Docker’s official GPG key…
curl: (22) The requested URL returned error: 404
ERROR: Failed to download Docker GPG key
ERROR: Failed to set up Docker repository
ERROR: Docker installation/configuration failed

However @Malagoni’s instructions worked. Thank you!

OS: Ubuntu 24.04.3 LTS x86_64

Hello, I am experiencing the same error. attempted the domain resolution fix of creating and sudo running a run.sh file of the script (from github). I also seem to have two instances of docker installed, I think I may have installed docker before installing casaos with curl -fsSL ``https://get.casaos.io`` | sudo bash Posting output from running the script below .

–2025-12-09 01:04:01--  https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/casaos-fix-docker-api-version/run.shResolving raw.githubusercontent.com (raw.githubusercontent.com)… 185.199.110.133, 185.199.111.133, 185.199.109.133, …Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443… connected.HTTP request sent, awaiting response… 200 OKLength: 78509 (77K) [text/plain]Saving to: ‘STDOUT’

                        100%[=================================================>]  76.67K  --.-KB/s    in 0.02s

2025-12-09 01:04:01 (3.16 MB/s) - written to stdout [78509/78509]

==========================================BigBear CasaOS Docker Version Fix Script 2025.12.1

Here are some links:https://community.bigbeartechworld.com

If you would like to support me, please consider buying me a tea:

==========================================

Step 1: Checking system…Detected OS: ubuntu noble

Step 1a: Checking network connectivity…✓ Network connectivity OK

Step 1b: Verifying Docker 28.x availability…Checking Docker 28.x availability for ubuntu noble…✓ Docker 28.x should be available for your OS version

Step 1c: Checking for Snap Docker installation…Checking for Docker installed via Snap…No Docker Snap package found

Step 1d: Checking for multiple Docker binaries…Checking for Docker binary locations…

==========================================WARNING: Multiple Docker binaries found!

/usr/bin/docker/bin/docker

This may cause version conflicts.After installation, verify which binary is being used with: which docker

Step 2: Checking for CasaOS…CasaOS is installed: v0.4.15

Step 2a: Checking environment…Running on standard system (not LXC)

Step 3: Displaying current Docker versions…Current Docker versions:Client: Docker Engine - CommunityVersion:           29.1.2API version:       1.52Go version:        go1.25.5Git commit:        890dccaBuilt:             Tue Dec  2 21:55:19 2025OS/Arch:           linux/amd64Context:           default

Server: Docker Engine - CommunityEngine:Version:          29.1.2API version:      1.52 (minimum version 1.44)Go version:       go1.25.5Git commit:       de45c2aBuilt:            Tue Dec  2 21:55:19 2025OS/Arch:          linux/amd64Experimental:     falsecontainerd:Version:          v2.2.0GitCommit:        1c4457e00facac03ce1d75f7b6777a7a851e5c41runc:Version:          1.3.4GitCommit:        v1.3.4-0-gd6d73eb8docker-init:Version:          0.19.0GitCommit:        de40ad0

Installed Docker packages:containerd.io 2.2.0-2~ubuntu.24.04~nobledocker-ce 5:29.1.2-1~ubuntu.24.04~nobledocker-ce-cli 5:29.1.2-1~ubuntu.24.04~nobledocker-ce-rootless-extras 5:29.1.2-1~ubuntu.24.04~noble

Step 3a: Checking current Docker API version…Current Docker API version: 1.52

Step 4: Stopping CasaOS services (if installed)…Stopping CasaOS services…Stopping casaos-gateway.service…Stopping casaos-message-bus.service…Stopping casaos-local-storage.service…Stopping casaos-app-management.service…Stopping casaos.service…

Step 5: Removing standalone docker-compose if present…Step 6: Cleaning Docker state and fixing permissions…Cleaning Docker runtime state…Stopping Docker service…Stopping ‘docker.service’, but its triggering units are still active:docker.socket

Stopping Docker socket…

Checking for lingering Docker processes…Cleaning Docker sockets and pids…

Cleaning containerd runtime state…

Docker runtime cleanup completeDocker will set its own directory permissions on startup

Step 7: Installing Docker version compatible with CasaOS…Setting up Docker repository…Cleaning up old Docker repository configurations…Removing old Docker GPG keys…Cleaning apt cache…Updating package lists (timeout: 300s)…Err:8  noble Release404  Not Found [IP: 140.82.116.4 443]Reading package lists…E: The repository ‘ noble Release’ does not have a Release file.WARNING: apt-get update timed out or had issuesTrying one more time…Hit:1  noble InReleaseHit:2  noble-updates InReleaseHit:3  noble-security InReleaseGet:4 https://pkgs.tailscale.com/stable/ubuntu noble InReleaseHit:5  noble-backports InReleaseIgn:6  noble InReleaseErr:7  noble Release404  Not Found [IP: 140.82.116.4 443]Reading package lists… DoneE: The repository ‘ noble Release’ does not have a Release file.N: Updating from such a repository can’t be done securely, and is therefore disabled by default.N: See apt-secure(8) manpage for repository creation and user configuration details.ERROR: Failed to update package lists after retryThis could be due to:

Slow or broken repository mirrors

Network connectivity issues

Repository configuration problems

You may want to try the override.conf method instead:https://community.bigbeartechworld.comERROR: Failed to set up Docker repository

ERROR: Docker installation/configuration failed

Attempting to start Docker…Docker started with previous configuration.The version downgrade may have failed, but Docker is running.

==========================================Docker Configuration Complete!

Installed Docker Package Versions:containerd.io = 2.2.0-2~ubuntu.24.04~nobledocker-ce = 5:29.1.2-1~ubuntu.24.04~nobledocker-ce-cli = 5:29.1.2-1~ubuntu.24.04~nobledocker-ce-rootless-extras = 5:29.1.2-1~ubuntu.24.04~noble

Containerd Package Version: 2.2.0-2~ubuntu.24.04~nobleContainerd Binary Version: containerd containerd.io v2.2.0 1c4457e00facac03ce1d75f7b6777a7a851e5c41

Docker Version Information:Client: Docker Engine - CommunityVersion:           29.1.2API version:       1.52Go version:        go1.25.5Git commit:        890dccaBuilt:             Tue Dec  2 21:55:19 2025OS/Arch:           linux/amd64Context:           default

Server: Docker Engine - CommunityEngine:Version:          29.1.2API version:      1.52 (minimum version 1.44)Go version:       go1.25.5Git commit:       de45c2aBuilt:            Tue Dec  2 21:55:19 2025OS/Arch:          linux/amd64Experimental:     falsecontainerd:Version:          v2.2.0GitCommit:        1c4457e00facac03ce1d75f7b6777a7a851e5c41runc:Version:          1.3.4GitCommit:        v1.3.4-0-gd6d73eb8docker-init:Version:          0.19.0GitCommit:        de40ad0

Docker Compose Version:Docker Compose version v5.0.0

Step 7a: Verifying Docker API version change…Verifying Docker API version…Current Docker API version: 1.52

⚠ WARNING: Docker API version is 1.52Expected: 1.47-1.51 (Docker 28.x - before API 1.52 breaking change)

Current version: 1.52You have a newer Docker version installed (API 1.52)

This might indicate:

The Docker repository setup failed (check for GPG key conflicts)

The Docker package installation didn’t work properly

You may need to use the ‘apply-override’ method instead

==========================================WARNING: Docker API Version Issue Detected

The Docker API version may not have changed as expected.

Diagnostic Information:

dockerd binary version:Docker version 29.1.2, build de45c2a

Running dockerd process(es):233790 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Docker binary in use:/usr/bin/dockerBinary location: /usr/bin/docker

Installed Docker packages:containerd.io = 2.2.0-2~ubuntu.24.04~nobledocker-ce = 5:29.1.2-1~ubuntu.24.04~nobledocker-ce-cli = 5:29.1.2-1~ubuntu.24.04~nobledocker-ce-rootless-extras = 5:29.1.2-1~ubuntu.24.04~noble

Docker service status:Docker service is active

==========================================Troubleshooting steps:

Verify the dockerd binary was actually replaced:dockerd --version(Should show version 28.0.x)

Manually restart Docker to ensure new binary loads:sudo systemctl stop dockersudo pkill -9 dockerdsudo systemctl start dockerdocker version

Check if there are multiple Docker installations:which -a dockerwhich -a dockerd

Verify package installation succeeded:dpkg -l | grep docker-ce(Should show version 5:28.0.x-1~…)

Check Docker daemon logs for errors:sudo journalctl -u docker --no-pager -n 50

Step 8: Configuring Docker permissions…User ‘keelan’ is already in docker group

Step 9: Restarting CasaOS services…Starting CasaOS services…Starting casaos-gateway.service…Starting casaos-message-bus.service…Starting casaos-user-service.service…Starting casaos-local-storage.service…Starting casaos-app-management.service…Starting casaos.service…

==========================================CasaOS Docker Fix Complete!

Docker has been set to version 28.0.x (API 1.47 - compatible with CasaOS)Docker packages have been held to prevent automatic upgrades.

To allow Docker to be upgraded in the future, run:sudo apt-mark unhold docker-ce docker-ce-cli containerd.io

If you found this helpful, please consider supporting BigBear:

The Docker client version error should now be resolved.You can now run your Docker commands without API version issues.

⚠ Docker API version unchanged: 1.52This may indicate the downgrade didn’t take effect.Please review the troubleshooting steps above.

Your fix worked for me! Thank you!

I ran the script, and tried the /systemd/system/docker.service.d fix above.

Neither fixed my casaos. Still failed to load apps

Hi.

Here is long story, how to fix it on Linuxmint 22.

First running of script does not fix my problem, output:

Setting up apt-transport-https (2.8.3) …

ERROR: Failed to install prerequisites
ERROR: Failed to set up Docker repository

ERROR: Docker installation/configuration failed

Attempting to start Docker…
…


Second running of script also does not fix it, output:

Adding Docker’s official GPG key…
curl: (22) The requested URL returned error: 404
Download failed, retrying in 5 seconds… (1/3)
curl: (22) The requested URL returned error: 404
Download failed, retrying in 5 seconds… (2/3)
curl: (22) The requested URL returned error: 404
Download failed, retrying in 5 seconds… (3/3)
Standard download failed. Trying with HTTP/1.1…
curl: (22) The requested URL returned error: 404
ERROR: Failed to download Docker GPG key (timeout or connection error)
Please check your internet connection and try again.
ERROR: Failed to set up Docker repository

ERROR: Docker installation/configuration failed


I try to setup override.conf mentioned here in topic by Malagoni, but it does not help me (yes, system was rebooted; and override.conf disappeared).

Problem is that I am using linuxmint 22, which does not have folder here:

So I replace $OS in this part of script:
https://download.docker.com/linux/$OS/gpg”
(line 938)
to word “ubuntu”:

https://download.docker.com/linux/ubuntu/gpg”

And third running of script was also not success:

Updating package lists with Docker repository (timeout: 300s)…
Err:8 ``https://download.docker.com/linux/linuxmint`` wilma Release
404 Not Found [IP: 65.9.95.34 443]

So I found on line 964 again $OS:
“deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] ``https://download.docker.com/linux/$OS
${VERSION_CODENAME} stable” |

so change manually to this:

“deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu` ```` ${UBUNTU_CODENAME} stable” | `

because VERSION_CODENAME is wilma, but UBUNTU_CODENAME is noble- and this string we need :slight_smile:

Next run of script freeze here:

Unpacking docker-compose-plugin (5.0.0-1~ubuntu.24.04~noble) over (5.0.0-1~debian.13~trixie) …
Setting up docker-buildx-plugin (0.30.1-1~ubuntu.24.04~noble) …
Setting up ``containerd.io`` (1.7.28-1~ubuntu.24.04~noble) …
/usr/sbin/policy-rc.d returned 101, not running ‘restart containerd.service’
Setting up docker-compose-plugin (5.0.0-1~ubuntu.24.04~noble) …
Setting up docker-ce-cli (5:28.5.2-1~ubuntu.24.04~noble) …
Setting up docker-ce (5:28.5.2-1~ubuntu.24.04~noble) …
invoke-rc.d: policy-rc.d denied execution of restart.
/usr/sbin/policy-rc.d returned 101, not running ‘restart docker.service docker.socket’
Processing triggers for man-db (2.12.0-4build2) ..

I open terminal next tab, run systemctl start docker. After that start services in this order (IMPORTANT!):

"casaos-gateway.service"
"casaos-message-bus.service"
"casaos-user-service.service"
"casaos-local-storage.service"
"casaos-app-management.service"
"casaos.service"

Almost all docker apps was started ok, just two was gray. I wait a second, but UI of casaOS crashed, self-resrtarted. And now seems stable. All apps are running.

I am not sure, if it is correct, but now I am on docker v28.5.2 and it works!

My HUGE thx for this script!

First tab of my Terminal was in this state:

⚠ apt-get returned an error, verifying package installation…
(starting services...)

So no magic here. That explains why the web UI restarted itself.

@Slatko_Slatko , please, provide us more details. See my post (all posts here). You must told Your OS version. Output of script. We do not know what is not working for You. So, community cannot help You.

@dragonfire1119 unless there’s something wrong with my setup, running the script in your guide needs to be done with sudo, and since some of the other commands you have listed explicitly include sudo, I think it would be less confusing for readers if both of the listed bash commands also included sudo, for consistency.