Hi, install supports --repair, upgrade does not
what exactly is not working? user panel, admin panel, nginx or..?
run this to reinstall from scratch admin, user panel and cli (but keep all existing data):
nano fix.sh && bash fix.sh
then paste 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