Ployter

Volumes, files and SFTP

How to keep data that survives deploys, work with files from the browser and allow SFTP access.

A service's container is recreated on every deploy. Anything it writes outside a volume disappears on the next deploy. A volume is a folder stored on the server and mounted inside the container: database data, user uploads, the files of a site with no build.

Add a volume

  1. Open the service and go to the Volumes tab.
  2. Type a short name (e.g. uploads) and the Folder in the container (e.g. /app/public/uploads).
  3. Click Add.
  4. Run a deploy. The volume applies from the next deploy.

The table shows the folder in the container and the volume name on the server, in the format infra-<project>-<service>-<name> (e.g. infra-loja-web-uploads).

Volumes tab of the web service with a volume at /app/public/uploads
Volumes tab of the web service with a volume at /app/public/uploads

When you create a database in a container, a ready-made app or an HTML/PHP site, the panel creates the right volume for you (e.g. /var/lib/mysql for MySQL).

Warning

A service with a volume stops the old version before starting the new one. The deploy has a few seconds of downtime.

Remove a volume

Click Remove on the volume's row. The service stops mounting the folder on the next deploy. Removing it here does not delete the data on the server.

Volumes and replicas

A service with replicas doesn't use volumes: each server would have a different copy of the data. Store files in a bucket and data in a database. See Buckets and Managed cloud databases.

Manage files from the browser

The Files tab shows up when the service has at least one volume. It shows only the service's volumes, and each change takes effect immediately, with no deploy.

Note

A database in a container has no Files tab: changing the files of a running database corrupts the data.

What you can do:

  • Browse the folders. With more than one volume, the root lists each volume as a folder.
  • New file and New folder. Use / in the name to create subfolders.
  • Upload files and Upload folder, or drag files and folders onto the list.
  • Open a text file in the editor and save it. The editor opens UTF-8 files up to 2 MB.
  • In each item's menu: Edit, Open, Download, Rename, Copy to..., Move to... and Delete.
  • On a .zip, Extract here. An uploaded .zip stays as is until you extract it.

Files tab of the web service with the uploads folder open
Files tab of the web service with the uploads folder open

The list shows up to 2,000 items per folder. For larger folders, use the Terminal or SFTP.

Change history

Click History to see who created, uploaded, edited, moved or deleted each file, and who turned SFTP on or off or viewed its password.

SFTP access

SFTP opens the service's volumes to a client such as FileZilla, WinSCP or your editor. The server starts a container with SFTP, with the same volumes, on its own port (between 2201 and 2299). Uploaded files get the same owner as the application.

Turn on SFTP

  1. In the Files tab, click SFTP.
  2. Under Who can connect, keep Allowed IPs only and add your IP (the My IP button fills it in).
  3. Click Enable SFTP.

The modal then shows the address, the Server (host), the Port, the Username and the Show password button.

SFTP access modal turned on, with address, port and username
SFTP access modal turned on, with address, port and username

Connect with FileZilla

  1. Copy the full address, in the format sftp://user@host:port.
  2. In FileZilla, paste it into the Host field and enter the password. With sftp:// in front, it uses the SFTP protocol right away.
  3. Each volume shows as a folder at the root.

Change IPs, password or turn it off

  • Save IPs: applies the new list immediately. Anyone connected is dropped.
  • Generate new password: the current password stops working immediately.
  • Apply again: starts the SFTP container again, if it is stopped.
  • Disable: closes the port. The files stay on the volume.

Viewing the password is recorded in the Files tab history.

Warning

With Any IP, any address on the internet can try the password. Prefer allowing only the IPs you use.

Note

On an AWS or DigitalOcean server, the panel opens the port in the cloud firewall only for the allowed IPs. On your own server, the panel doesn't touch the firewall: open the SFTP port in the machine's or provider's firewall. With an up-to-date agent, SFTP itself also rejects IPs outside the list. See Use your own server.

Requirements

  • SFTP is a plan feature (sftp). See Subscription, plans and costs.
  • The service must have a volume and a server.
  • The server agent must be up to date. If it isn't, the modal shows the minimum version.
  • To delete the service, turn off SFTP first.

Permissions

The Files tab and SFTP require the Manage files permission. Volumes require Edit service configuration. See Teams, members and roles.