{"id":17134,"date":"2026-01-28T16:55:10","date_gmt":"2026-01-28T11:25:10","guid":{"rendered":"https:\/\/www.youstable.com\/blog\/?p=17134"},"modified":"2026-01-28T16:55:13","modified_gmt":"2026-01-28T11:25:13","slug":"install-nextcloud-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.youstable.com\/blog\/install-nextcloud-on-ubuntu","title":{"rendered":"Install Nextcloud on Ubuntu 24.04 LTS &#8211; Complete Guide 2026"},"content":{"rendered":"\n<p><strong>To install Nextcloud on Ubuntu 24.04 LTS<\/strong>, set up a LAMP\/LEMP stack with PHP 8.3, create a database, download the latest Nextcloud to \/var\/www\/nextcloud, configure Apache or Nginx with HTTPS, enable Redis caching and cron, then complete the web installer. This 2026 step by step guide covers optimal settings, security, and performance.<\/p>\n\n\n\n<p>This complete guide shows how to install Nextcloud on Ubuntu 24.04 LTS using best practices for 2026. You\u2019ll learn the fastest, most secure way to deploy Nextcloud with Apache or Nginx, PHP 8.3, MariaDB or PostgreSQL, Redis, <a href=\"https:\/\/www.youstable.com\/blog\/what-is-lets-encrypt-on-linux-server\/\">Let\u2019s Encrypt<\/a> SSL, and cron\u2014plus hardening and performance tips proven in real world production.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"what-is-nextcloud-and-why-ubuntu-24-04-lts\">What is Nextcloud and why Ubuntu 24.04 LTS?<\/h2>\n\n\n\n<p>Nextcloud is a self hosted, private cloud platform for file sync, sharing, Office\/Collabora, Talk, calendars, and more. Ubuntu 24.04 LTS (Noble) ships with current, secure packages (PHP 8.3, OpenSSL 3) and a 5 year support window ideal for a stable, future proof Nextcloud stack in 2026.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"prerequisites-and-system-requirements\">Prerequisites and system requirements<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An Ubuntu 24.04 LTS server (1\u20132 vCPU, 2\u20134 GB RAM minimum; 8+ GB RAM recommended for large teams)<\/li>\n\n\n\n<li>A domain or subdomain (e.g., cloud.example.com) pointing to the server\u2019s public IP<\/li>\n\n\n\n<li>SSH access with sudo privileges<\/li>\n\n\n\n<li><strong>Open ports:<\/strong> 80\/tcp and 443\/tcp<\/li>\n\n\n\n<li><strong>Optional:<\/strong> Swap enabled on low RAM VPS, and a separate data disk for Nextcloud data<\/li>\n<\/ul>\n\n\n\n<p>For business grade performance, choose SSD\/NVMe storage and enable server side caching (Redis). Managed NVMe VPS from YouStable includes Ubuntu 24.04 images, free SSL, and support that can pre install this stack on request.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-1-update-server-and-set-hostname\">Step 1 &#8211; Update server and set hostname<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update &amp;&amp; sudo apt -y upgrade\nsudo hostnamectl set-hostname cloud\nsudo apt -y install ufw unzip bzip2 curl software-properties-common<\/code><\/pre>\n\n\n\n<p><strong>Enable the firewall and allow web traffic:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw allow OpenSSH\nsudo ufw allow 80,443\/tcp\nsudo ufw enable\nsudo ufw status<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-2-choose-your-web-server-apache-or-nginx\">Step 2 &#8211; Choose your web server: Apache or Nginx<\/h2>\n\n\n\n<p>Apache is beginner friendly and integrates cleanly with Certbot. Nginx is lean and performs excellently at scale. Both are fully supported by Nextcloud.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"option-a-install-apache-recommended-for-most-users\">Option A: Install Apache (recommended for most users)<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt -y install apache2 libapache2-mod-fcgid<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"option-b-install-nginx-performance-focused\">Option B: Install Nginx (performance focused)<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt -y install nginx<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-3-install-php-8-3-and-required-extensions\">Step 3 &#8211; Install PHP 8.3 and required extensions<\/h2>\n\n\n\n<p>Nextcloud requires PHP 8.1+; Ubuntu 24.04 provides PHP 8.3. Install FPM plus all needed extensions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt -y install php8.3-fpm php8.3-cli php8.3-gd php8.3-curl php8.3-xml php8.3-zip \\\nphp8.3-mbstring php8.3-bz2 php8.3-intl php8.3-gmp php8.3-bcmath php8.3-imap \\\nphp8.3-redis php8.3-apcu php8.3-imagick<\/code><\/pre>\n\n\n\n<p><strong>Tune PHP for Nextcloud:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo sed -i 's\/^memory_limit.*\/memory_limit = 512M\/' \/etc\/php\/8.3\/fpm\/php.ini\nsudo sed -i 's\/^upload_max_filesize.*\/upload_max_filesize = 2G\/' \/etc\/php\/8.3\/fpm\/php.ini\nsudo sed -i 's\/^post_max_size.*\/post_max_size = 2G\/' \/etc\/php\/8.3\/fpm\/php.ini\nsudo sed -i 's\/^max_execution_time.*\/max_execution_time = 360\/' \/etc\/php\/8.3\/fpm\/php.ini\nsudo sed -i 's\/;opcache.enable=1\/opcache.enable=1\/' \/etc\/php\/8.3\/fpm\/php.ini\nsudo sed -i 's\/;opcache.memory_consumption=.*\/opcache.memory_consumption=256\/' \/etc\/php\/8.3\/fpm\/php.ini\nsudo sed -i 's\/;opcache.interned_strings_buffer=.*\/opcache.interned_strings_buffer=16\/' \/etc\/php\/8.3\/fpm\/php.ini\nsudo sed -i 's\/;opcache.max_accelerated_files=.*\/opcache.max_accelerated_files=10000\/' \/etc\/php\/8.3\/fpm\/php.ini\nsudo systemctl restart php8.3-fpm<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-4-install-and-prepare-the-database\">Step 4 &#8211; Install and prepare the database<\/h2>\n\n\n\n<p>You can use MariaDB\/MySQL or PostgreSQL. Both work well; PostgreSQL scales very nicely for larger instances.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"option-a-mariadb\">Option A: MariaDB<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt -y install mariadb-server\nsudo mysql_secure_installation<\/code><\/pre>\n\n\n\n<p><strong>Create a database and user:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mysql -u root -p\nCREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;\nCREATE USER 'ncuser'@'localhost' IDENTIFIED BY 'StrongPasswordHere';\nGRANT ALL PRIVILEGES ON nextcloud.* TO 'ncuser'@'localhost';\nFLUSH PRIVILEGES;\nEXIT;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"option-b-postgresql\">Option B: PostgreSQL<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt -y install postgresql\nsudo -u postgres psql -c \"CREATE USER ncuser WITH PASSWORD 'StrongPasswordHere';\"\nsudo -u postgres psql -c \"CREATE DATABASE nextcloud TEMPLATE template0 ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' OWNER ncuser;\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-5-download-and-place-nextcloud\">Step 5 &#8211; Download and place Nextcloud<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/tmp\ncurl -O https:\/\/download.nextcloud.com\/server\/releases\/latest.tar.bz2\ncurl -O https:\/\/download.nextcloud.com\/server\/releases\/latest.tar.bz2.asc\n# (Optional) Import &amp; verify signature per Nextcloud docs\nsudo tar -xjf latest.tar.bz2 -C \/var\/www\/\nsudo chown -R www-data:www-data \/var\/www\/nextcloud\nsudo find \/var\/www\/nextcloud\/ -type d -exec chmod 750 {} \\;\nsudo find \/var\/www\/nextcloud\/ -type f -exec chmod 640 {} \\;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-6-configure-your-web-server\">Step 6 &#8211; Configure your web server<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"apache-virtual-host-php-fpm\">Apache virtual host (PHP-FPM)<\/h3>\n\n\n\n<p>Create a site file at \/etc\/apache2\/sites-available\/nextcloud.conf (replace cloud.example.com):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo tee \/etc\/apache2\/sites-available\/nextcloud.conf &gt;\/dev\/null &lt;&lt;'EOF'\n&lt;VirtualHost *:80&gt;\n  ServerName cloud.example.com\n  DocumentRoot \/var\/www\/nextcloud\n\n  &lt;Directory \/var\/www\/nextcloud\/&gt;\n    Require all granted\n    AllowOverride All\n    Options FollowSymLinks MultiViews\n  &lt;\/Directory&gt;\n\n  &lt;FilesMatch \\.php$&gt;\n    SetHandler \"proxy:unix:\/run\/php\/php8.3-fpm.sock|fcgi:\/\/localhost\/\"\n  &lt;\/FilesMatch&gt;\n\n  &lt;IfModule mod_headers.c&gt;\n    Header always set Referrer-Policy \"no-referrer\"\n    Header always set X-Content-Type-Options \"nosniff\"\n    Header always set X-Frame-Options \"SAMEORIGIN\"\n    Header always set X-XSS-Protection \"1; mode=block\"\n  &lt;\/IfModule&gt;\n\n  ErrorLog ${APACHE_LOG_DIR}\/nextcloud_error.log\n  CustomLog ${APACHE_LOG_DIR}\/nextcloud_access.log combined\n&lt;\/VirtualHost&gt;\nEOF\n\nsudo a2enmod rewrite headers env dir mime proxy_fcgi setenvif\nsudo a2ensite nextcloud\nsudo systemctl reload apache2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"nginx-server-block\">Nginx server block<\/h3>\n\n\n\n<p>Create \/etc\/nginx\/sites-available\/nextcloud and enable it (replace cloud.example.com):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo tee \/etc\/nginx\/sites-available\/nextcloud &gt;\/dev\/null &lt;&lt;'EOF'\nserver {\n  listen 80;\n  server_name cloud.example.com;\n\n  root \/var\/www\/nextcloud;\n  index index.php;\n\n  client_max_body_size 2G;\n  fastcgi_buffers 64 4K;\n\n  add_header Referrer-Policy \"no-referrer\" always;\n  add_header X-Content-Type-Options \"nosniff\" always;\n  add_header X-Frame-Options \"SAMEORIGIN\" always;\n  add_header X-XSS-Protection \"1; mode=block\" always;\n\n  location = \/robots.txt { allow all; log_not_found off; access_log off; }\n  location = \/.well-known\/carddav { return 301 \/remote.php\/dav; }\n  location = \/.well-known\/caldav { return 301 \/remote.php\/dav; }\n\n  location \/ {\n    try_files $uri $uri\/ \/index.php$request_uri;\n  }\n\n  location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {\n    deny all;\n  }\n  location ~ \\.php(?:$|\/) {\n    include snippets\/fastcgi-php.conf;\n    fastcgi_split_path_info ^(.+\\.php)(\/.*)$;\n    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n    fastcgi_pass unix:\/run\/php\/php8.3-fpm.sock;\n  }\n  location ~ \\.(?:css|js|woff2?|svg|gif)$ {\n    try_files $uri \/index.php$request_uri;\n    expires 6M; access_log off;\n  }\n  location ~ \\.(?:png|jpg|jpeg|ico|webp)$ {\n    try_files $uri \/index.php$request_uri;\n    expires 6M; access_log off;\n  }\n\n  error_log \/var\/log\/nginx\/nextcloud_error.log;\n  access_log \/var\/log\/nginx\/nextcloud_access.log;\n}\nEOF\n\nsudo ln -s \/etc\/nginx\/sites-available\/nextcloud \/etc\/nginx\/sites-enabled\/\nsudo nginx -t &amp;&amp; sudo systemctl reload nginx<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-7-enable-https-with-lets-encrypt\">Step 7 &#8211; Enable HTTPS with Let\u2019s Encrypt<\/h2>\n\n\n\n<p>Issue and auto <a href=\"https:\/\/www.youstable.com\/blog\/install-and-renew-ssl-certificates\/\">renew a free SSL certificate<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Apache\nsudo apt -y install certbot python3-certbot-apache\nsudo certbot --apache -d cloud.example.com\n\n# Nginx\nsudo apt -y install certbot python3-certbot-nginx\nsudo certbot --nginx -d cloud.example.com\n\n# Test renewal\nsudo systemctl list-timers | grep certbot<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-8-configure-redis-caching-and-file-locking\">Step 8 &#8211; Configure Redis caching and file locking<\/h2>\n\n\n\n<p>Redis prevents file locking issues and boosts performance.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt -y install redis-server\nsudo sed -i 's\/^supervised .*\/supervised systemd\/' \/etc\/redis\/redis.conf\nsudo systemctl enable --now redis-server<\/code><\/pre>\n\n\n\n<p><strong>Add caching to Nextcloud\u2019s config.php:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo -u www-data php \/var\/www\/nextcloud\/occ maintenance:install --database \"mysql\" \\\n --database-name \"nextcloud\" --database-user \"ncuser\" --database-pass \"StrongPasswordHere\" \\\n --admin-user \"admin\" --admin-pass \"AnotherStrongPassword\"\n\nsudo -u www-data php -r '\n$cfg=\"\/var\/www\/nextcloud\/config\/config.php\";\n$c=include $cfg;\n$c&#091;\"memcache.local\"]=\"\\\\OC\\\\Memcache\\\\APCu\";\n$c&#091;\"memcache.locking\"]=\"\\\\OC\\\\Memcache\\\\Redis\";\n$c&#091;\"redis\"]=&#091;\"host\"=&gt;\"127.0.0.1\",\"port\"=&gt;6379];\n$c&#091;\"default_phone_region\"]=\"US\";\nfile_put_contents($cfg,\"&lt;?php\\nreturn \".var_export($c,true).\";\\n\");'<\/code><\/pre>\n\n\n\n<p>If you prefer PostgreSQL, change the maintenance:install flags accordingly (database=pgsql).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-9-set-up-background-jobs-cron\">Step 9 &#8211; Set up background jobs (cron)<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo -u www-data crontab -e\n# Add:\n*\/5 * * * * php -f \/var\/www\/nextcloud\/cron.php &gt;\/dev\/null 2&gt;&amp;1<\/code><\/pre>\n\n\n\n<p>In Settings &gt; Basic settings, switch Background jobs to \u201cCron.\u201d<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-10-secure-permissions-and-hardening\">Step 10 &#8211; Secure permissions and hardening<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run Nextcloud under www-data<\/li>\n\n\n\n<li>Disable directory listing<\/li>\n\n\n\n<li>Force HTTPS with HSTS<\/li>\n\n\n\n<li>Isolate the data folder on a separate disk when possible<\/li>\n\n\n\n<li>Keep regular, offsite backups<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Permissions\nsudo chown -R www-data:www-data \/var\/www\/nextcloud\nsudo find \/var\/www\/nextcloud\/ -type d -exec chmod 750 {} \\;\nsudo find \/var\/www\/nextcloud\/ -type f -exec chmod 640 {} \\;\n\n# UFW profile for Apache or Nginx is already allowed; ensure SSH\/HTTPS stay open\nsudo ufw status\n\n# Optional: enable HSTS on Apache (inside VirtualHost after SSL is active)\n# Header always set Strict-Transport-Security \"max-age=31536000; includeSubDomains; preload\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-11-complete-the-web-installer\">Step 11 &#8211; Complete the web installer<\/h2>\n\n\n\n<p>Visit https:\/\/cloud.example.com and log in as the admin user you created (or create via the web form). Point the data directory to the default (\/var\/www\/nextcloud\/data) or an attached volume with sufficient space. Confirm the database credentials and finish installation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"post-install-commands-and-checks\">Post install commands and checks<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># Add your domain to trusted domains\nsudo -u www-data php \/var\/www\/nextcloud\/occ config:system:set trusted_domains 1 --value=cloud.example.com\n\n# Enable recommended preview providers (speeds up thumbnails)\nsudo -u www-data php \/var\/www\/nextcloud\/occ config:app:set previewgenerator squareSizes --value=\"32 256\"\nsudo -u www-data php \/var\/www\/nextcloud\/occ config:app:set previewgenerator widthSizes --value=\"256 384 512 768 1024\"\nsudo -u www-data php \/var\/www\/nextcloud\/occ config:app:set previewgenerator heightSizes --value=\"256 384 512 768 1024\"\n\n# Add missing DB indexes (if prompted in Admin &gt; Overview)\nsudo -u www-data php \/var\/www\/nextcloud\/occ db:add-missing-indices\n\n# Verify background jobs\nsudo -u www-data php \/var\/www\/nextcloud\/occ background:status<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"performance-tuning-checklist-2026-best-practices\">Performance tuning checklist (2026 best practices)<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use PHP 8.3-FPM with OPcache and APCu<\/li>\n\n\n\n<li>Enable Redis for local cache and file locking<\/li>\n\n\n\n<li>Set client_max_body_size\/upload_max_filesize to match your largest files<\/li>\n\n\n\n<li>Use HTTP\/2 (default with modern Apache\/Nginx on TLS)<\/li>\n\n\n\n<li>Place data on fast NVMe storage; consider object storage for large deployments<\/li>\n\n\n\n<li>PostgreSQL for big\/complex instances; MariaDB for simplicity<\/li>\n\n\n\n<li>Prefer Nginx for very high concurrency setups<\/li>\n\n\n\n<li>Schedule previews generation during off peak hours<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"troubleshooting-essentials\">Troubleshooting essentials<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Logs:<\/strong> \/var\/www\/nextcloud\/data\/nextcloud.log<\/li>\n\n\n\n<li><strong>Web server logs:<\/strong> \/var\/log\/apache2\/*.log or \/var\/log\/nginx\/*.log<\/li>\n\n\n\n<li><strong>PHP-FPM logs:<\/strong> journalctl -u php8.3-fpm<\/li>\n\n\n\n<li><strong>Permissions: <\/strong>ensure www-data owns all Nextcloud files<\/li>\n\n\n\n<li><strong>OPcache\/APCu not loading:<\/strong> check php -m and phpinfo(); restart php8.3-fpm<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Quick health check\nsudo -u www-data php \/var\/www\/nextcloud\/occ status\nsudo -u www-data php \/var\/www\/nextcloud\/occ check<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"alternative-nextcloud-snap-quick-install\">Alternative: Nextcloud Snap (quick install)<\/h2>\n\n\n\n<p>Snap is the fastest route but less flexible for tuning, custom PHP modules, or external database engines.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt -y install snapd\nsudo snap install nextcloud\n# Set domain and enable HTTPS\nsudo nextcloud.manual-install admin StrongAdminPassword\nsudo nextcloud.enable-https lets-encrypt<\/code><\/pre>\n\n\n\n<p>For production environments where you need deep control (Redis, PHP tuning, advanced Nginx rules), the manual install above is preferred.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"why-host-nextcloud-with-youstable\">Why host Nextcloud with YouStable<\/h2>\n\n\n\n<p>As a managed hosting provider, YouStable offers optimized Ubuntu 24.04 VPS with NVMe storage, free SSL, DDoS protection, and expert assistance setting up Nextcloud, Redis, and backups. If you want a hands off, production ready deployment with 24\u00d77 support, our team can provision and tune this stack for your workload.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"faqs\">FAQs<\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1769244239297\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"is-apache-or-nginx-better-for-nextcloud-on-ubuntu-24-04\">Is Apache or Nginx better for Nextcloud on Ubuntu 24.04?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Both work well. Apache is simpler and integrates nicely with Certbot. Nginx offers lower memory use and excellent performance under high concurrency. For small to medium teams, Apache is perfect; for heavy traffic or large deployments, Nginx is often the better choice.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1769244247545\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"should-i-use-mariadb-or-postgresql-for-nextcloud\">Should I use MariaDB or PostgreSQL for Nextcloud?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>MariaDB is easy to start with and fully supported. PostgreSQL tends to scale better and can offer improved query performance as your instance grows. If you anticipate thousands of users or heavy app usage, choose PostgreSQL; otherwise MariaDB is perfectly fine.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1769244255496\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"how-do-i-increase-the-nextcloud-upload-size-limit\">How do I increase the Nextcloud upload size limit?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Adjust PHP and web server limits: set upload_max_filesize and post_max_size in \/etc\/php\/8.3\/fpm\/php.ini (e.g., 2G), and for Nginx set client_max_body_size in the server block. Restart PHP-FPM and reload your web server. Also ensure any proxy or CDN respects the larger limit.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1769244266057\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"can-i-move-the-nextcloud-data-directory-after-install\">Can I move the Nextcloud data directory after install?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes. Put the site in maintenance mode, move data to the new path with preserved ownership (www-data), update the datadirectory path in config.php, adjust AppArmor if enabled, then disable maintenance mode. Always back up before relocating the data directory.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1769244272548\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"is-the-snap-package-good-for-production-in-2026\">Is the Snap package good for production in 2026?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Snap is stable and convenient, ideal for quick pilots or small personal setups. For production environments needing fine grained PHP, Nginx, Redis, and database optimizations, or custom modules, the manual LAMP\/LEMP installation provides better control and performance.<\/p>\n<p>You now have a secure, tuned deployment of Nextcloud on Ubuntu 24.04 LTS. Maintain it with regular OS updates, database backups, and Nextcloud upgrades via occ or the web updater. For managed infrastructure and expert help at every step, YouStable is ready to assist.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>To install Nextcloud on Ubuntu 24.04 LTS, set up a LAMP\/LEMP stack with PHP 8.3, create a database, download the [&hellip;]<\/p>\n","protected":false},"author":20,"featured_media":18169,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[350],"tags":[],"class_list":["post-17134","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledgebase"],"acf":[],"featured_image_src":"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2026\/01\/Install-Nextcloud-on-Ubuntu-Complete-Guide.jpg","author_info":{"display_name":"Alok Trivedi","author_link":"https:\/\/www.youstable.com\/blog\/author\/alok"},"_links":{"self":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/17134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/comments?post=17134"}],"version-history":[{"count":10,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/17134\/revisions"}],"predecessor-version":[{"id":18171,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/17134\/revisions\/18171"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media\/18169"}],"wp:attachment":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media?parent=17134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/categories?post=17134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/tags?post=17134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}