Skip to content

ownCloud WebDAV Sync for Remote Clients with Localtonet

Install and verify ownCloud Core from its official manual, then reach WebDAV sync clients and sharing links remotely through a Localtonet HTTP tunnel.

Summary in your language
In this article 12 sections
Self-Hosting · ownCloud WebDAV Sync · Localtonet · 2026

Give an existing ownCloud server a public HTTPS address, then verify real remote file synchronization

A working ownCloud installation on your LAN is not automatically ready for remote WebDAV clients. Its public hostname, HTTPS URL generation, authentication, and file operations must all work through the remote connection. This guide starts with an already installed ownCloud Core server and shows how to publish it with a Localtonet HTTP tunnel, configure its public address, and test WebDAV from outside your network. It also covers client enrollment, safe operation, backups, and troubleshooting.

🔒 Keep ownCloud authentication and permissions in control 🌐 Public HTTPS without inbound router port forwarding ⚡ Verify DAV requests, not just the login page

Scope: an existing, working ownCloud Core installation

This is a remote-access tutorial, not an ownCloud installation tutorial. Before starting, you need a configured ownCloud Core 10.x server that already supports login, file upload, and authenticated WebDAV access locally. Its database, storage, PHP runtime, web server, and background-job mechanism must already be operational. We do not replace those components or change deployment methods here.

ownCloud Core and ownCloud Infinite Scale are different products. The PHP configuration keys and occ examples below apply to Core, not Infinite Scale. Although both can involve an HTTP ingress, their proxy, identity, and public-URL requirements are not interchangeable.

Use a maintained Core release and the component versions supported for that release. The ownCloud Server system requirements identify supported platform combinations; do not assume a newer PHP or database release is compatible simply because it is newer. This article does not claim that v10.16.6, or any other particular release, is currently the latest supported release. If you have not installed Core yet, complete a supported deployment such as the official ownCloud Docker deployment before following this remote-access workflow.

What to have ready

  • Administrative access to ownCloud and its configuration, plus a separate non-admin test account.
  • A current backup and a way to restore the configuration if a hostname change prevents login.
  • The local service address, port, installation path prefix, and transport. A root installation and an installation under /owncloud have different URLs.
  • A Localtonet account and our client installed on a device that can reach that service.
  • A shell with curl for WebDAV testing and a remote connection, such as a laptop on a mobile hotspot.
  • A host that remains powered on, with sufficient storage and an operational background-job scheduler.

The shell examples use illustrative values, not defaults. Replace 127.0.0.1:8080 with your verified listener, cloud.example.com with your assigned public hostname, and sync-test with your test account. For native PHP examples, /var/www/owncloud and www-data are example installation and service-account values. Container deployments must execute administrative commands inside the appropriate container using their supported wrapper.

How remote WebDAV reaches ownCloud

ownCloud provides the application: accounts, file permissions, storage, synchronization, and sharing. Localtonet provides the public route to that application. Our client establishes an outbound connection to a relay server, and an HTTP tunnel forwards requests from the assigned public HTTPS address to the local service.

The tunnel does not require inbound router port forwarding, a public IP address on your machine, or VPN setup. It still requires permitted outbound connectivity and access from the client device to the local service. It does not bypass network policy or ownCloud authorization.

Conceptual diagram connecting remote laptops, phones, and sync clients to a local ownCloud server through an HTTP tunnel.
The tunnel supplies reachability; ownCloud continues to authenticate users and authorize file access.
🌐 One public application address The web interface, file WebDAV endpoint, and share links use the same public origin, with different application paths.
🔒 Application access control Use ownCloud accounts, app credentials where appropriate, folder permissions, and sharing policies.
🧪 Protocol-level acceptance tests A DAV listing, upload, download, and deletion provide stronger evidence than a successful browser login.

Use an HTTP tunnel for this workflow, not a File Server tunnel. File Server publishes a folder itself; it does not turn an existing folder into an ownCloud-managed installation. Calendar and contact integrations are outside this tutorial and may require additional ownCloud apps and configuration. File WebDAV success does not prove those integrations work.

