Surfer is a simple static file server.
The web interface is available under the
There are 4 ways to manage files in surfer:
Files and folders can be uploaded via the web interface located at
The Surfer cli tool can be installed using npm.
npm -g install cloudron-surfer
Login using an API access token created in the surfer admin interface:
surfer config --server <this app's domain> --token
Put some files:
surfer put index.html favicon.ico /
Put a directory (the
/. below meand that the contents of
build dir get copied into the root of surfer.
Without it, a
build directory will get created in the root of surfer).
surfer put build/. /
To get help:
$ surfer Usage: surfer [options] [command] Options: -V, --version output the version number -h, --help display help for command Commands: login Set default server logout Unset default server config|configure [options] Configure default server put [options] <file|dir...> Uploads a list of files or dirs to the destination. The last argument is destination dir get [options] [file|dir] Get a file or directory listing del [options] <file> Delete a file or directory help [command] display help for command
WebDAV is a well supported extension of the Hypertext Transfer Protocol that allows clients to perform remote Web content authoring operations. WebDAV shares can be mounted usually with your local file manager.
The URI schemes differ on the common platforms:
For WebDAV authentication, create an access token for a user, using the surfer admin UI, and use the access token as the password.
On Linux the Davfs2 library can also be used to locally mount a share:
mount -t davfs https://[appdomain]/_webdav/ /mount/point
SFTP access for non-admin users can be granted using the access control UI.
By default, any
index.htm file is served up. This file name can be changed in the
If Public Folder Listing is enabled, the directory contents is listed, provided the directory has no index page.
404.html is present in the root directory, it will be served up for missing pages.
Access to the site can be controlled from the
Settings page. There are 3 options:
- Public (everyone) - anyone can view the site
- Password restricted - anyone with a password can view the site
- User restricted - only users with a Cloudron login can view the site
You can setup your CI/CD to automatically push static files to surfer using the CLI as follows:
First, create an
Access Tokenin surfer from the
Install the surfer cli tool as part of the CI/CD pipeline.
Push the artifacts (
dist/in the example below):
surfer put --token api-7e6d90ff-5825-4ebe-a85b-a68795055955 --server surfer.cloudron.ml dist/. /