Cloudflare tunnel not connecting to Apache server

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

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:

(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. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • latest
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian 12.9.0 in a VM
  • Web server and version (e.g, Apache 2.4.25):
    • Apache
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Cloudflare Tunnel
  • PHP version (e.g, 8.3):
    • not sure
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • A few days ago when I tried to install Nextcloud
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Yes (DNS and tunnel)

Summary of the issue you are facing:

I tried to install nextcloud aio on a fresh debian vm on my macbook air using a cloudflare tunnel, but following all the instructions only yields the logs below, and a 502 Bad Gateway error.

Steps to replicate it (hint: details matter!):

  1. vm in UTM on mac
  2. follow reverse proxy instructions for cloudflare tunnel

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.

2025-02-01T02:22:01.547357104Z Connection to nextcloud-aio-database (172.18.0.5) 5432 port [tcp/postgresql] succeeded!
2025-02-01T02:22:01.549646953Z + '[' -f /dev-dri-group-was-added ']'
2025-02-01T02:22:01.549692451Z ++ find /dev -maxdepth 1 -mindepth 1 -name dri
2025-02-01T02:22:01.550219811Z + '[' -n '' ']'
2025-02-01T02:22:01.550241477Z + set +x
2025-02-01T02:22:01.563014763Z Enabling Imagick...
2025-02-01T02:22:02.520422801Z WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.21/main: No such file or directory
2025-02-01T02:22:02.520436967Z WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.21/community: No such file or directory
2025-02-01T02:22:02.548753213Z Connection to nextcloud-aio-redis (172.18.0.6) 6379 port [tcp/redis] succeeded!
2025-02-01T02:22:02.671369212Z Initializing nextcloud 30.0.5.1 ...
2025-02-01T02:22:06.202410215Z Initializing finished
2025-02-01T02:22:06.202553836Z New Nextcloud instance.
2025-02-01T02:22:06.213852221Z Installing with pgsql database
2025-02-01T02:22:06.213884262Z Starting Nextcloud installation...
2025-02-01T02:22:23.347425112Z Nextcloud was successfully installed
2025-02-01T02:22:23.643535289Z  - Repair MySQL collation
2025-02-01T02:22:23.643555788Z      - Not a mysql database -> nothing to do
2025-02-01T02:22:23.643558372Z  - Clean tags and favorites
2025-02-01T02:22:23.644274812Z      - 0 tags of deleted users have been removed.
2025-02-01T02:22:23.645571530Z      - 0 tags for delete files have been removed.
2025-02-01T02:22:23.645762525Z      - 0 tag entries for deleted tags have been removed.
2025-02-01T02:22:23.645985311Z      - 0 tags with no entries have been removed.
2025-02-01T02:22:23.645990478Z  - Repair invalid shares
2025-02-01T02:22:23.646789458Z  - Move .step file of updater to backup location
2025-02-01T02:22:23.646794708Z  - Add move avatar background job
2025-02-01T02:22:23.646798249Z      - Add background job
2025-02-01T02:22:23.655330787Z  - Add preview cleanup background jobs
2025-02-01T02:22:23.666562174Z  - Migrate oauth2_clients table to nextcloud schema
2025-02-01T02:22:23.744687690Z      - Update the oauth2_access_tokens table schema.
2025-02-01T02:22:23.744700981Z      - Update the oauth2_clients table schema.
2025-02-01T02:22:23.881583118Z      - Delete clients (and their related access tokens) with the redirect_uri starting with oc:// or ending with *
2025-02-01T02:22:23.884897744Z  - Repair language codes
2025-02-01T02:22:23.884904911Z  - Add log rotate job
2025-02-01T02:22:23.889437714Z  - Clear frontend caches
2025-02-01T02:22:23.889532087Z      - Image cache cleared
2025-02-01T02:22:23.935388655Z      - JS cache cleared
2025-02-01T02:22:23.935402280Z  - Clear every generated avatar
2025-02-01T02:22:23.935412196Z  - Add preview background cleanup job
2025-02-01T02:22:23.940260700Z  - Queue a one-time job to cleanup old backups of the updater
2025-02-01T02:22:23.945430072Z  - Cleanup invalid photocache files for carddav
2025-02-01T02:22:23.945441197Z  - Add background job to cleanup login flow v2 tokens
2025-02-01T02:22:23.950438364Z  - Remove potentially over exposing share links
2025-02-01T02:22:23.950445280Z      - No need to remove link shares.
2025-02-01T02:22:23.950446655Z  - Clear access cache of projects
2025-02-01T02:22:23.950447822Z  - Reset generated avatar flag
2025-02-01T02:22:23.950448947Z  - Keep legacy encryption enabled
2025-02-01T02:22:23.950450030Z  - Check encryption key format
2025-02-01T02:22:23.950451155Z  - Remove old dashboard app config data
2025-02-01T02:22:23.950452322Z  - Add job to cleanup the bruteforce entries
2025-02-01T02:22:23.955382158Z  - Queue a one-time job to check for user uploaded certificates
2025-02-01T02:22:23.955388032Z  - Repair DAV shares
2025-02-01T02:22:23.955389407Z  - Add background job to set the lookup server share state for users
2025-02-01T02:22:23.958437498Z  - Add token cleanup job
2025-02-01T02:22:23.965087916Z  - Clean up abandoned apps
2025-02-01T02:22:23.965528697Z  - Add possibly missing system config
2025-02-01T02:22:23.965536488Z  - Add AI tasks cleanup jobs
2025-02-01T02:22:23.980653654Z  - Queue a job to generate metadata
2025-02-01T02:22:23.985609072Z  - migrate lazy config values
2025-02-01T02:22:23.986550299Z  - Cache logo dimension to fix size in emails on Outlook
2025-02-01T02:22:23.986565924Z      - Theming is not used to provide a logo
2025-02-01T02:22:23.986570799Z  - Remove legacy ".ocdata" file
2025-02-01T02:22:23.986637422Z  - Add cleanup-deleted-users background job
2025-02-01T02:22:23.991485676Z  - AppAPI Daemons configuration GPU params update
2025-02-01T02:22:23.992477902Z      - Daemons configuration GPU params updated: 0
2025-02-01T02:22:23.992507401Z  - Upgrading Circles App
2025-02-01T02:22:24.017595654Z  - Fix component of birthday calendars
2025-02-01T02:22:24.018497257Z      - 0 birthday calendars updated.
2025-02-01T02:22:24.018503840Z  - Regenerating birthday calendars to use new icons and fix old birthday events without year
2025-02-01T02:22:24.018505632Z      - Adding background jobs to regenerate birthday calendar
2025-02-01T02:22:24.025805869Z  - Fix broken values of calendar objects
2025-02-01T02:22:24.029683898Z     0 [>---------------------------]
2025-02-01T02:22:24.029696439Z  - Registering building of calendar search index as background job
2025-02-01T02:22:24.030715539Z      - Add background job
2025-02-01T02:22:24.039387742Z  - Register building of social profile search index as background job
2025-02-01T02:22:24.040017643Z  - Registering background jobs to update cache for webcal calendars
2025-02-01T02:22:24.040348093Z      - Added 0 background jobs to update webcal calendars
2025-02-01T02:22:24.040353260Z  - Registering building of calendar reminder index as background job
2025-02-01T02:22:24.040515172Z      - Add background job
2025-02-01T02:22:24.048342979Z  - Clean up orphan event and contact data
2025-02-01T02:22:24.048688929Z      - 0 events without a calendar have been cleaned up
2025-02-01T02:22:24.049257707Z      - 0 properties without an events have been cleaned up
2025-02-01T02:22:24.049767611Z      - 0 changes without a calendar have been cleaned up
2025-02-01T02:22:24.049979439Z      - 0 cached events without a calendar subscription have been cleaned up
2025-02-01T02:22:24.050198517Z      - 0 changes without a calendar subscription have been cleaned up
2025-02-01T02:22:24.050772419Z      - 0 contacts without an addressbook have been cleaned up
2025-02-01T02:22:24.050919707Z      - 0 properties without a contact have been cleaned up
2025-02-01T02:22:24.051249158Z      - 0 changes without an addressbook have been cleaned up
2025-02-01T02:22:24.051254324Z  - Remove activity entries of private events
2025-02-01T02:22:24.056080997Z      - Removed 0 activity entries
2025-02-01T02:22:24.056087455Z  - Clean up old calendar subscriptions from deleted users that were not cleaned-up
2025-02-01T02:22:24.056289533Z     0 [->--------------------------]
2025-02-01T02:22:24.056294741Z      - 0 calendar subscriptions without an user have been cleaned up
2025-02-01T02:22:24.056296616Z  - Remove invalid object properties
2025-02-01T02:22:24.056693857Z      - 0 invalid object properties removed.
2025-02-01T02:22:24.056698815Z  - Fix the share type of guest shares when migrating from ownCloud
2025-02-01T02:22:24.056700065Z  - Copy the share password into the dedicated column
2025-02-01T02:22:24.056701315Z  - Set existing shares as accepted
2025-02-01T02:22:24.056702440Z  - Update OAuth token expiration times
2025-02-01T02:22:24.056965808Z  - init metadata
2025-02-01T02:22:24.057236885Z  - Switches from default updater server to the customer one if a valid subscription is available
2025-02-01T02:22:24.062379383Z  - Send an admin notification if monthly report is disabled
2025-02-01T02:22:24.066304995Z  - Force-reset all Text document sessions
2025-02-01T02:22:24.066310994Z  - Initialize migration of background images from dashboard to theming app
2025-02-01T02:22:24.071375369Z  - Add background job to check for backup codes
2025-02-01T02:22:24.075406937Z  - Populating added database structures for workflows
2025-02-01T02:22:24.083156745Z Applying default settings...
2025-02-01T02:22:24.244527348Z System config value loglevel set to integer 2
2025-02-01T02:22:24.405629291Z System config value log_type set to string file
2025-02-01T02:22:24.567298012Z System config value logfile set to string /var/www/html/data/nextcloud.log
2025-02-01T02:22:24.727131611Z System config value log_rotate_size set to integer 10485760
2025-02-01T02:22:24.931326532Z admin_audit 1.20.0 enabled
2025-02-01T02:22:25.107478791Z Config value 'logfile' for app 'admin_audit' is now set to '/var/www/html/data/audit.log', stored as mixed in fast cache
2025-02-01T02:22:25.272675083Z System config value log.condition => apps => 0 set to string admin_audit
2025-02-01T02:22:25.277770958Z Applying preview settings...
2025-02-01T02:22:25.436608031Z System config value preview_max_x set to integer 2048
2025-02-01T02:22:25.602852714Z System config value preview_max_y set to integer 2048
2025-02-01T02:22:25.763149418Z System config value jpeg_quality set to integer 60
2025-02-01T02:22:25.960982786Z Config value 'jpeg_quality' for app 'preview' is now set to '60', stored as mixed in fast cache
2025-02-01T02:22:26.133423760Z System config value enabledPreviewProviders deleted
2025-02-01T02:22:26.324217840Z System config value enabledPreviewProviders => 1 set to string OC\Preview\Image
2025-02-01T02:22:26.488841679Z System config value enabledPreviewProviders => 2 set to string OC\Preview\MarkDown
2025-02-01T02:22:26.651058118Z System config value enabledPreviewProviders => 3 set to string OC\Preview\MP3
2025-02-01T02:22:26.830757258Z System config value enabledPreviewProviders => 4 set to string OC\Preview\TXT
2025-02-01T02:22:27.018038426Z System config value enabledPreviewProviders => 5 set to string OC\Preview\OpenDocument
2025-02-01T02:22:27.180018403Z System config value enabledPreviewProviders => 6 set to string OC\Preview\Movie
2025-02-01T02:22:27.341725512Z System config value enabledPreviewProviders => 7 set to string OC\Preview\Krita
2025-02-01T02:22:27.507273196Z System config value enable_previews set to boolean true
2025-02-01T02:22:27.511984790Z Applying other settings...
2025-02-01T02:22:27.744001458Z Adding additional fs_storage_path_prefix index to the oc_filecache table, this can take some time...
2025-02-01T02:22:27.833723341Z oc_filecache table updated successfully.
2025-02-01T02:22:27.833736382Z Adding additional systag_by_objectid index to the oc_systemtag_object_mapping table, this can take some time...
2025-02-01T02:22:27.936319372Z oc_systemtag_object_mapping table updated successfully.
2025-02-01T02:22:28.100356736Z System config value upgrade.disable-web set to boolean true
2025-02-01T02:22:28.261637929Z System config value mail_smtpmode set to string smtp
2025-02-01T02:22:28.426219876Z System config value trashbin_retention_obligation set to string auto, 30
2025-02-01T02:22:28.590009301Z System config value versions_retention_obligation set to string auto, 30
2025-02-01T02:22:28.753175741Z System config value activity_expire_days set to integer 30
2025-02-01T02:22:28.913150924Z System config value simpleSignUpLink.shown set to boolean false
2025-02-01T02:22:29.079166518Z System config value share_folder set to string /Shared
2025-02-01T02:22:33.030185619Z deck 1.14.3 installed
2025-02-01T02:22:33.035795449Z deck enabled
2025-02-01T02:22:33.571089279Z twofactor_totp 12.0.0-dev enabled
2025-02-01T02:22:34.354804654Z tasks 0.16.1 installed
2025-02-01T02:22:34.363674036Z tasks enabled
2025-02-01T02:22:36.372969704Z calendar 5.0.9 installed
2025-02-01T02:22:36.378298835Z calendar enabled
2025-02-01T02:22:37.272073054Z contacts 6.1.3 installed
2025-02-01T02:22:37.280198249Z contacts enabled
2025-02-01T02:22:38.526043925Z notes 4.11.0 installed
2025-02-01T02:22:38.532197457Z notes enabled
2025-02-01T02:22:39.102623990Z Applying one-click-instance settings...
2025-02-01T02:22:39.268703957Z System config value one-click-instance set to boolean true
2025-02-01T02:22:39.439768482Z System config value one-click-instance.user-limit set to integer 100
2025-02-01T02:22:39.641429674Z System config value one-click-instance.link set to string https://nextcloud.com/all-in-one/
2025-02-01T02:22:39.817054266Z support already enabled
2025-02-01T02:22:39.821935785Z Adjusting log files...
2025-02-01T02:22:39.999086594Z System config value upgrade.cli-upgrade-link set to string https://github.com/nextcloud/all-in-one/discussions/2726
2025-02-01T02:22:40.176220976Z System config value logfile set to string /var/www/html/data/nextcloud.log
2025-02-01T02:22:40.348769958Z Config value were not updated
2025-02-01T02:22:40.530644030Z System config value updatedirectory set to string /nc-updater
2025-02-01T02:22:40.708194487Z System config value maintenance_window_start set to integer 100
2025-02-01T02:22:40.714506893Z Applying network settings...
2025-02-01T02:22:40.891082913Z System config value allow_local_remote_servers set to boolean true
2025-02-01T02:22:41.063221289Z System config value davstorage.request_timeout set to integer 3600
2025-02-01T02:22:41.239403641Z System config value trusted_domains => 1 set to string nextcloud.domain.xyz
2025-02-01T02:22:41.424589342Z System config value overwrite.cli.url set to string https://nextcloud.domain.xyz/
2025-02-01T02:22:41.601710757Z System config value documentation_url.server_logs set to string https://github.com/nextcloud/all-in-one/discussions/5425
2025-02-01T02:22:41.780524386Z System config value htaccess.RewriteBase set to string /
2025-02-01T02:22:41.951249021Z .htaccess has been updated
2025-02-01T02:22:42.120988948Z System config value dbpersistent set to boolean false
2025-02-01T02:22:42.290910548Z System config value auth.bruteforce.protection.enabled set to boolean true
2025-02-01T02:22:42.461746420Z System config value ratelimit.protection.enabled set to boolean true
2025-02-01T02:22:42.633346900Z System config value files_external_allow_create_new_local set to boolean false
2025-02-01T02:22:43.003019382Z nextcloud-aio 0.7.0 enabled
2025-02-01T02:22:44.580775295Z notify_push 1.0.0 installed
2025-02-01T02:22:44.586095017Z notify_push enabled
2025-02-01T02:22:44.779130777Z System config value trusted_proxies => 0 set to string 127.0.0.1
2025-02-01T02:22:44.953024229Z System config value trusted_proxies => 1 set to string ::1
2025-02-01T02:22:45.166287052Z System config value trusted_proxies => 10 set to string 172.18.0.0/16
2025-02-01T02:22:45.350567485Z Config value 'base_endpoint' for app 'notify_push' is now set to 'https://nextcloud.domain.xyz/push', stored as mixed in fast cache
2025-02-01T02:22:45.355597381Z + echo nextcloud-aio-collabora
2025-02-01T02:22:45.355610798Z + grep -q 'nextcloud-.*-collabora'
2025-02-01T02:22:45.356139537Z + COLLABORA_HOST=nextcloud.domain.xyz
2025-02-01T02:22:45.356145370Z + set +x
2025-02-01T02:22:47.510826630Z richdocuments 8.5.3 installed
2025-02-01T02:22:47.516109439Z richdocuments enabled
2025-02-01T02:22:47.715436046Z Config value 'wopi_url' for app 'richdocuments' is now set to 'https://nextcloud.domain.xyz/', stored as mixed in fast cache
2025-02-01T02:22:48.123176219Z Config value 'wopi_allowlist' for app 'richdocuments' is now set to '104.21.112.1,2606:4700:3030::6815:1001,127.0.0.1/8,192.168.0.0/16,172.16.0.0/12,10.0.0.0/8,fd00::/8,::1', stored as mixed in fast cache
2025-02-01T02:22:48.128168452Z + '[' -z '' ']'
2025-02-01T02:22:48.128181160Z + TALK_HOST=nextcloud.domain.xyz
2025-02-01T02:22:48.128182660Z + HPB_PATH=/standalone-signaling/
2025-02-01T02:22:48.128183826Z + '[' -z '' ']'
2025-02-01T02:22:48.128184993Z + TURN_DOMAIN=nextcloud.domain.xyz
2025-02-01T02:22:48.128186118Z + set +x
2025-02-01T02:22:52.769119769Z spreed 20.1.3 installed
2025-02-01T02:22:52.773375811Z spreed enabled
2025-02-01T02:22:53.211337040Z Added nextcloud.domain.xyz:3478.
2025-02-01T02:22:53.639185170Z Added nextcloud.domain.xyz:3478.
2025-02-01T02:22:53.823889426Z There is nothing to delete.
2025-02-01T02:22:54.199142731Z Added signaling server https://nextcloud.domain.xyz/standalone-signaling/.
2025-02-01T02:22:54.384870247Z Config value recording_servers of app spreed deleted
2025-02-01T02:22:54.570238187Z System config value enabledPreviewProviders => 0 set to string OC\Preview\Imaginary
2025-02-01T02:22:54.753893534Z System config value enabledPreviewProviders => 23 set to string OC\Preview\ImaginaryPDF
2025-02-01T02:22:54.940519200Z System config value preview_imaginary_url set to string http://nextcloud-aio-imaginary:9000
2025-02-01T02:22:55.126638686Z System config value preview_imaginary_key set to string 7104f8077ac87f114b31968032804556d20dd0fb44fba696
2025-02-01T02:22:55.513889519Z app_api 4.0.5 disabled
2025-02-01T02:22:56.482606270Z whiteboard 1.0.5 installed
2025-02-01T02:22:56.489074273Z whiteboard enabled
2025-02-01T02:22:56.695470875Z Config value 'collabBackendUrl' for app 'whiteboard' is now set to 'https://nextcloud.domain.xyz/whiteboard', stored as mixed in fast cache
2025-02-01T02:22:56.942487502Z Config value 'jwt_secret_key' for app 'whiteboard' is now set to 'fc47bfbf0c8b584b183dd5fbf17ba0a2b7e764f767dc8667', stored as mixed in fast cache
2025-02-01T02:22:56.962323627Z + '[' true = true ']'
2025-02-01T02:22:56.962352085Z + '[' 11000 = 443 ']'
2025-02-01T02:22:56.962354751Z + set +x
2025-02-01T02:22:58.146478966Z Waiting for Apache to become available...
2025-02-01T02:22:58.236263007Z [01-Feb-2025 02:22:58] NOTICE: fpm is running, pid 408
2025-02-01T02:22:58.236282381Z [01-Feb-2025 02:22:58] NOTICE: ready to handle connections
2025-02-01T02:23:13.153130262Z Connection to nextcloud-aio-apache (172.18.0.11) 11000 port [tcp/*] succeeded!
2025-02-01T02:23:13.155087480Z Activating Collabora config...
2025-02-01T02:23:13.392123520Z ✓ Reset callback url autodetect
2025-02-01T02:23:13.392146686Z Checking configuration
2025-02-01T02:23:13.392148436Z 🛈 Configured WOPI URL: https://nextcloud.domain.xyz
2025-02-01T02:23:13.392149686Z 🛈 Configured public WOPI URL: https://nextcloud.domain.xyz
2025-02-01T02:23:13.392151144Z 🛈 Configured callback URL: 
2025-02-01T02:23:13.392152269Z 
2025-02-01T02:23:13.504617846Z Failed to fetch discovery endpoint from https://nextcloud.domain.xyz
2025-02-01T02:23:13.504626638Z Server error: `GET https://nextcloud.domain.xyz/hosting/discovery` resulted in a `502 Bad Gateway` response:
2025-02-01T02:23:13.504628263Z error code: 502
2025-02-01T02:23:13.504629471Z 

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.

N/A?

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

apache:

2025-02-01T02:22:19.866237018Z Waiting for Nextcloud to start...
2025-02-01T02:22:24.868136674Z Waiting for Nextcloud to start...
2025-02-01T02:22:29.877945948Z Waiting for Nextcloud to start...
2025-02-01T02:22:34.882155640Z Waiting for Nextcloud to start...
2025-02-01T02:22:39.883601442Z Waiting for Nextcloud to start...
2025-02-01T02:22:44.885247852Z Waiting for Nextcloud to start...
2025-02-01T02:22:49.887885390Z Waiting for Nextcloud to start...
2025-02-01T02:22:54.891618139Z Waiting for Nextcloud to start...
2025-02-01T02:22:59.894984091Z Connection to nextcloud-aio-nextcloud (172.18.0.8) 9000 port [tcp/*] succeeded!
2025-02-01T02:23:01.134993326Z [Sat Feb 01 02:23:01.134715 2025] [mpm_event:notice] [pid 56:tid 56] AH00489: Apache/2.4.62 (Unix) configured -- resuming normal operations
2025-02-01T02:23:01.135198572Z [Sat Feb 01 02:23:01.135094 2025] [core:notice] [pid 56:tid 56] AH00094: Command line: '/usr/local/apache2/bin/httpd -D FOREGROUND'
2025-02-01T02:23:01.145403763Z {"level":"info","ts":1738376581.1450598,"msg":"using config from file","file":"/tmp/Caddyfile"}
2025-02-01T02:23:01.146750863Z {"level":"info","ts":1738376581.1465828,"msg":"adapted config to JSON","adapter":"caddyfile"}

Cloudflare tunnel:

{
  "connIndex": 2,
  "originService": "http://localhost:11000",
  "ingressRule": 0,
  "error": "Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:11000: connect: connection refused"
}

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": {
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "check_data_directory_permissions": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "nextcloud.domain.xyz",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "nextcloud.domain.xyz"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "30.0.5.1",
        "overwrite.cli.url": "https:\/\/nextcloud.domain.xyz\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": 2,
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": 10485760,
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "7": "OC\\Preview\\Krita",
            "0": "OC\\Preview\\Imaginary",
            "23": "OC\\Preview\\ImaginaryPDF"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": 30,
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
        "updatedirectory": "\/nc-updater",
        "maintenance_window_start": 100,
        "allow_local_remote_servers": true,
        "davstorage.request_timeout": 3600,
        "documentation_url.server_logs": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/5425",
        "htaccess.RewriteBase": "\/",f
        "dbpersistent": false,
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "DOMAIN": "nextcloud.domain.xyz"
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 3.0.0
  - admin_audit: 1.20.0
  - bruteforcesettings: 3.0.0
  - calendar: 5.0.9
  - circles: 30.0.0
  - cloud_federation_api: 1.13.0
  - comments: 1.20.1
  - contacts: 6.1.3
  - contactsinteraction: 1.11.0
  - dashboard: 7.10.0
  - dav: 1.31.1
  - deck: 1.14.3
  - federatedfilesharing: 1.20.0
  - federation: 1.20.0
  - files: 2.2.0
  - files_downloadlimit: 3.0.0
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - firstrunwizard: 3.0.0
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - nextcloud-aio: 0.7.0
  - nextcloud_announcements: 2.0.0
  - notes: 4.11.0
  - notifications: 3.0.0
  - notify_push: 1.0.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - photos: 3.0.2
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - recommendations: 3.0.0
  - related_resources: 1.5.0
  - richdocuments: 8.5.3
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - spreed: 20.1.3
  - support: 2.0.0
  - survey_client: 2.0.0
  - systemtags: 1.20.0
  - tasks: 0.16.1
  - text: 4.1.0
  - theming: 2.5.0
  - twofactor_backupcodes: 1.19.0
  - twofactor_totp: 12.0.0-dev
  - user_status: 1.10.0
  - viewer: 3.0.0
  - weather_status: 1.10.0
  - webhook_listeners: 1.1.0-dev
  - whiteboard: 1.0.5
  - workflowengine: 2.12.0
Disabled:
  - app_api: 4.0.5 (installed 4.0.5)
  - encryption: 2.18.0
  - files_external: 1.22.0
  - suspicious_login: 8.0.0
  - twofactor_nextcloud_notification: 4.0.0
  - user_ldap: 1.21.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.

The output of nc -z localhost 11000; echo $? is 1.

Hi, see all-in-one/reverse-proxy.md at main · nextcloud/all-in-one · GitHub

I set the cloudflare tunnel to http://localhost:11000. Do I need to change it?

image

It depends on how you run cloudflare Tunnel. Is it running in a container or how do you run it?

It is a docker container on the same vm.

Then you need to adjust localhost:11000 to something else. Please read the documentation that I’ve send via link.

So for option i, do I just add --network host to the cloudflare tunnel container? (Sorry if this is a dumb question)

Yes, network: host should make it work

I get Incorrect Usage: flag provided but not defined: -network when I add --network host to the cloudflare tunnel command

can you try --net=host

I also get Incorrect Usage: flag provided but not defined: -net

Please post the full command you’re typing so we can stop going back and forth. :wink:

1 Like

Note two dashes (--).

1 Like

Sorry, I have run both docker run cloudflare/cloudflared:latest tunnel --no-autoupdate run --token mytoken --network host and docker run cloudflare/cloudflared:latest tunnel --no-autoupdate run --token mytoken --net=host, basically just the instructions on the cloudflare zero trust dashboard plus --net=host or --network host. I was met both times with Incorrect Usage: flag provided but not defined: -network or Incorrect Usage: flag provided but not defined: -net