Strapi en VPS con aaPanel

Guía completa para instalar Strapi en un VPS con aaPanel: preparación de MySQL, Node.js, proxy inverso, PM2 y SSL Lets Encrypt, gestionando una API headless de forma segura y escalable.

18 ago 2025 • 3 min read • Q2BSTUDIO Team

Inteligencia-Artificial-

Compartimos mi experiencia instalando Strapi en un servidor VPS gestionado con aaPanel para crear una API robusta y flexible con un CMS headless de código abierto.

Fase 1 Preparación

1) Preparación de la base de datos Crear una base de datos MySQL desde el menú Databases en aaPanel incluyendo usuario y contraseña.

2) Entorno Nodejs Instalar el gestor de versiones de Nodejs desde App Store en aaPanel y seleccionar la versión LTS más reciente.

3) Instalación de Strapi Ejecutar el comando npx create-strapi-app@latest api.domain-name y seguir el asistente. Recomendaciones seleccionadas durante la instalación personalizada: cliente de base de datos MySQL, sin datos de ejemplo para mantener los productos limpios, TypeScript activado para seguridad de tipos, y git inicializado para control de versiones.

Fase 2 Git

1) Configurar autor de git Antes del primer commit configurar user.name y user.email en el VPS para acreditar contribuciones al perfil personal. Por ejemplo git config --global user.name farrosfr y git config --global user.email ID+farrosfr@users.noreply.github.com

2) Autenticación con token Utilizar un personal access token PAT para las operaciones HTTPS con GitHub ya que no se aceptan contraseñas normales.

Fase 3 Apache y reglas de proxy inverso

Al registrar el proyecto Node en aaPanel y acceder a api.domain-name/admin apareció un error 404 por conflicto de puertos con Apache. No detener Apache en un VPS con múltiples sitios PHP. Solución aplicada: eliminar la configuración en Node Project, crear un sitio en PHP Project con configuración estática y agregar una regla de reverse proxy apuntando a https://127.0.0.1:1337. Con esto la interfaz de administración de Strapi se mostró correctamente y fue posible crear la cuenta de administrador.

Fase 4 DNS SSL y PM2

1) DNS Añadir el registro A en el registrador del dominio para la verificación del certificado SSL.

2) SSL Instalar certificado Lets Encrypt desde aaPanel para asegurar el sitio.

3) Ejecución permanente Registrar nuevamente el proyecto en Node Project para que sea gestionado por PM2 y se mantenga en ejecución continua.

Consejos prácticos y buenas prácticas

Evitar detener servicios globales como Apache cuando el VPS aloja múltiples sitios, verificar puertos en uso y preferir configurar un proxy inverso para exponer aplicaciones Node detras de Apache o Nginx. Mantener control de versiones desde el inicio y usar TypeScript en Strapi mejora mantenibilidad. Para despliegues de producción supervisar procesos con PM2 y automatizar renovacion de SSL.

Sobre Q2BSTUDIO

Q2BSTUDIO es una empresa de desarrollo de software especializada en aplicaciones a medida y software a medida. Ofrecemos servicios integrales incluyendo inteligencia artificial, ia para empresas, agentes IA, ciberseguridad, servicios cloud aws y azure, servicios inteligencia de negocio y power bi. Nuestro equipo construye soluciones personalizadas que integran APIs, automatizaciones y modelos de machine learning para potenciar operaciones y seguridad en proyectos empresariales.

Palabras clave para posicionamiento

aplicaciones a medida software a medida inteligencia artificial ia para empresas agentes IA ciberseguridad servicios cloud aws servicios cloud azure servicios inteligencia de negocio power bi

Si necesitas ayuda con la instalación de Strapi en VPS, configuración de proxy inverso, gestión con PM2, integracion con bases de datos MySQL o migraciones, Q2BSTUDIO puede apoyarte desde el diseño hasta la puesta en producción con buenas prácticas de seguridad y despliegue.

Alhamdulillah. Espero que esta guía práctica te sea de utilidad.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Artificial intelligence

AI agents, chatbots, and intelligent assistants that automate tasks and serve your customers 24/7 to improve the efficiency of your business.

More info

Software Development

Web, mobile, and desktop applications, intranets, e-commerce, SaaS, and management platforms designed for your company's specific needs.

More info

Cloud services

Migration, infrastructure, managed hosting, high availability, and security on Microsoft Azure and Amazon Web Services to help your business scale without limits.

More info

Cybersecurity and pentesting

Security audits, penetration testing and protection of applications, data and infrastructure on-premise and cloud, with ethical hacking and regulatory compliance.

More info

Business Intelligence

Dashboards and data analysis with Power BI: we integrate your sources, design dashboards and KPIs and turn your data into decisions.

More info

Process automation

We automate repetitive tasks and connect your applications with n8n, Power Automate, Make, and RPA, eliminating manual work and increasing productivity.

More info

Training for Companies

We train your teams in technology with criteria: web development, databases, Git, best practices and security, automation with n8n, artificial intelligence for companies and creation of AI solutions with Azure AI Foundry.

More info

Code Auditing

We audit the code that you, your team or an AI create: we tell you what is good and what to improve, we secure it and make it ready for production, web or app.

More info

AI Image Generation

We create for you the images that your business needs with artificial intelligence: product, networks, advertising, illustration and avatars. You tell us what you want and we deliver it ready to use.

More info

AI Video Generation

We create videos with artificial intelligence for you: promotional, networking, virtual presenters, dubbing and animations. You tell us the idea and we will deliver it assembled and ready to publish.

More info

AI Conversational Avatars

We create conversational avatars with AI – digital humans with a face and voice – that serve your customers and teams with the knowledge of your company, on your website, interactive monitors, WhatsApp or Teams.

More info

Online Marketing and AI

Google Ads, Meta Ads, LinkedIn Ads and AI Engine Positioning (GEO/AEO): we attract customers and make your brand appear where they search for you, also on ChatGPT, Gemini and Perplexity.

More info

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.

Live Chat