STFP Databases can be provisioned in the following ways:Documentation Index
Fetch the complete documentation index at: https://www.aptible.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
- In the Dashboard > Environment > Databases > “New Database” > SFTP
- Using the
aptible db:createcommand- For example:
aptible db:create "$DB_HANDLE" --type sftp
- For example:
- Using the Aptible Terraform Provider
Usage
The service is designed to run with an initial, password-protected admin user. The credentials for this user can be viewed in the Database Credentials section of the database page. Additional users can be provisioned anytime by calling add-sftp-user with a username and SSH public key.Connecting and Adding Users
- Run a db:tunnel in one terminal window:
aptible db:tunnel $DB_HANDLE - This will give output of a URL containing the host/password/port
- In another terminal window:
ssh -p PORT aptible@localhost.aptible.in(where PORT is copied from the port provided in the previous step) - Use the password provided in the previous step
- Once in the shell, you can use the
add-sftp-userutility to add additional users to the SFTP instance. Please note that additional users added with this utility must use ssh key authentication, and the public key is provided as an argument to the command.
SSH_PUBLIC_KEY would be the ssh public key for the user. To provide a fictional public key (truncated for readability) as an example:

