Hilscher Community Forum
[SOLVED] Use netPi as a FTP server - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html)
+--- Forum: Software (https://forum.hilscher.com/forum-5.html)
+--- Thread: [SOLVED] Use netPi as a FTP server (/thread-330.html)



[SOLVED] Use netPi as a FTP server - martech - October-18th-2018

Hello community,

I would like to execute the following task on the netPi:

I've currently a sensor which I can configure to use an ftp server, so that it could post sensor data to the defined ftp server.
Now I would like to configure the netPi as a FTP server, but I don't know how to do this via the web UI.

Furthermore, I would like to run a container providing a web interface visualizing the data on the internal FTP server.
Is there anyone who could help me with the ftp server installation and data access?

Thank you for your help.


RE: Use netPi as a FTP server - Armin@netPI - October-18th-2018

Well martech,

as you have recognized netPI is just a plattform where additional software can be added using Docker technology. By default netPI and its configuration web interface does not support any FTP server. You have to add it yourself.

This means that for your special demand ... as you describe it ... you have to develop your own software container, that contains an FTP server and ... an extra web server to visualize your data.

Since both software packages in combo you will not find preinstalled in any container available on the web I recommend you the following procedure how I would start:

I would load the Raspbian container to my netPI first from here. This is a good starter and gives you access to netPI via a remote terminal program like Putty over SSH. To make development much easier you should start the container in network mode Host, which exposes all containers Ethernet ports to the host. So postinstallations of FTP programs etc. will immediately take effect and can be reached from outside.

From there you can start your development as normal Linux developer.

Code:
sudo apt-get update

... will be propably the first command you use.

As next I would follow this post to install an FTP server into the container https://www.raspberrypi.org/documentation/remote-access/ftp.md


Code:
sudo apt-get install pure-ftpd
...

Please note down all your commands you entered during the whole installation ... this makes it easier for you to create a container build script for an automated build later. Then you can let create a container instead of a manual procedure like described automatically with a defined scope of software.

As next you have to install a web server. I use nginx normally as wb server. Also for nginx a raspberry web site helps here how to install it.


Code:
sudo apt-get install nginx
...


Please take into account that netPI occupies the HTTP/HTTPS ports 80 and 443. So before starting nginx you have to configure its ports right within its configuration file

/etc/nginx/sites-enabled/default

After that it is up to you to create your own HTML sites which relates to data from the FTP server.

Thx
Armin