The FTP server supports the following modes * FTP * FTPS * FTPS Implicit * FTPS TLS
10K+
This repository contains a Docker configuration to set up an FTP server using the Alpine Linux base image. The FTP server supports the following modes
Before you begin, ensure you have the following installed:
Clone the Repository:
Clone this repository to your local machine:
git clone https://github.com/haravich/custom-ftp-server.git
cd custom-ftp-server
Customize Configuration:
Configure FTP Server:
vsftpd-<FTP_MODE>.conf file to customize the FTP server configuration. You can adjust settings such as user accounts, directory permissions, passive ports range, and security options.Default:
vsftpd.conf is enabled with required configuration for specific modes.Generate SSL Certificate:
Generate an SSL certificate and private key for FTPS if you plan to use secure connections. We do apply a default certficate is the environment variable SSL_SUBJECT not provided.
SSL_SUBJECT="/C=IN/O=haravich/CN=freeops.dev"
Build and Run:
Build the Docker image and run the container:
docker build -t custom-ftp-server .
docker run -d -p 2222:22 -p 20-22:20-22 -p 21100-21110:21100-21110 -p 990:990 haravich/custom-ftp-server
(or)
docker run -d -p 2222:22 -e FTP_MODE=ftps -e -p 20-22:20-22 -p 21100-21110:21100-21110 -p 990:990 haravich/custom-ftp-server
(or)
docker run -d -p 2222:22 -e FTP_MODE=ftps -e SSL_SUBJECT="/C=IN/O=haravich/CN=freeops.dev" -p 20-22:20-22 -p 21100-21110:21100-21110 -p 990:990 haravich/custom-ftp-server
| Variable | Default Value | Available Options |
|---|---|---|
| FTP_USER | ftpuser | (string) name |
| FTP_PASSWORD | admin | (string) password |
| PASV_ENABLE | YES | (bool) YES/NO |
| PASV_ADDRESS | - | (Valid IP Address) x.x.x.x |
| PASV_ADDRESS_INTERFACE | eth0 | (Vlaid ETH interface) xth1 |
| PASV_ADDR_RESOLVE | YES | (bool) YES/NO |
| PASV_MIN_PORT | 21100 | (Port) Any valid port |
| PASV_MAX_PORT | 21110 | (Port) Any valid port |
| FTP_MODE | ftp | (string) ftp/ftps/ftps_implicit/ftps_tls |
| LOG_STDOUT | YES | (bool) YES/NO |
| SSL_SUBJECT | - | (string) /C=IN/O=haravich/CN=freeops.dev |
Connect to the FTP server using an FTP client. Use the ftpuser username and the password. For secure FTPS connections, connect to port 21 and choose "FTP with TLS/SSL" or "FTPES" as the protocol.
ftp -p 22 <ftp_user>@localhost
Replace <ftp_user> with appropriate values.
This project is licensed under the MIT License. See the LICENSE.md file for details.
Copy and paste this Markdown content into a file named README.md in the root of your repository. Feel free to adjust the formatting and content as needed for your project.
The core config files is created and maintained by Logan HAUSPIE. The source code can be found in Github.
The original LICENSE can be found in lhauspie/docker-vsftpd-alpine
Content type
Image
Digest
sha256:89b4a0943…
Size
7.5 MB
Last updated
5 days ago
docker pull haravich/custom-ftp-server