CloudPanel Remote Backups to OneDrive & Google Drive
Step-by-step guide to configure CloudPanel remote backups to OneDrive or Google Drive using Rclone. Includes restore steps, token expiry fixes, and troubleshooting tips.

If you self-host your apps on CloudPanel and don’t have remote backups, you’re one compromised hosting account or ransomware hit away from losing everything. Local backups on the same VPS won’t help when the server is gone.
CloudPanel is a free, open-source hosting panel and one of the best self-hosted server panels available. It uses Rclone under the hood for remote backups, supporting providers like Amazon S3, Dropbox, SFTP, and more. For some providers (DigitalOcean Spaces, Dropbox, SFTP), configuration happens directly in the UI. But for OneDrive and personal Google Drive, you need to go through the Rclone Custom Config path.
This guide covers the full setup for both providers, plus the restore steps and troubleshooting that most tutorials skip. If you prefer plugin-level backups for WordPress specifically, check WordPress backup plugins for an app-layer alternative.
What CloudPanel backs up (files, databases, and settings)
Before configuring anything, know what’s actually included when CloudPanel runs a remote backup.
Included in each backup:
- Home directory of each site (all files)
- Site settings and vhost configuration
- Databases, backed up before the file backup runs (since CloudPanel v2.4.0)
Excluded by default:
.sshdirectorieslogsdirectoriestmpdirectories
Database-first backup
Since CloudPanel v2.4.0, databases are dumped before the remote backup archive is created. This means if a file copy fails halfway through, you still have a consistent database snapshot in the archive.
You can also use the Excludes field in the CloudPanel UI to skip specific sites or paths. This is useful if you have large static asset directories that don’t need daily off-site backup.
If you’re hosting WordPress on CloudPanel, the backup includes everything: wp-content, uploads, database, and config. See how to host WordPress sites on CloudPanel for more on the setup.
Prerequisites for CloudPanel remote backups
Make sure these are in place before starting the Rclone config.
Check your instance timezone
CloudPanel docs explicitly state: the timezone must be correct for scheduled backups to run at the expected time.
Verify with:
timedatectl
If it’s wrong, fix it:
sudo timedatectl set-timezone Europe/Bucharest
Replace Europe/Bucharest with your actual timezone.
Wrong timezone = wrong backup times
If your server timezone is off, backups will run at unexpected hours. This matters if you have maintenance windows or want backups to run during low-traffic periods.
Create a target folder in OneDrive or Google Drive
Go to your cloud provider and create a dedicated folder for backups before running Rclone config. CloudPanel and Rclone won’t create it for you. If the folder doesn’t exist, you’ll get errors.
For this guide I’ll use a folder called dragos-cloudpanel-backups.
Storage costs to be aware of:
| Provider | Free tier | Paid tier | Notes |
|---|---|---|---|
| Google Drive | 15 GB | 100 GB ~ $1.99/mo | Undocumented ~750 GB/day upload limit |
| OneDrive | 5 GB | 100 GB ~ $1.99/mo, 1 TB with M365 ~ $6.99/mo | Refresh token expires after 90 days inactivity |
Both count backups against your storage quota. Plan retention accordingly.
Connect via SSH tunnel for browser authentication
Rclone needs a browser for OAuth, but your server is headless. The fix is an SSH tunnel that forwards port 53682 from the server to your local machine.
Tunnel only during setup
The SSH tunnel is only needed during the initial rclone config step. Day-to-day backups run without it.
ssh -L localhost:53682:localhost:53682 username@your_server_ipReplace username with your SSH user and your_server_ip with the server IP. This works in any terminal.
If you have WSL installed, use the same command:
ssh -L localhost:53682:localhost:53682 username@your_server_ipIf you don’t have WSL, use PuTTY: go to Connection → SSH → Tunnels, set Source port to 53682, Destination to localhost:53682, click Add, then connect.
For more details, see the Rclone remote setup docs.
If you haven’t installed CloudPanel yet, install CloudPanel on your server first. Also make sure to keep your CloudPanel installation up to date. Backup features have improved since v2.4.0.
How to set up CloudPanel backup to OneDrive
Run Rclone config for OneDrive
With the SSH tunnel open, SSH into your server and run:
rclone config
Follow the interactive prompts. The exact wording may differ depending on your Rclone version, but the choices and order are the same. Here’s the full session:
root@cp-dg:~# rclone config
2024/03/14 13:27:43 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> remote
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / 1Fichier
\ "fichier"
2 / Alias for an existing remote
\ "alias"
3 / Amazon Drive
\ "amazon cloud drive"
4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, Tencent COS, etc)
\ "s3"
5 / Backblaze B2
\ "b2"
6 / Box
\ "box"
7 / Cache a remote
\ "cache"
8 / Citrix Sharefile
\ "sharefile"
9 / Dropbox
\ "dropbox"
10 / Encrypt/Decrypt a remote
\ "crypt"
11 / FTP Connection
\ "ftp"
12 / Google Cloud Storage (this is not Google Drive)
\ "google cloud storage"
13 / Google Drive
\ "drive"
14 / Google Photos
\ "google photos"
15 / Hubic
\ "hubic"
16 / In memory object storage system.
\ "memory"
17 / Jottacloud
\ "jottacloud"
18 / Koofr
\ "koofr"
19 / Local Disk
\ "local"
20 / Mail.ru Cloud
\ "mailru"
21 / Microsoft Azure Blob Storage
\ "azureblob"
22 / Microsoft OneDrive
\ "onedrive"
23 / OpenDrive
\ "opendrive"
24 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
\ "swift"
25 / Pcloud
\ "pcloud"
26 / Put.io
\ "putio"
27 / SSH/SFTP Connection
\ "sftp"
28 / Sugarsync
\ "sugarsync"
29 / Transparently chunk/split large files
\ "chunker"
30 / Union merges the contents of several upstream fs
\ "union"
31 / Webdav
\ "webdav"
32 / Yandex Disk
\ "yandex"
33 / http Connection
\ "http"
34 / premiumize.me
\ "premiumizeme"
35 / seafile
\ "seafile"
Storage> 22
** See help for onedrive backend at: https://rclone.org/onedrive/ **
OAuth Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id>
OAuth Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n>
Remote config
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n>
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=LK_cdbrOrIT
Log in and authorize rclone for access
Waiting for code...
Got code
Choose a number from below, or type in an existing value
1 / OneDrive Personal or Business
\ "onedrive"
2 / Root Sharepoint site
\ "sharepoint"
3 / Type in driveID
\ "driveid"
4 / Type in SiteID
\ "siteid"
5 / Search a Sharepoint site
\ "search"
Your choice> 1
Found 1 drives, please select the one you want to use:
0: (personal) id=f9f661d3066d45ed
Chose drive to use:> 0
Found drive 'root' of type 'personal', URL: https://onedrive.live.com/?cid=f9f661d3066d45ed
Is that okay?
y) Yes (default)
n) No
y/n>
--------------------
[remote]
type = onedrive
token = {"access_token":"eyJ0eXAiOiJKV1QiLCJub25jZSI6ImFRVH","token_type":"Bearer","refresh_token":"M.R3_BL2-","expiry":"2024-03-14T14:33:11.976081855Z"}
drive_id = f9f661d3066d45ed
drive_type = personal
--------------------
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>
Current remotes:
Name Type
==== ====
remote onedrive
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q
Key choices:
- name> remote must be exactly
remote. CloudPanel hardcodes this name. - Storage> 22 is Microsoft OneDrive. You can also type
onedriveon newer Rclone versions. - client_id / client_secret: press Enter to use defaults.
- Use auto config?: say Yes. Rclone opens your browser via the SSH tunnel.
- OneDrive Personal or Business: choose the type that matches your account.
Verify the Rclone configuration
Before touching the CloudPanel UI, test that Rclone can actually write to the remote:
touch /tmp/test-file
rclone copy /tmp/test-file remote:dragos-cloudpanel-backups/
Check your OneDrive folder. The test file should appear within seconds. If it does, delete it:
rclone delete remote:dragos-cloudpanel-backups/test-file
Test passed?
If the test file appears in your cloud folder, Rclone is configured correctly. If you get auth errors or “directory not found”, re-run rclone config and check the folder name.
This step catches auth failures, missing folders, and permission issues before they silently break your real backups.
Configure CloudPanel to use the Custom Rclone Config
- Log in to CloudPanel
- Go to Admin Area → Backups
- Choose Custom Rclone Config
- Set Frequency (daily, weekly), Time, Retention Period (days), and Storage Directory (the folder you created, e.g.
dragos-cloudpanel-backups) - Optionally use the Excludes field to skip specific sites or paths
- Click Save, then hit Create Backup to run one immediately