Establish a known-good local baseline

Test from the device that will run the Localtonet client. If that device is the ownCloud host, a loopback listener can be sufficient. You do not need to make the server accessible to every LAN device just to create a tunnel. If the client runs elsewhere, use the ownCloud host's reachable LAN address instead.

Illustrative browser view of a local file-manager page used to check application access before tunneling.
Use the actual interface on your installation to verify login and storage. This illustration is not a version-specific ownCloud screenshot.

Check the application and its state

  1. Open the existing local URL and sign in. Resolve incomplete setup, maintenance mode, or security warnings before publishing it.
  2. Upload a small disposable file and download it. Confirm its contents, not just its filename.
  3. Sign in with the non-admin account and confirm it sees only the files it should.
  4. Record the working URL, including any path prefix, and identify the listener reachable from the Localtonet device.

For a native deployment, the supported occ status command gives useful installation and maintenance-state information:

cd /var/www/owncloud
sudo -u www-data php occ status

Use the PHP executable appropriate for your installation. A CLI PHP runtime that differs from the web runtime can produce misleading failures. The ownCloud occ command documentation explains the administrative command interface.

Find and verify the WebDAV endpoint

For ownCloud Core, the conventional user file WebDAV endpoint is:

https://PUBLIC-HOST/remote.php/webdav/

If the installation is below a prefix, preserve it:

https://PUBLIC-HOST/owncloud/remote.php/webdav/

The Files interface exposes a WebDAV URL in its settings area. Copy that URL while signed in, and compare it with the ownCloud WebDAV access instructions. The endpoint resolves to the authenticated user's files; do not append a username arbitrarily. Other DAV paths exist, but this guide consistently uses remote.php/webdav/.

From the Localtonet device, test the existing local endpoint. This loopback HTTP example is suitable only when the connection stays on the host. Use trusted HTTPS for credentials sent across an untrusted network.

curl --user 'sync-test' \
  --request PROPFIND \
  --header 'Depth: 0' \
  --include \
  'http://127.0.0.1:8080/remote.php/webdav/'

When only a username is supplied, curl prompts for the password rather than putting it in the command line. A successful collection query normally returns 207 Multi-Status with an XML response. A login page, a redirect to a different installation, or 401 Unauthorized is not a successful DAV baseline. Fix local failures before adding the tunnel.

Create the Localtonet HTTP tunnel

Follow the Localtonet HTTP tunnel setup in its documented order: app installation, HTTP tunnel page, Process Type, AuthToken, server, local target, then creation and Start. Use current dashboard values rather than copying a relay code from an example.

1

Complete the Localtonet app installation

Install and run our client for your operating system on the device that passed the local test. Complete its device-token setup and confirm that it is connected.

2

Open the HTTP tunnel page

Choose the HTTP tunnel workflow for the existing ownCloud web service.

3

Select the Process Type

Choose Random Sub Domain, Custom Sub Domain, or Custom Domain as available for your account. They serve the application at a public HTTPS address. Custom options depend on current dashboard and plan availability; use current documentation for custom-domain DNS requirements.

4

Select the AuthToken

Select the token used by the connected client device. Tokens identify devices, are device-specific, and must be kept secret.

5

Select the server

Choose a relay server from the choices currently offered in your dashboard.

6

Enter the local IP address and port

Use the listener verified from the client device. Loopback refers to that device, not to another machine or automatically to a separate container.

7

Create and start the tunnel

Create the configuration and press Start from the tunnel list. Creating a tunnel alone does not make it run. Record its assigned public HTTPS address.

Illustrative Localtonet console showing an HTTP tunnel with a loopback local target and public endpoint.
Check your actual connected device, local target, and running state. The illustration is not a substitute for the current dashboard labels.

