Skip to content

Instantly share code, notes, and snippets.

@afkarxyz
Last active February 6, 2026 06:41
Show Gist options
  • Select an option

  • Save afkarxyz/fcb0977530ebc1f9c819162ec3d8b120 to your computer and use it in GitHub Desktop.

Select an option

Save afkarxyz/fcb0977530ebc1f9c819162ec3d8b120 to your computer and use it in GitHub Desktop.
Easypanel Patcher : Unlock Advanced Monitoring
#!/bin/bash
###############################################################################
# Easypanel Patcher
# Author: afkarxyz
###############################################################################
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
PATCH_DIR="/root/easypanel-patch"
DOCKERFILE="$PATCH_DIR/Dockerfile"
CUSTOM_IMAGE="easypanel/easypanel:patched"
ORIGINAL_IMAGE="easypanel/easypanel:latest"
get_service() {
docker service ls --filter "name=easypanel" --format "{{.Name}}" | head -1
}
patch_easypanel() {
echo -e "${GREEN}========================================================${NC}"
echo -e "${GREEN} Easypanel Patcher - PATCH${NC}"
echo -e "${GREEN}========================================================${NC}"
echo ""
if [ "$EUID" -ne 0 ]; then
echo -e "${RED}ERROR: Run as root${NC}"
exit 1
fi
read -p "Continue? (y/n): " -n 1 -r < /dev/tty
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 0
fi
echo -e "\n${YELLOW}[1/4]${NC} Creating Dockerfile..."
mkdir -p "$PATCH_DIR"
cat > "$DOCKERFILE" << 'EOF'
FROM easypanel/easypanel:latest
RUN sed -i '/<\/head>/i\
<style>\
a[href="/buy-license"] { display: none !important; }\
canvas[style*="blur"], tbody[style*="blur"], [style*="blur"] {\
filter: none !important;\
-webkit-filter: none !important;\
user-select: auto !important;\
pointer-events: auto !important;\
}\
.chakra-alert.css-ercdzk, .chakra-alert[data-status="warning"] {\
display: none !important;\
}\
</style>\
<script>\
(function() {\
function removeBlur() {\
document.querySelectorAll("[style*=blur]").forEach(el => {\
el.style.filter = "none";\
el.style.userSelect = "auto";\
el.style.pointerEvents = "auto";\
});\
document.querySelectorAll("a[href=\\"/buy-license\\"]").forEach(el => {\
el.style.display = "none";\
});\
document.querySelectorAll(".chakra-alert").forEach(el => {\
if (el.textContent.includes("Buy License")) {\
el.style.display = "none";\
}\
});\
}\
removeBlur();\
setInterval(removeBlur, 500);\
const observer = new MutationObserver(removeBlur);\
observer.observe(document.body, {\
childList: true,\
subtree: true,\
attributes: true,\
attributeFilter: ["style"]\
});\
})();\
</script>' /app/frontend/index.html
EOF
echo -e "${YELLOW}[2/4]${NC} Building image..."
cd "$PATCH_DIR"
if ! docker build -t "$CUSTOM_IMAGE" . > /tmp/build.log 2>&1; then
echo -e "${RED}ERROR: Build failed${NC}"
cat /tmp/build.log
exit 1
fi
echo -e "${YELLOW}[3/4]${NC} Finding service..."
SERVICE=$(get_service)
if [ -z "$SERVICE" ]; then
echo -e "${RED}ERROR: Service not found${NC}"
exit 1
fi
echo -e "${YELLOW}[4/4]${NC} Updating service..."
if ! docker service update --image "$CUSTOM_IMAGE" "$SERVICE" > /dev/null 2>&1; then
echo -e "${RED}ERROR: Update failed${NC}"
exit 1
fi
echo ""
echo -e "${GREEN}========================================================${NC}"
echo -e "${GREEN} Patch Applied${NC}"
echo -e "${GREEN}========================================================${NC}"
echo ""
echo -e "${YELLOW}Clear browser cache (Ctrl+Shift+R)${NC}"
echo ""
}
unpatch_easypanel() {
echo -e "${RED}========================================================${NC}"
echo -e "${RED} Easypanel Patcher - UNPATCH${NC}"
echo -e "${RED}========================================================${NC}"
echo ""
if [ "$EUID" -ne 0 ]; then
echo -e "${RED}ERROR: Run as root${NC}"
exit 1
fi
if ! docker images | grep -q "$CUSTOM_IMAGE"; then
echo -e "${YELLOW}Nothing to unpatch${NC}"
exit 0
fi
read -p "Continue? (y/n): " -n 1 -r < /dev/tty
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 0
fi
echo -e "\n${YELLOW}[1/3]${NC} Finding service..."
SERVICE=$(get_service)
if [ -z "$SERVICE" ]; then
echo -e "${RED}ERROR: Service not found${NC}"
exit 1
fi
echo -e "${YELLOW}[2/3]${NC} Restoring original image..."
if ! docker service update --image "$ORIGINAL_IMAGE" "$SERVICE" > /dev/null 2>&1; then
echo -e "${RED}ERROR: Restore failed${NC}"
exit 1
fi
echo -e "${YELLOW}[3/3]${NC} Cleaning up..."
docker rmi "$CUSTOM_IMAGE" > /dev/null 2>&1
rm -rf "$PATCH_DIR"
echo ""
echo -e "${GREEN}========================================================${NC}"
echo -e "${GREEN} Unpatch Complete${NC}"
echo -e "${GREEN}========================================================${NC}"
echo ""
}
show_menu() {
while true; do
echo -e "${BLUE}========================================================${NC}"
echo -e "${BLUE} Easypanel Patcher${NC}"
echo -e "${BLUE} by afkarxyz${NC}"
echo -e "${BLUE}========================================================${NC}"
echo ""
echo -e " ${GREEN}1)${NC} Patch"
echo -e " ${RED}2)${NC} Unpatch"
echo -e " ${YELLOW}3)${NC} Exit"
echo ""
read -p "Choice [1-3]: " choice < /dev/tty
echo ""
case $choice in
1) patch_easypanel; break ;;
2) unpatch_easypanel; break ;;
3) exit 0 ;;
*) echo -e "${RED}Invalid${NC}\n" ;;
esac
done
}
if [ $# -eq 0 ]; then
show_menu
else
case "$1" in
patch|--patch|-p) patch_easypanel ;;
unpatch|--unpatch|-u) unpatch_easypanel ;;
--help|-h)
echo "Easypanel Patcher by afkarxyz"
echo ""
echo "Usage:"
echo " $0 Interactive menu"
echo " $0 patch Apply patch"
echo " $0 unpatch Remove patch"
exit 0
;;
*)
echo -e "${RED}Invalid option${NC}"
exit 1
;;
esac
fi
@afkarxyz
Copy link
Copy Markdown
Author

afkarxyz commented Feb 6, 2026

curl -fsSL https://gist.githubusercontent.com/afkarxyz/fcb0977530ebc1f9c819162ec3d8b120/raw/easypanel-patcher.sh -o /tmp/easypanel-patcher.sh && sudo bash /tmp/easypanel-patcher.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment