Intermediate 40 min — Set up your own cloud storage with Nextcloud.
Nextcloud is a self-hosted cloud storage platform — your own Dropbox/Google Drive. File sync, sharing, calendar, contacts, and apps. This guide covers installation on Debian 12 with Apache, MariaDB, and Let's Encrypt.
apt update && apt install -y apache2 mariadb-server \
php8.2 php8.2-gd php8.2-mysql php8.2-curl php8.2-mbstring \
php8.2-intl php8.2-gmp php8.2-bcmath php8.2-xml php8.2-zip \
php8.2-imagick php8.2-apcu libapache2-mod-php8.2
mysql -u root << 'EOF'
CREATE DATABASE nextcloud;
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'your_strong_password';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';
FLUSH PRIVILEGES;
EOF
cd /var/www
wget https://download.nextcloud.com/server/releases/latest.tar.bz2
tar xjf latest.tar.bz2
chown -R www-data:www-data /var/www/nextcloud
rm latest.tar.bz2
ServerName cloud.yourdomain.com
DocumentRoot /var/www/nextcloud
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
Enable the config:
a2ensite nextcloud.conf
a2enmod rewrite headers env dir mime
systemctl restart apache2
apt install -y certbot python3-certbot-apache
certbot --apache -d cloud.yourdomain.com
Visit https://cloud.yourdomain.com in your browser. Enter:
# /var/www/nextcloud/config/config.php — add:
'memcache.local' => '\OC\Memcache\APCu',
'default_phone_region' => 'US',
Also increase PHP memory limit:
sed -i 's/memory_limit = 128M/memory_limit = 512M/' /etc/php/8.2/apache2/php.ini
systemctl restart apache2
crontab -u www-data -e
# Add:
*/5 * * * * php /var/www/nextcloud/cron.php
Then in Nextcloud Settings → Administration → Basic settings, select 'Cron' for background jobs.
Browser-based utilities for self-hosters and developers. No signup, no upload.