This workflow assumes a verified local HTTP listener. If your application has an HTTPS-only origin, confirm the applicable origin-connection behavior in current HTTP tunnel documentation rather than pointing at a TLS port and assuming it behaves like plaintext HTTP.

Finish hostname configuration before enrolling clients

Record the assigned address, then stop the tunnel while making configuration changes if necessary. Do not invite users until the following tests pass. Select the intended long-term hostname before rollout; changing it later affects client accounts and distributed links.

Configure ownCloud's trusted hostname and public HTTPS URL

Three settings have different jobs: trusted_domains permits hostnames, URL overwrite settings control generated addresses, and trusted_proxies controls which proxies may supply trusted forwarding information. Adding a hostname to one does not configure the others.

Allow the public hostname

Back up config/config.php, then merge the public hostname into the existing trusted_domains array. Preserve required local names. Do not replace the whole configuration file with this fragment, and do not include a scheme or path in a trusted-domain entry.

'trusted_domains' => [
    'localhost',
    'cloud.example.com',
],

For containers whose startup configuration is generated from environment variables, make the equivalent persistent change in the deployment configuration as well. Otherwise a recreation may undo a manual edit. See the ownCloud configuration parameter reference for the settings applicable to your release.

Declare a canonical public address

For a dedicated installation intended to generate public URLs using one tunnel hostname, merge these values into its configuration:

'overwritehost' => 'cloud.example.com',
'overwriteprotocol' => 'https',
'overwrite.cli.url' => 'https://cloud.example.com',

overwritehost supplies the public authority, overwriteprotocol supplies the externally visible scheme, and overwrite.cli.url supplies the base URL for command-line contexts such as background jobs. These explicit settings avoid relying on automatic scheme detection when the public request is HTTPS but the origin connection is HTTP.

For an existing installation under /owncloud, preserve that deployment path:

'overwritehost' => 'cloud.example.com',
'overwriteprotocol' => 'https',
'overwritewebroot' => '/owncloud',
'overwrite.cli.url' => 'https://cloud.example.com/owncloud',

Do not invent a prefix the web server does not actually serve. These unconditional overrides establish a canonical public address and can also affect links generated during local access. If you need separate local and public behavior, ownCloud provides overwritecondaddr to apply overrides based on the request's remote address. Use it only after verifying the actual proxy peer address; a copied regular expression can match the wrong traffic.

Trust only verified proxy peers

The ownCloud reverse-proxy configuration guide documents trusted_proxies and forwarded_for_headers. A trusted proxy is the immediate peer ownCloud actually sees, which may be a local process, container gateway, or another reverse proxy. It is not necessarily the public relay address.

Inspect your web server's request logging to determine that peer and the headers delivered along your actual path. Only add a proxy address after confirming that the proxy sanitizes the forwarding headers you intend to trust. Do not trust every address, an entire LAN without justification, or user-supplied forwarding headers. Incorrect trust can let clients spoof the address used in logs or access controls.

We do not assume a particular Localtonet forwarded-header contract here. Explicit host and HTTPS overrides address URL generation, but they do not establish original-client-IP accuracy. If your deployment depends on client IPs for restrictions or auditing, verify that behavior separately before relying on it.

Trusted domains are not user authentication

A trusted hostname permits requests addressed to the application. It does not give visitors access to files. Keep ownCloud authentication, authorization, and share-link policies enabled.

Run end-to-end remote WebDAV tests

Restart the tunnel if you stopped it, and perform these tests from outside the LAN. Use a disposable account and files. The commands below use a POSIX shell; set the actual public base URL without a trailing slash, including /owncloud if required.

BASE='https://cloud.example.com'
DAV="$BASE/remote.php/webdav/"
OC_USER='sync-test'

curl --user "$OC_USER" \
  --request PROPFIND \
  --header 'Depth: 1' \
  --include \
  "$DAV"

Expect 207 Multi-Status and DAV XML describing the collection and its immediate children. Inspect the response body, including per-resource status values. A top-level 207 is a multi-status envelope, not a guarantee that every requested property succeeded.

