Use Azure Managed PostgreSQL to Reduce the Security Risks of Self-Hosted Databases

Background Recently, a Linux server deployed on Azure suddenly started showing sustained 100% CPU usage. After investigation, I found a malicious program running as the postgres user, with persistence maintained through a cron scheduled task. The PostgreSQL installation on this server had the following characteristics: Port 5432 was not exposed to the public internet through Azure NSG; PostgreSQL was not used by the current business workload; The actual business workload used local MySQL; However, the PostgreSQL service was still installed and running; The system still retained the postgres user, home directory, cron jobs, and historical scripts....

August 14, 2026 · 16 min

OpenWebUI Database Migration in Practice: Smoothly Migrating from Self-Hosted PostgreSQL on a VM to Azure Database for PostgreSQL

As the volume of users, conversations, files, and knowledge base data in OpenWebUI continued to grow, the self-hosted PostgreSQL instance on an Azure VM created an increasing operational burden, including database patching, backups, disaster recovery, storage monitoring, and security maintenance. To reduce maintenance costs and improve database reliability, I migrated the OpenWebUI application database from PostgreSQL running locally on the VM to Azure Database for PostgreSQL Flexible Server. This migration used the following approach:...

August 13, 2026 · 18 min