How to setup a simple sftp service
The following How To will allow you to create a working SFTP service in your VPSA, using a stock non Zadara sftp Image with very few configuration requirements.
We recommend you use a completely separate volume for this function to give security.
Please note this document is intended as a brief overview to get you started with ZCS and a sample SFTP setup.
a) VPSA with ZCS app-engine(s) enabled and a volume created for SFTP purposes.
b) Internet access to Docker Hub, we will be using the writl/sftp image -
Please Note: This ZCS How To uses an external non Zadara Docker Image, the Image requires no alterations for use in the VPSA.
1) Enable Container Service : in your VPSA visit System->Settings->Container Service[Tab] and create the Image Repository on one Pool.
2) Image Creation: from the VPSA, Container Service->Images and click Create -
Enter a unique name for the image, eg: MySFTP, then click on the option to Pull from a Docker Registry and click Next
on the Next screen click the Search Docker Hub Public Registry option and in the Repository box start typing "writl/sftp" - select the image with this Name (as shown),then for the Select Tag choose latest and click the Create button. Confirm the Image Creation with OK and wait for completion.
This creates our base ZCS image from which we can go on to create the container itself.
3) Create a ZCS instance: From the VPSA menu list choose Container Service-> Containers option then click Create
Now provide details for the Image Creation -
First provide a name for the container eg: sftp-01 , then select the Image name (ie: the one we just created).
We Add a Volume from VPSA and allocate the Path on container as /data/incoming - then click Add
Part 2 -
Add the container port we will use to access the internal SFTP port 22.
Then add a user account and password by setting the USER and PASS environment variables
Finally, we enable the ZCS to start on create and click on the Create button.
Confirm the Container creation.
If all goes well you will end up with a Running ZCS sftp instance.
Test your new SFTP service
From a suitable client system use an SFTP application to test your SFTP service
Note: Ensure you use the ZCS port number rather than the default SFTP port 22 in our example we used 9222.