Do not add --insecure to bypass TLS verification. Do not initially follow redirects automatically: an unexpected Location header is valuable evidence of a hostname, scheme, or path problem. A DAV request should not be redirected to a local IP, an HTTP address, or an interactive login page.

Upload, download, compare, and delete

Use a unique filename to avoid overwriting existing data. These commands prompt for credentials independently:

NAME="localtonet-dav-test-$(date +%s).txt"
printf 'ownCloud remote DAV verification\n' > "$NAME"

curl --fail-with-body --user "$OC_USER" \
  --upload-file "$NAME" \
  --write-out '\nHTTP %{http_code}\n' \
  "$DAV$NAME"

curl --fail-with-body --user "$OC_USER" \
  --output "downloaded-$NAME" \
  "$DAV$NAME"

cmp "$NAME" "downloaded-$NAME"

curl --fail-with-body --user "$OC_USER" \
  --request DELETE \
  --write-out '\nHTTP %{http_code}\n' \
  "$DAV$NAME"

A new-resource upload normally returns 201 Created; replacing an existing resource can return 204 No Content. A successful download returns the original bytes, and cmp exits successfully without output when they match. Successful deletion normally returns 204 No Content. If your curl version lacks --fail-with-body, use --fail, understanding that error-body handling differs.

After deletion, confirm that the test file disappears from the web interface. Remove the two local test files when finished. Then repeat with a representative larger disposable file to check practical limits without risking important data.

Verify discovery, redirects, and share links

  • Open the public base URL in a fresh browser session. Login redirects and subsequent navigation must stay on the intended HTTPS hostname and installation prefix.
  • Open the Files settings and inspect the advertised WebDAV URL. It must identify the public endpoint rather than a LAN address.
  • Inspect DAV response paths and client discovery behavior. Relative DAV paths are normal; absolute URLs, when present, must point to a reachable intended origin.
  • Create a share link to a disposable file and open it in a private window outside the LAN. Check its hostname, HTTPS scheme, content, password requirement, and expiry where configured.
  • Complete an actual ownCloud client connection. That exercises application discovery beyond the direct curl endpoint.

Do not use calendar-specific discovery paths as a substitute for file WebDAV testing. Keep the acceptance criteria tied to the services you actually deployed.

Enroll remote sync and WebDAV clients

Conceptual flow showing an ownCloud sync client, WebDAV tool, and share-link browser connecting through one public endpoint.
Clients share a public origin, but use different paths and authentication flows.

ownCloud desktop and mobile clients

Enter the public ownCloud base URL, such as https://cloud.example.com, rather than the complete WebDAV endpoint when the ownCloud client asks for the server address. Include the installation prefix if there is one. Follow the client's authentication flow using a non-admin account.

Select a small test folder before syncing an entire library. Create a file locally, confirm it appears in the public web interface, then change or add a file through the web interface and confirm the client receives it. Review synchronization conflicts before expanding the selected folders. Mobile upload and offline-file behavior can differ from desktop folder synchronization, so test the actions you actually need.

Generic WebDAV clients

Use the full remote.php/webdav/ URL and the account's supported credentials. If your authentication configuration requires an app password or token for non-browser clients, generate the appropriate credential through ownCloud's account security controls. A browser SSO session or second-factor prompt cannot simply be replayed by a basic WebDAV client.

Never disable multifactor authentication just to make a DAV mount work. Confirm that your chosen authentication method supports the client, and use separate app credentials where your configuration supports them. Keep secrets out of shell history, screenshots, tickets, and shared mount configuration.

A mounted WebDAV drive is not necessarily a full offline synchronization client. Test caching, reconnect behavior, filenames, and larger transfers before relying on it during travel. Check applicable Localtonet plan limits and the ownCloud, PHP, and web-server limits; this article makes no unlimited-transfer claim for HTTP tunnels.

Security checks before ongoing use