After a few minutes (depending on site size), check OneDrive. You should see backup files appearing.
How to set up CloudPanel backup to Google Drive
Important: Google Workspace vs personal Google Drive
Google Workspace required for native UI option
CloudPanel’s built-in Google Drive option in the UI now requires a paid Google Workspace service account. If you have a personal Google account (the free one), you must use the Custom Rclone Config method described below. This is not a workaround. It’s the official path for personal accounts.
The steps below use the Custom Rclone Config approach, which works for both personal Google Drive and Google Workspace.
Run Rclone config for Google Drive
rclone config
Full interactive session:
root@cp-dg:~/.config/rclone# rclone config
2024/03/14 13:54:24 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> remote
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / 1Fichier
\ "fichier"
2 / Alias for an existing remote
\ "alias"
3 / Amazon Drive
\ "amazon cloud drive"
4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, Tencent COS, etc)
\ "s3"
5 / Backblaze B2
\ "b2"
6 / Box
\ "box"
7 / Cache a remote
\ "cache"
8 / Citrix Sharefile
\ "sharefile"
9 / Dropbox
\ "dropbox"
10 / Encrypt/Decrypt a remote
\ "crypt"
11 / FTP Connection
\ "ftp"
12 / Google Cloud Storage (this is not Google Drive)
\ "google cloud storage"
13 / Google Drive
\ "drive"
14 / Google Photos
\ "google photos"
15 / Hubic
\ "hubic"
16 / In memory object storage system.
\ "memory"
17 / Jottacloud
\ "jottacloud"
18 / Koofr
\ "koofr"
19 / Local Disk
\ "local"
20 / Mail.ru Cloud
\ "mailru"
21 / Microsoft Azure Blob Storage
\ "azureblob"
22 / Microsoft OneDrive
\ "onedrive"
23 / OpenDrive
\ "opendrive"
24 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
\ "swift"
25 / Pcloud
\ "pcloud"
26 / Put.io
\ "putio"
27 / SSH/SFTP Connection
\ "sftp"
28 / Sugarsync
\ "sugarsync"
29 / Transparently chunk/split large files
\ "chunker"
30 / Union merges the contents of several upstream fs
\ "union"
31 / Webdav
\ "webdav"
32 / Yandex Disk
\ "yandex"
33 / http Connection
\ "http"
34 / premiumize.me
\ "premiumizeme"
35 / seafile
\ "seafile"
Storage> 13
** See help for drive backend at: https://rclone.org/drive/ **
Google Application Client Id
Setting your own is recommended.
See https://rclone.org/drive/#making-your-own-client-id for how to create your own.
If you leave this blank, it will use an internal key which is low performance.
Enter a string value. Press Enter for the default ("").
client_id>
OAuth Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>
Scope that rclone should use when requesting access from drive.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / Full access all files, excluding Application Data Folder.
\ "drive"
2 / Read-only access to file metadata and file contents.
\ "drive.readonly"
/ Access to files created by rclone only.
3 | These are visible in the drive website.
| File authorization is revoked when the user deauthorizes the app.
\ "drive.file"
/ Allows read and write access to the Application Data folder.
4 | This is not visible in the drive website.
\ "drive.appfolder"
/ Allows read-only access to file metadata but
5 | does not allow any access to read or download file content.
\ "drive.metadata.readonly"
scope> 1
ID of the root folder
Leave blank normally.
Fill in to access "Computers" folders (see docs), or for rclone to use
a non root folder as its starting point.
Enter a string value. Press Enter for the default ("").
root_folder_id>
Service Account Credentials JSON file path
Leave blank normally.
Needed only if you want use SA instead of interactive login.
Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.
Enter a string value. Press Enter for the default ("").
service_account_file>
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n>
Remote config
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n>
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=lJ52bPvVGaG
Log in and authorize rclone for access
Waiting for code...
Got code
Configure this as a team drive?
y) Yes
n) No (default)
y/n>
--------------------
[remote]
scope = drive
token = {"access_token":"ya29.a0Ad52N3_J72wn8dG4c","token_type":"Bearer","refresh_token":"1//0czUgUBU95R8GCgYIARAAG-JK9klco7JLyA","expiry":"2024-03-14T14:55:20.87391752Z"}
--------------------
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>
Current remotes:
Name Type
==== ====
remote drive
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q
Key choices:
- name> remote: same requirement. Must be exactly
remote. - Storage> 13 is Google Drive. You can also type
driveon newer Rclone versions. - scope> 1: Full access. This is the default and what CloudPanel needs.
- Configure this as a team drive?: say No unless you’re using a Shared Drive.
- Use auto config?: say Yes. Opens browser via SSH tunnel.
Use your own Google Client ID (recommended)
Shared client_id works but has limits
Rclone’s default shared client_id works for initial setup. Since Rclone v1.74.4, it warns when using the shared ID. Google may throttle or revoke shared IDs under heavy usage. Creating your own is free and recommended for production backups.
Creating your own Client ID takes about 5 minutes:
- Go to Google Cloud Console
- Create a project (or use an existing one)
- Enable the Google Drive API
- Go to APIs & Services → Credentials
- Create OAuth 2.0 Client ID (Desktop application)
- Copy the client_id and client_secret
- Enter them during
rclone configinstead of pressing Enter for defaults
Verify and configure CloudPanel
Run the same verification test as the OneDrive section:
touch /tmp/test-file
rclone copy /tmp/test-file remote:dragos-cloudpanel-backups/
Confirm the file appears in Google Drive, then delete it. After that, configure CloudPanel the same way: Admin Area → Backups → Custom Rclone Config. Set frequency, time, retention, and storage directory.
How to restore CloudPanel backups from OneDrive or Google Drive
No one-click restore
CloudPanel does not have one-click restore from remote backups. It’s been a feature request since the early days. Restoring is a manual process.
Restoring files (small restores under 2 GB)
- Download
backup.tarfrom OneDrive or Google Drive - Upload it to the site’s
tmpfolder using CloudPanel File Manager - Right-click the file → Extract
- Copy the files to the correct locations
Restoring large backups via SFTP and SSH
For backups over 2 GB, the File Manager may time out. Use SFTP instead:
- Upload
backup.tarvia SFTP to the site user’s~/tmp/directory - SSH as the site user
- Extract:
tar xf ~/tmp/backup.tar
- Move files to the correct directories
Restoring databases via CLI
The backup archive contains SQL dumps of your databases. To restore a database:
clpctl db:restore --databaseName=your_database --filePath=/path/to/dump.sql
Test before touching production
Always test restores on a staging environment first. The database must already exist. Create it in the CloudPanel UI if you’re restoring to a fresh server.
Customizing the CloudPanel backup schedule
CloudPanel stores its backup schedule in /etc/cron.d/clp. The default looks like this:
15 3 * * * clp /usr/bin/bash -c "/usr/bin/clpctl db:backup --ignoreDatabases='db1,db2' --retentionPeriod=7" &> /dev/null
15 4 * * * clp /home/clp/scripts/create_backup.sh &> /dev/null
Here’s what each line does:
- Line 1 runs database backups at 3:15 AM with a 7-day retention period. The
--ignoreDatabasesflag lets you exclude specific databases (replacedb1,db2with real names or remove the flag). - Line 2 runs the full remote backup (files + databases) at 4:15 AM. This is the one that uploads to OneDrive/Google Drive via Rclone.
Frequency vs cron
The cron runs daily, but CloudPanel checks the Frequency setting in the UI to decide whether to actually execute the backup on a given day. If you set Frequency to “Weekly” in the UI, the cron still runs daily, but only performs the backup once per week.
You can change the times to fit your schedule. Just keep the database backup before the full backup (line 1 earlier than line 2) so database dumps are fresh.
Troubleshooting CloudPanel remote backups
Fixing token expiry (OneDrive 90-day limit)
OneDrive refresh tokens expire after 90 days of inactivity. If backups run at least once every 90 days, the token auto-refreshes and you’ll never notice. But if backups stop running (disabled, server down, frequency too low), the token expires and uploads silently fail.
Fix: Re-authenticate Rclone:
rclone config reconnect remote:This opens the browser via SSH tunnel (you’ll need the tunnel open again). After re-authenticating, test with:
rclone lsd remote:dragos-cloudpanel-backups/If it lists the directory, you’re good.
Prevention: Set a calendar reminder every 60 days, or monitor backup logs for auth errors.
'Remote not found' error
CloudPanel expects the Rclone remote to be named exactly remote (lowercase). If you named it something else during config, it won’t work.
Check what you have:
rclone listremotesIf it shows anything other than remote:, rename it:
rclone configThen use the r) Rename remote option.
Backup folder not found
The target folder must exist in OneDrive/Google Drive before you configure CloudPanel. If you see errors about missing paths:
- Go to your cloud provider and create the folder manually
- Verify Rclone can see it:
rclone lsd remote:- Re-run the backup from CloudPanel
Permission errors on OneDrive Personal
OneDrive Personal has some API limitations compared to Business:
rclone cleanupdoesn’t work (no version deletion)- Hard delete is not supported
- Description field no longer supported (since Rclone v1.73.0)
These don’t break backups. They just limit some management operations. Backups and restores work fine.
SSH tunnel issues on Windows
If the SSH tunnel doesn’t work from Windows Command Prompt or PowerShell:
- Use WSL (Windows Subsystem for Linux). The
ssh -Lcommand works identically - Use PuTTY: go to Connection → SSH → Tunnels, set Source port to
53682, Destination tolocalhost:53682, click Add, then connect - If port 53682 is blocked by a local firewall, temporarily allow it during setup. It’s only needed for the initial
rclone configauthentication
Final thoughts
Remote backups are not optional for self-hosting. The Custom Rclone Config path described here works reliably for both OneDrive and personal Google Drive. It’s not a hack. It’s the official approach when the native UI options don’t cover your provider.
A few things to keep in mind:
- Test your restores. A backup you’ve never restored from is not a backup. It’s a hope. Download the archive, extract it, confirm the files are intact and the database imports cleanly.
- Watch OneDrive token expiry. It’s the number one silent failure mode. Backups appear to run but nothing uploads.
- Keep CloudPanel updated. Backup features have improved since v2.4.0 (database-first backup, vhost inclusion). Security fixes matter too. Several privilege escalation CVEs were patched in v2.5.0.
Beyond backups, you should also secure your CloudPanel server and secure your VPS. If you’re running WordPress, optimize WordPress performance with CloudPanel for faster page loads. And if you need a backup strategy for self-hosted platforms beyond CloudPanel, that guide covers Cloudflare R2 with Dokploy.
If you’re looking for an affordable VPS to host CloudPanel, Hetzner Cloud offers reliable European servers starting at around €4.50/month. For budget-friendly alternatives, Hostinger VPS provides KVM-based VPS with NVMe storage.


