I encountered a critical system error while using OpenPanel on my Ubuntu server. After some investigation, I discovered that the current version of OpenPanel (v0.2.7) is still in the process of troubleshooting HTTPS protocol, DNS allocation, and certificate management.
The issue arose when I attempted to use these beta features. After installation, the OpenPanel website went down, and I couldn’t bring it back up using the command:
opencli admin on
I have been struggling to uninstall OpenPanel from my system. Unfortunately, the support team was not able to provide a clear solution. They mentioned that I need to manually reverse the steps in the installation bash script, which seems impractical and error-prone. (Super sad but during my troubleshooting efforts, I also faced a Docker crash error, which has further complicated the situation.)
Does anyone have a reliable method to completely uninstall OpenPanel from an Ubuntu server?
I tried below method, but didn't work.
nano fix.sh && bash fix.sh
Then pasted this content:
#!/bin/bash
service admin stop
rm -rf /usr/local/admin/.git
rm -rf /usr/local/admin/*
current_python_version=$(python3 --version 2>&1 | cut -d " " -f 2 | cut -d "." -f 1,2 | tr -d '.')
OPENPADMIN_DIR="/usr/local/admin/" #openadmin files
if [ -f /etc/os-release ] && grep -q "Ubuntu 22" /etc/os-release; then
echo "Downloading files for Ubuntu22 and python version $current_python_version"
git clone -b $current_python_version --single-branch https://github.com/stefanpejcic/openadmin $OPENPADMIN_DIR
cd $OPENPADMIN_DIR
pip install --default-timeout=3600 -r requirements.txt
# Ubuntu 24
elif [ -f /etc/os-release ] && grep -q "Ubuntu 24" /etc/os-release; then
echo "Downloading files for Ubuntu24 and python version $current_python_version"
git clone -b $current_python_version --single-branch https://github.com/stefanpejcic/openadmin $OPENPADMIN_DIR
cd $OPENPADMIN_DIR
pip install --default-timeout=3600 -r requirements.txt --break-system-packages
# on ubuntu24 we need to use overlay instead of devicemapper!
OVERLAY=true
# Debian12 and 11
elif [ -f /etc/debian_version ]; then
echo "Installing PIP and Git"
apt-get install git pip python3-yaml -y > /dev/null 2>&1
echo "Downloading files for Debian and python version $current_python_version"
git clone -b debian-$current_python_version --single-branch https://github.com/stefanpejcic/openadmin $OPENPADMIN_DIR
cd $OPENPADMIN_DIR
pip install --default-timeout=3600 -r requirements.txt
pip install --default-timeout=3600 -r requirements.txt --break-system-packages
# other
fi
service admin start
PANEL_VERSION="0.2.3"
mkdir -p /usr/local/admin
wget -O /tmp/opencli.tar.gz "https://storage.googleapis.com/openpanel/${PANEL_VERSION}/get.openpanel.co/downloads/${PANEL_VERSION}/opencli/opencli-main.tar.gz" > /dev/null 2>&1
mkdir -p /tmp/opencli
cd /tmp/ && tar -xzf opencli.tar.gz -C /tmp/opencli
mkdir -p /usr/local/admin/scripts
cp -r /tmp/opencli/* /usr/local/admin/scripts > /dev/null 2>&1 || cp -r /tmp/opencli/opencli-main /usr/local/admin/scripts > /dev/null 2>&1
rm /tmp/opencli.tar.gz > /dev/null 2>&1
rm -rf /tmp/opencli > /dev/null 2>&1
cp /usr/local/admin/scripts/opencli /usr/local/bin/opencli
chmod +x /usr/local/bin/opencli > /dev/null 2>&1
chmod +x -R /usr/local/admin/scripts/ > /dev/null 2>&1
opencli commands
source ~/.bashrc
docker stop openpanel
docker rm openpanel
docker pull openpanel/openpanel
cd /root
docker compose down && docker compose up -d
To address this, I created an uninstall script that effectively removes OpenPanel and its components from my Ubuntu server. Here’s the script I used:
After running this script, I was able to completely remove OpenPanel from my system. If anyone else is facing similar issues, I hope this script helps you uninstall OpenPanel effectively.
Troubleshooting Tips
If you encounter any errors or if certain commands fail, try running the script with
sudo
privileges and making the script executable withchmod +x uninstall.sh
.Ensure that you are running the script from the correct directory or provide the full path to the
docker-compose.yml
file.If you still face issues with Docker, try restarting the Docker service or checking its logs for more information.
By following these steps, you can ensure a cleaner uninstallation process and avoid potential issues with leftover configurations. Thanks to Stefan for sharing this valuable information!