Publishing with SFTP

If you don’t want to use GitHub pages, you can alternatively publish to any webserver via SFTP.

To do so, you must install Rclone.

For example, on Fedora:

[bash]: Run this on your workstation:
## On Fedora atomic, make sure to do this in a toolbox container:
sudo dnf install rclone

Once installed, you need to configure the remote SFTP server you want to publish to:

[bash]: Run this on your workstation:
rclone config

Follow the prompts to setup your SFTP remote, or you can see the example SFTP documentation for doing this. You must set all of the following details:

  • The unique name of the remote (eg. book)
  • The hostname of the SFTP server (eg. sftp.example.com)
  • The SFTP username, password, or SSH key, and whether to use the SSH agent (recommended!)

The connection details are saved in your clone config file (eg. ~/.config/rclone/rclone.conf)

The included Makefile has a variable at the top called PUBLISH_RCLONE_REMOTE (default book). Make sure this is the same as the name of the rclone remote you configured (edit the Makefile if it is not).

Once everything is configured, simply run make publish to publish your site to the SFTP remote.

Your webserver document root needs to be configured to use the same path that the SFTP server is configured for.

If you don’t have a webserver or SFTP server, you can use the following from d.rymcg.tech: