NextCloud instalación · 8 min read · Nov 26, 2025
Cómo instalar NextCloud en Debian 10

NextCloud es un servidor de alojamiento y compartición de archivos gratuito y de código abierto, bifurcado del proyecto ownCloud. Es muy similar a otros servicios de compartición de archivos como Google Drive, Dropbox e iCloud. NextCloud te permite almacenar archivos, documentos, imágenes, películas y videos desde una ubicación central. Con NextCloud, puedes compartir archivos, contactos y cualquier otro medio con tus amigos y clientes. NextCloud se integra con correo, calendario, contactos y otras características que ayudarán a tus equipos a realizar su trabajo más rápido y más fácil. Puedes instalar el cliente de NextCloud en una máquina de escritorio para sincronizar archivos con tu servidor Nextcloud. Los clientes de escritorio están disponibles para la mayoría de los sistemas operativos, incluyendo Windows, macOS, FreeBSD y Linux.
En este tutorial, explicaremos cómo instalar NextCloud y asegurarla con SSL de Let’s Encrypt en Debian 10.
Requisitos previos
- Un servidor que ejecute Debian 10.
- Un nombre de dominio válido apuntado a la IP de tu servidor. En este tutorial, utilizaremos el dominio nextcloud.example.com.
- Una contraseña de root configurada en tu servidor.
Instalar Apache, MariaDB y PHP
NextCloud se ejecuta en el servidor web, está escrito en PHP y utiliza MariaDB para almacenar sus datos. Por lo tanto, necesitarás instalar Apache, MariaDB, PHP y otros paquetes requeridos en tu sistema. Puedes instalar todos ellos ejecutando el siguiente comando:
apt-get install apache2 libapache2-mod-php mariadb-server php-xml php-cli php-cgi php-mysql php-mbstring php-gd php-curl php-zip wget unzip -yUna vez que todos los paquetes estén instalados, abre el archivo php.ini y ajusta algunas configuraciones recomendadas:
nano /etc/php/7.3/apache2/php.iniCambia las siguientes configuraciones:
memory_limit = 512M
upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 300
date.timezone = Asia/KolkataGuarda y cierra el archivo cuando hayas terminado. Luego, inicia el servicio de Apache y MariaDB y habilítalos para que se inicien después del reinicio del sistema con el siguiente comando:
systemctl start apache2
systemctl start mariadb
systemctl enable apache2
systemctl enable mariadbUna vez que hayas terminado, puedes proceder al siguiente paso.
Configurar la base de datos para NextCloud
A continuación, necesitarás crear una base de datos y un usuario de base de datos para NextCloud. Para hacerlo, inicia sesión en el shell de MariaDB con el siguiente comando:
mysql -u root -pProporciona tu contraseña de root cuando se te pida, luego crea una base de datos y un usuario con el siguiente comando:
MariaDB [(none)]> CREATE DATABASE nextclouddb;
MariaDB [(none)]> CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'password';A continuación, otorga todos los privilegios a nextclouddb con el siguiente comando:
MariaDB [(none)]> GRANT ALL ON nextclouddb.* TO 'nextclouduser'@'localhost';A continuación, actualiza los privilegios y sal del shell de MariaDB con el siguiente comando:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;Una vez que hayas terminado, puedes proceder al siguiente paso.
Descargar NextCloud
Primero, visita la página de descarga de NextCloud y descarga la última versión de NextCloud en tu sistema. En el momento de escribir este artículo, la última versión de NextCloud es 17.0.1. Puedes descargarla con el siguiente comando:
wget https://download.nextcloud.com/server/releases/nextcloud-17.0.1.zipUna vez que la descarga esté completa, descomprime el archivo descargado con el siguiente comando:
unzip nextcloud-17.0.1.zipA continuación, mueve el directorio extraído al directorio raíz web de Apache:
mv nextcloud /var/www/html/A continuación, otorga los permisos adecuados al directorio nextcloud con el siguiente comando:
chown -R www-data:www-data /var/www/html/nextcloud/
chmod -R 755 /var/www/html/nextcloud/Una vez que hayas terminado, puedes proceder al siguiente paso.
Configurar Apache para NextCloud
A continuación, necesitarás crear un archivo de configuración de host virtual de Apache para servir NextCloud. Puedes crearlo con el siguiente comando:
nano /etc/apache2/sites-available/nextcloud.confAgrega las siguientes líneas:
ServerAdmin [email protected]
DocumentRoot /var/www/html/nextcloud/
ServerName nextcloud.example.com
Alias /nextcloud "/var/www/html/nextcloud/"
Options +FollowSymlinks
AllowOverride All
Require all granted
Dav off
SetEnv HOME /var/www/html/nextcloud
SetEnv HTTP_HOME /var/www/html/nextcloud
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Guarda y cierra el archivo cuando hayas terminado. Luego, habilita el archivo de host virtual de Apache y otros módulos requeridos usando los siguientes comandos:
a2ensite nextcloud.conf
a2enmod rewrite
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mimeFinalmente, reinicia el servicio de Apache para aplicar la nueva configuración:
systemctl restart apache2Asegurar NextCloud con Let’s Encrypt Free SSL
NextCloud ahora está instalada y configurada. A continuación, se recomienda asegurarla con SSL gratuito de Let’s Encrypt. Para hacerlo, primero instala el cliente Certbot con el siguiente comando:
apt-get install python-certbot-apache -yUna vez instalado, puedes ejecutar el siguiente comando para instalar el certificado de Let’s Encrypt para tu dominio nextcloud.example.com.
certbot --apache -d nextcloud.example.comDurante la instalación, se te pedirá que proporciones tu dirección de correo electrónico y aceptes los términos de servicio como se muestra a continuación:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for nextcloud.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/nextcloud-le-ssl.conf
Deploying Certificate to VirtualHost /etc/apache2/sites-available/nextcloud-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/nextcloud-le-ssl.conf
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2A continuación, escribe 2 y presiona Enter para descargar e instalar un certificado SSL gratuito para tu dominio. Una vez que la instalación se haya completado con éxito, deberías obtener la siguiente salida:
Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/nextcloud.conf to ssl vhost in /etc/apache2/sites-available/
nextcloud-le-ssl.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://nextcloud.example.com
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=nextcloud.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/example.com/privkey.pem
Your cert will expire on 2019-10-22. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le Una vez que hayas terminado, puedes proceder al siguiente paso.
Acceder a la interfaz web de NextCloud
Tu NextCloud ahora está configurada y asegurada con SSL de Let’s Encrypt. A continuación, abre tu navegador web y escribe la URL https://nextcloud.example.com. Serás redirigido a la siguiente página:


Ahora, proporciona tu nombre de usuario y contraseña de administrador, carpeta de datos, credenciales de base de datos correctas y haz clic en el botón Finalizar configuración. Serás redirigido al panel de control de NextCloud en la siguiente página:

Eso es todo por ahora.
Conclusión
¡Felicidades! Has instalado y asegurado NextCloud con SSL gratuito de Let’s Encrypt en Debian 10. Ahora puedes compartir fácilmente archivos, documentos y medios con otros usuarios utilizando la interfaz web de NextCloud.
Recibe nuevas publicaciones en tu bandeja de entrada.
No spam. Cancela la suscripción en cualquier momento.