Publishing the application exposes its reachable routes, not only the Files screen. Review the installation as an internet-facing service even if it was previously used only at home.

  • Use strong, unique account credentials and supported additional sign-in protections.
  • Keep daily sync separate from administration and grant users only the access they need.
  • Protect device-specific Localtonet tokens. If exposure is suspected, use current account-management guidance or support rather than assuming an undocumented recovery action.
  • Keep databases, caches, storage administration, and container-management interfaces outside the public tunnel.
  • Restrict direct origin access appropriately, especially if proxy headers influence security decisions.
  • Use password-protected, expiring public shares where appropriate, and remove obsolete links.
  • Patch ownCloud and its supported dependencies, and keep independent backups.

Do not place an interactive browser-only access challenge in front of WebDAV without testing compatibility. A control that works for the login page can block sync requests. Apply access controls at layers that support the intended clients.

Operate, back up, and update the service

Background jobs

ownCloud needs background jobs for scheduled application work. AJAX-triggered jobs depend on user activity and are a poor basis for an unattended sync server. Configure the supported system scheduler for your deployment and verify successful execution in the administration interface.

For a native installation using ownCloud's cron mode, the conventional setup selects Cron in administration settings and runs cron.php as the web-service user every 15 minutes. An example entry in that user's crontab is:

*/15 * * * * /usr/bin/php -f /var/www/owncloud/cron.php

Adapt both paths and the service account. Do not add a duplicate host scheduler if your container deployment already runs background jobs. Monitor execution errors and the last successful run, not merely the presence of a cron entry. The ownCloud background-job guidance describes the available modes.

Backups and restore

Synchronization is not backup: deletion or corruption can propagate to every client. A recoverable ownCloud backup needs a consistent database backup, the data directory, configuration, and any custom apps or deployment material required to reconstruct the installation. Record the installed version and preserve encryption-related material if server-side encryption is enabled.

For a coordinated backup window, pause client activity, prevent background jobs from writing, and enable maintenance mode using the deployment's administrative command mechanism:

cd /var/www/owncloud
sudo -u www-data php occ maintenance:mode --on
# Take a consistent database backup and filesystem backup here.
sudo -u www-data php occ maintenance:mode --off

The comments are deliberate: database export commands depend on your existing database engine and credential handling. Use that engine's supported backup process, not a copy of live database files. Resume scheduled jobs after the backup. Follow the ownCloud backup procedure for your deployment.

Test restoration in an isolated environment before an incident. Restore matching application code, configuration, data, and database state with correct permissions; verify local login and DAV before reopening remote access. Do not attempt recovery from a failed schema upgrade by restoring only the old application code.

Updates and reboot recovery

Before updating, review the supported upgrade path and app compatibility, take a tested backup, and schedule downtime. Use your installation method's supported update process, including any required database upgrade. For native deployments, occ upgrade is the administrative upgrade command when required by that procedure; it does not download application code. Container deployments may handle upgrade execution during startup, so do not run competing upgrade processes.

Afterward, check occ status, administrative warnings, background jobs, and the complete remote DAV test. The ownCloud upgrade documentation provides the method-specific sequence.

For reboot persistence, verify service-manager startup for the database, web server, PHP runtime, and scheduler, or the corresponding container restart configuration and persistent volumes. Verify Localtonet client startup using the supported method for its operating system. Do not assume a tunnel resumes merely because its configuration still exists: check the connected device and running tunnel after a controlled reboot.

Our Token/Tunnel webhooks can report Connected and Disconnected changes for a selected Token Group. These are connectivity notifications, not ownCloud health checks or file-event notifications. Pair them with application-level monitoring that does not expose credentials.

Troubleshoot from the origin outward

Repeat the same request locally and remotely, preserving the method, account, and path. Record timestamps and HTTP responses. ownCloud's default file logging commonly writes owncloud.log in the configured data directory, but log_type and logfile can change the destination. Also inspect web-server access/error logs, PHP diagnostics, scheduler output, and container logs where applicable.

