Support intro
Sorry to hear you’re facing problems. 
The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.
If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.
Getting help
In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.
Before clicking submit: Please check if your query is already addressed via the following resources:
- Official documentation (searchable and regularly updated)
- How to topics and FAQs
- Forum search
(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can.
The Basics
- Nextcloud Server version (e.g., 29.x.x):
- 31.0.4
- Operating system and version (e.g., Ubuntu 24.04):
- 24.04
- Web server and version (e.g, Apache 2.4.25):
- nginx 1.27.5
- Reverse proxy and version _(e.g. nginx 1.27.2)
- NA
- PHP version (e.g, 8.3):
- 8.3
- Is this the first time you’ve seen this error? (Yes / No):
- Yes
- When did this problem seem to first start?
- Upon NC installation
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
- Bare Metal/Archive
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
- No
Summary of the issue you are facing:
I have manually installed NC on my Ubuntu Server in order to locally host it via nginx. I currently already have a locally hosted web server on nginx utilizing self-signed certificates and functions properly. However, upon installation and configuration of NC, I cannot access the web GUI via the host servers local IPv4 (as done to access the web server).
I am attempting to adhere to NC documentation as much as possible, but have yet to notice any issues or information that I may be missing. The remaining tasks I could do appear to be more optimization than actually setting up NC.
Note: In the following section regarding configuration, some parameters will be blank and I would very much take advice on what values should be attributed to them! For reference, I am running a small homelab on local network with plans to make it publicly accessible in the future once I better understand networking and security.
Steps to replicate it (hint: details matter!):
NC
- Download NC
sudo wget https://download.nextcloud.com/server/releases/nextcloud-31.0.4.zip
- Verify authenticity, integrity, extract, etc.
- Update ownership
sudo chown -R www-data:www-data /var/www/nextcloud/
- Install NC
sudo -E -u www-data php occ maintenance:install \
--database='mysql' --database-name='nc_db' \
--database-user='nc_user' --database-pass='password' \
--admin-user='admin' --admin-pass='password'
"Nextcloud was successfully installed"
- Confirm status
sudo -u www-data php occ -V
Nextcloud 31.0.4
sudo -u www-data php occ status
- installed: true
- version: 31.0.4.1
- versionstring: 31.0.4
- edition:
- maintenance: false
- needsDbUpgrade: false
- productname: Nextcloud
- extendedSupport: false"
PHP
sudo apt install php8.3
sudo apt install -y php8.3-{common,curl,xml,gd,mbstring,zip,mysql,intl,ldap,smbclient,imap,gmp,apcu,redis,imagick,cgi,fpm}
- Backup
sudo cp /etc/php/8.3/fpm/pool.d/www.conf /etc/php/8.3/fpm/pool.d/www.conf.bak
sudo cp /etc/php/8.3/fpm/php-fpm.conf /etc/php/8.3/php-fpm.conf.bak
sudo cp /etc/php/8.3/cli/php.ini /etc/php/8.3/cli/php.ini.bak
sudo cp /etc/php/8.3/fpm/php.ini /etc/php/8.3/fpm/php.ini.bak
sudo cp /etc/php/8.3/mods-available/apcu.ini /etc/php/8.3/mods-available/apcu.ini.bak
sudo cp /etc/php/8.3/mods-available/opcache.ini /etc/php/8.3/mods-available/opcache.ini.bak
sudo cp /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/policy.xml.bak
sudo cp /var/www/nextcloud/.user.ini /var/www/nextcloud/.user.ini.bak
- Enable extensions
----------------------------------
/etc/php/8.3/<cli + fpm>/php.ini |
----------------------------------
# Off = disabled, On = enabled
zlib.output_compression = On
# -1 = server decision, 0 = min, 9 = max
zlib.output_compression_level = -1
disable_functions =
----------------------------------
/etc/php/8.3/<cli + fpm>/php.ini |
----------------------------------
date.timezone = <region>/<area>
cgi.fix_pathinfo=0
disable_functions =
max_execution_time = 360
memory_limit = 512M
opcache.enable =
open_basedir =
upload_tmp_dir =
PHP FPM
- pm.max_children
----------------------------------
/etc/php/8.3/<cli + fpm>/php.ini |
----------------------------------
pm.max_children =
- System environment variables
----------------------------------
/etc/php/8.3/fpm/pool.d/www.conf |
----------------------------------
listen = /var/run/php/php8.3-fpm.sock
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
- Max upload size
----------------------------------
/etc/php/8.3/<cli + fpm>/php.ini |
----------------------------------
upload_max_filesize =
post_max_size =
- Restart service
sudo systemctl restart php8.3-fpm.service
MariaDB
- Import MariaDB repo key
sudo apt-get install apt-transport-https curl
sudo curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp'
- Create APT source file
-----------------------------------------
/etc/apt/sources.list.d/mariadb.sources |
-----------------------------------------
# MariaDB 10.11 repository list - created 2025-05-31 02:17 UTC
# https://mariadb.org/download/
X-Repolib-Name: MariaDB
Types: deb
# deb.mariadb.org is a dynamic mirror if your preferred mirror goes offline. See https://mariadb.org/mirrorbits/ for details.
# URIs: https://deb.mariadb.org/10.11/ubuntu
URIs: https://mirrors.xtom.com/mariadb/repo/10.11/ubuntu
Suites: noble
Components: main main/debug
Signed-By: /etc/apt/keyrings/mariadb-keyring.pgp
- Install MariaDB
sudo apt-get install mariadb-server -y
- Secure Install
mariadb-secure-installation
# Prompts
# 1. Modify root pword Y
# 2. Unix socket auth Y (Probably enabled automatically)
# 3. Rm anon users Y
# 4. Deny root login Y
# 5. Rm test DB Y
# 6. Reload privilege tables Y
sudo cp /etc/mysql/my.cnf /etc/mysql/my.cnf.bak
-------------------
/etc/mysql/my.cnf |
-------------------
transaction_isolation = READ-COMMITTED
binlog_format = ROW
- Confirm mysql.default_socket directed correctly
sudo cp /etc/php/8.3/<cli + fpm>/conf.d/20-pdo_mysql.ini /etc/php/8.3/<cli + fpm>/conf.d/20-pdo_mysql.ini.bak
-------------------------------------------------
/etc/php/8.3/<cli + fpm>/conf.d/20-pdo_mysql.ini |
-------------------------------------------------
mysql.default_socket=/var/lib/mysql/mysql.sock
- Create user
CREATE USER 'nc_user'@'localhost' IDENTIFIED BY 'password';
# Confirm user creation
SELECT User FROM mysql.server;
+-------------+
| User |
+-------------+
| mariadb.sys |
| mysql |
| nc_user |
| root |
+-------------+
- Create DB
CREATE DATABASE IF NOT EXISTS nc_db CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES on nc_db.* to 'nc_user'@'localhost';
FLUSH PRIVILEGES
# Confirm DB creation
SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| nc_db |
| performance_schema |
| sys |
+--------------------+
- Confirm PHP displays DB info
--------------------------------------
/var/www/nextcloud/config/config.php |
--------------------------------------
<?php
"dbtype" => "mysql",
"dbname" => "nc_db",
"dbuser" => "nc_user",
"dbpassword" => "password",
"dbhost" => "localhost",
"dbtableprefix" => "oc_",
"mysql.utf8mb4" => true,
nginx
- Download NC config
- Move config to sites-enabled directory
-------------------------------------------
/etc/nginx/sites-available/nextcloud.conf |
-------------------------------------------
upstream php-handler {
#server 127.0.0.1:9000;
server unix:/var/run/php/php8.3-fpm.sock;
}
# Set the `immutable` cache control options only for assets with a cache busting `v` argument
map $arg_v $asset_immutable {
"" "";
default ", immutable";
}
server {
listen 80;
listen [::]:80;
server_name 192.168.1.189;
# Prevent nginx HTTP Server Detection
server_tokens off;
# Enforce HTTPS just for `/nextcloud`
location /nextcloud {
return 301 https://$server_name$request_uri;
}
}
server {
#listen 443 ssl http2;
#listen [::]:443 ssl http2;
# With NGinx >= 1.25.1 you should use this instead:
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name 192.168.1.189;
# Path to the root of the domain
root /var/www;
# Use Mozilla's guidelines for SSL/TLS settings
# https://mozilla.github.io/server-side-tls/ssl-config-generator/
# PROVIDED VIA CODE SNIPPET
#ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
#ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;
# Prevent nginx HTTP Server Detection
server_tokens off;
# Set .mjs and .wasm MIME types
# Either include it in the default mime.types list
# and include that list explicitly or add the file extension
# only for Nextcloud like below:
include mime.types;
types {
text/javascript mjs;
application/wasm wasm;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ^~ /.well-known {
# The rules in this block are an adaptation of the rules
# in the Nextcloud `.htaccess` that concern `/.well-known`.
# ENSURE PROPER CONFIG VIA SOURCE LINK
location = /.well-known/carddav { return 301 /nextcloud/remote.php/dav/; }
location = /.well-known/caldav { return 301 /nextcloud/remote.php/dav/; }
location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
location /.well-known/pki-validation { try_files $uri $uri/ =404; }
# Let Nextcloud's API for `/.well-known` URIs handle all other
# requests by passing them to the front-end controller.
return 301 /nextcloud/index.php$request_uri;
}
location ^~ /nextcloud {
# set max upload size and increase upload timeout:
client_max_body_size 512M;
client_body_timeout 300s;
fastcgi_buffers 64 4K;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Pagespeed is not supported by Nextcloud, so if your server is built
# with the `ngx_pagespeed` module, uncomment this line to disable it.
#pagespeed off;
# The settings allows you to optimize the HTTP2 bandwidth.
# See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/
# for tuning hints
client_body_buffer_size 512k;
# HSTS settings
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
#add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
# HTTP response headers borrowed from Nextcloud `.htaccess`
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "noindex, nofollow" always;
add_header X-XSS-Protection "1; mode=block" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Specify how to handle directories -- specifying `/nextcloud/index.php$request_uri`
# here as the fallback means that Nginx always exhibits the desired behaviour
# when a client requests a path that corresponds to a directory that exists
# on the server. In particular, if that directory contains an index.php file,
# that file is correctly served; if it doesn't, then the request is passed to
# the front-end controller. This consistent behaviour means that we don't need
# to specify custom rules for certain paths (e.g. images and other assets,
# `/updater`, `/ocs-provider`), and thus
# `try_files $uri $uri/ /nextcloud/index.php$request_uri`
# always provides the desired behaviour.
index index.php index.html /nextcloud/index.php$request_uri;
# Rule borrowed from `.htaccess` to handle Microsoft DAV clients
location = /nextcloud {
if ( $http_user_agent ~ ^DavClnt ) {
return 302 /nextcloud/remote.php/webdav/$is_args$args;
}
}
# Rules borrowed from `.htaccess` to hide certain paths from clients
location ~ ^/nextcloud/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
location ~ ^/nextcloud/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
# Ensure this block, which passes PHP files to the PHP process, is above the blocks
# which handle static assets (as seen below). If this block is not declared first,
# then Nginx will encounter an infinite rewriting loop when it prepends
# `/nextcloud/index.php` to the URI, resulting in a HTTP 500 error response.
location ~ \.php(?:$|/) {
# Required for legacy support
rewrite ^/nextcloud/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy) /nextcloud/index.php$request_uri;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_max_temp_file_size 0;
}
# Serve static files
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
try_files $uri /nextcloud/index.php$request_uri;
# HTTP response headers borrowed from Nextcloud `.htaccess`
add_header Cache-Control "public, max-age=15778463$asset_immutable";
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "noindex, nofollow" always;
add_header X-XSS-Protection "1; mode=block" always;
access_log off; # Optional: Don't log access to assets
}
location ~ \.(otf|woff2?)$ {
try_files $uri /nextcloud/index.php$request_uri;
expires 7d; # Cache-Control policy borrowed from `.htaccess`
access_log off; # Optional: Don't log access to assets
}
# Rule borrowed from `.htaccess`
location /nextcloud/remote {
return 301 /nextcloud/remote.php$request_uri;
}
location /nextcloud {
try_files $uri $uri/ /nextcloud/index.php$request_uri;
}
}
# SUPPRESS LOG MESSAGES (nginx section 3)
location = /data/htaccesstest.txt {
allow all;
log_not_found off;
access_log off;
}
}
Log entries
Nextcloud
Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log
located in your data directory). Feel free to use a pastebin/gist service if necessary.
NA
Web Browser
If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.
NA
Web server / Reverse Proxy
The output of your Apache/nginx/system log in /var/log/____
:
NA
Configuration
Nextcloud
The output of occ config:list system
or similar is best, but, if not possible, the contents of your config.php
file from /path/to/nextcloud
is fine (make sure to remove any identifiable information!):
{
"system": {
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "31.0.4.1",
"overwrite.cli.url": "http:\/\/localhost",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0,
"timeout": 0,
"password": "***REMOVED SENSITIVE VALUE***"
}
}
}
Apps
The output of occ app:list
(if possible).
Enabled:
- activity: 4.0.0
- app_api: 5.0.2
- bruteforcesettings: 4.0.0
- circles: 31.0.0
- cloud_federation_api: 1.14.0
- comments: 1.21.0
- contactsinteraction: 1.12.0
- dashboard: 7.11.0
- dav: 1.33.0
- federatedfilesharing: 1.21.0
- federation: 1.21.0
- files: 2.3.1
- files_downloadlimit: 4.0.0
- files_pdfviewer: 4.0.0
- files_reminders: 1.4.0
- files_sharing: 1.23.1
- files_trashbin: 1.21.0
- files_versions: 1.24.0
- firstrunwizard: 4.0.0
- logreader: 4.0.0
- lookup_server_connector: 1.19.0
- nextcloud_announcements: 3.0.0
- notifications: 4.0.0
- oauth2: 1.19.1
- password_policy: 3.0.0
- photos: 4.0.0-dev.1
- privacy: 3.0.0
- profile: 1.0.0
- provisioning_api: 1.21.0
- recommendations: 4.0.0
- related_resources: 2.0.0
- serverinfo: 3.0.0
- settings: 1.14.0
- sharebymail: 1.21.0
- support: 3.0.0
- survey_client: 3.0.0
- systemtags: 1.21.1
- text: 5.0.0
- theming: 2.6.1
- twofactor_backupcodes: 1.20.0
- updatenotification: 1.21.0
- user_status: 1.11.0
- viewer: 4.0.0
- weather_status: 1.11.0
- webhook_listeners: 1.2.0
- workflowengine: 2.13.0
Disabled:
- admin_audit: 1.21.0
- encryption: 2.19.0
- files_external: 1.23.0
- suspicious_login: 9.0.1
- twofactor_nextcloud_notification: 5.0.0
- twofactor_totp: 13.0.0-dev.0
- user_ldap: 1.22.0
Tips for increasing the likelihood of a response
- Use the
preformatted text
formatting option in the editor for all log entries and configuration output. - If screenshots are useful, feel free to include them.
- If possible, also include key error output in text form so it can be searched for.
- Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.