hugo/content/en/hosting-and-deployment/deployment-with-rclone.md
Bjørn Erik Pedersen ec920363cd Squashed 'docs/' changes from 63386081c..4c5edacfe
4c5edacfe cSpell config update (#1700)
9df788b25 Fix broken link (hugo modules) (#1710)
9928a70d6 Fix workspace formatting (#1707)
55467e7c8 Update partials.md
9f4bd0023 Update formats.md
9b3913c86 Remove footnoteAnchorPrefix and footnoteReturnLinkContents (#1704)
94502a09b Code block render hooks are introduced in v0.93.0 (#1701)
c447270ef Update sitemap-template.md
78665c1e0 Update sitemap-template.md
60653c17d Update the caddy error docs link (#1696)
9a3675aad Update sitemap templates (#1699)
e0d08cdbb Add wpxr-to-static to list of migration tools (#1512)
b53eb5a08 Add page for deploying with rclone (#1511)
4207c57ff netlify: Hugo 0.96.0
a18d646ea docs: Regen docshelper
e3e0981ed docs: Regen CLI docs
fda988d01 Merge commit 'd276e901b36d2576ef8350ed96b17f66254eac1b'
e4a26dbca tpl/crypto: Add optional encoding arg to hmac function

git-subtree-dir: docs
git-subtree-split: 4c5edacfeebd13eb7f876723c065466cd50e0cae
2022-04-08 13:32:01 +02:00

2 KiB

title linktitle description date publishdate lastmod categories keywords authors menu weight sections_weight draft aliases toc notesforauthors
Deployment with Rclone Deployment with Rclone If you have access to your web host with SFTP/FTP/SSH/HTTP(DAV), you can use rclone to incrementally deploy your entire Hugo website. 2021-08-09 2021-08-09 2021-08-09
hosting and deployment
rclone
sftp
deployment
Daniel F. Dickinson
docs
parent weight
hosting-and-deployment 80
80 80 false
/tutorials/deployment-with-rclone/
true

Assumptions

  • A web host running a web server. This could be a shared hosting environment or a VPS.
  • Access to your web host with any of the protocols supported by rclone, such as SFTP.
  • A functional static website built with Hugo
  • Deploying from an Rclone compatible operating system
  • You have installed Rclone.

NB: You can remove --interactive in the commands below once you are comfortable with rclone, if you wish. Also, --gc and --minify are optional in the hugo commands below.

Getting Started

The spoiler is that you can even deploy your entire website from any compatible OS with no configuration. Using SFTP for example:

hugo --gc --minify
rclone sync --interactive --sftp-host sftp.example.com --sftp-user www-data --sftp-ask-password public/ :sftp:www/

Configure Rclone for Even Easier Usage

The easiest way is simply to run rclone config.

The Rclone docs provide an example of configuring Rclone to use SFTP.

For the next commands, we will assume you configured a remote you named hugo-www

The above 'spoiler' commands could become:

hugo --gc --minify
rclone sync --interactive public/ hugo-www:www/

After you issue the above commands (and respond to any prompts), check your website and you will see that it is deployed.