A native administrator can query selected configuration values without dumping the entire secret-bearing configuration:

sudo -u www-data php occ config:system:get datadirectory
sudo -u www-data php occ config:system:get logfile
sudo -u www-data php occ config:system:get log_type

Unset values may indicate defaults rather than a fault. Redact usernames, paths, cookies, authorization headers, and share tokens before sharing diagnostics.

SymptomLikely causeNext check
Public endpoint unavailableDisconnected client, stopped tunnel, or unreachable targetVerify the local request from the Localtonet device, then connected state and Start.
Untrusted-domain warningPublic hostname missing from configurationMerge the actual hostname into trusted_domains and check persistent container configuration.
Redirect to HTTP or a LAN addressIncorrect public URL detectionInspect Location and check overwritehost, overwriteprotocol, prefix, and conditional overrides.
DAV returns 401Missing or unsupported credentialsTest the account and its app-authentication requirements. Do not treat browser login as DAV authentication proof.
DAV returns 404 or HTMLWrong endpoint or installation prefixUse the URL advertised by Files settings and preserve the base path.
DAV returns 403 or 405Authorization or method filteringCheck permissions and intermediary rules for PROPFIND, PUT, and DELETE.
Large files failQuota, storage, size limit, or timeoutCompare local and remote transfers; inspect ownCloud, PHP, web-server, and applicable tunnel limits.
Intermittent failures or stale workHost sleep, connectivity, or background jobsCheck uptime, disk capacity, scheduler success, and reconnect events.
Failures after hostname changesOld client URL or stale generated addressUpdate configuration and enrolled clients, then retest existing share links.

When a folder tunnel is the simpler choice

Keep ownCloud when you need its account model, application-managed sharing, and sync-client ecosystem. If you only need to publish an existing folder, our File Server tunnel is a different option that takes a folder path rather than an application IP and port.

File Server offers Default browser access, SFTP, and WebDAV sub-types. Its WebDAV option can support native network-drive workflows without deploying the ownCloud PHP stack. It is not a drop-in ownCloud server, and publishing ownCloud's internal data directory separately is not a safe substitute for accessing files through ownCloud.

Frequently asked questions

Which URL should I give a remote client?

Give an ownCloud sync client the public application base URL. Give a generic WebDAV client the full file endpoint, normally the base URL followed by /remote.php/webdav/. Preserve any installation prefix and verify the advertised URL in Files settings.

Does a working login page prove remote synchronization works?

No. Test an authenticated PROPFIND, upload, download comparison, and deletion, then complete an actual client sync. DAV methods, authentication, redirects, and transfer limits can fail independently of browser access.

Do I need a public IP or router port forwarding?

No. Our client establishes an outbound relay connection. It still needs permitted connectivity and must be able to reach the ownCloud listener. Follow your network's authorization and security policies.

Can I use these settings with Infinite Scale?

No. The configuration snippets and occ commands here target ownCloud Core. Infinite Scale has different architecture, identity, hostname, and proxy requirements and needs its own deployment-specific configuration.

What happens when the host sleeps or the tunnel stops?

The public route becomes unavailable. The tunnel requires a connected client and a running tunnel, and ownCloud itself must remain healthy. Clients may retry, but remote share links cannot work during the outage.

Publish a verified ownCloud endpoint with Localtonet

Start with a healthy local installation, configure its public HTTPS identity, and prove remote DAV file operations before enrolling your everyday clients.

Get Started Free →

Corrections & updates

Substantive changes approved by the Localtonet editorial team are listed transparently below.

Reviewed and updated for accuracy and completeness.

Localtonet is a secure multi-protocol tunneling and proxy platform designed to expose localhost, devices, private services, and AI agents to the public internet supporting HTTP/HTTPS tunnels, TCP/UDP forwarding, mobile proxy infrastructure, file server publishing, latency-optimized game connectivity, and developer-ready AI agent endpoint exposure from a single unified control plane.

Support