Portainer Templates logo

Portainer Templates

vsftpd FTP Server vsftpd FTP Server

Container

Network OtherUtilities

Secure, fast FTP server for UNIX-like systems

Image details

Pulls: 5.2M
Architecture: amd64, arm/v7, arm/v6, arm64/v8
Image size: 4 MB
User: delfer
Created: Jun 16, 2018
Updated: 1 years ago
Status: active

Configuration

Type
Container
Image
delfer/alpine-ftp-server
Ports
21/tcp21000/tcp21001/tcp21002/tcp21003/tcp21004/tcp21005/tcp21006/tcp21007/tcp21008/tcp21009/tcp21010/tcp
Volumes
/home/depot/tvshows : /media/storage/tvshows/home/depot/movies : /media/storage/movies/home/depot/music : /media/storage/music/home/depot/ebooks : /media/storage/ebooks/home/depot/photos : /media/storage/photos/home/depot/documents : /media/storage/documents/home/depot/downloads : /media/storage/downloads/home/depot/software : /media/storage/software/home/depot/blackhole : /media/temp/blackhole/home/depot/processing : /media/temp/processing
Env vars
ADDRESS=''USERS=depot|badpass|/home/depot|15000

Template by mediadepot

Standalone Install

Select an install method, to see config/commands for deploying vsftpd FTP Server

Installation method

Install on Portainer

Import all app templates into your Portainer instance, for easy 1-click deploys

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. Select vsftpd FTP Server, fill in any config options, and hit Deploy

Template Import URL

https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me demo

More install options in our documentation.

docker-alpine-ftp-server

Docker Stars Docker Pulls Docker Automated build Docker Build Status MicroBadger Layers MicroBadger Size
Small and flexible docker image with vsftpd server

Usage

docker run -d \
    -p 21:21 \
    -p 21000-21010:21000-21010 \
    -e USERS="one|1234" \
    -e ADDRESS=ftp.site.domain \
    delfer/alpine-ftp-server

Configuration

Environment variables:
  • USERS - space and | separated list (optional, default: alpineftp|alpineftp)
- format name1|password1|[folder1][|uid1] name2|password2|[folder2][|uid2]
  • ADDRESS - external address witch clients can connect passive ports (optional, should resolve to ftp server ip address)
  • MIN_PORT - minimum port number to be used for passive connections (optional, default 21000)
  • MAX_PORT - maximum port number to be used for passive connections (optional, default 21010)

USERS examples

  • user|password foo|bar|/home/foo
  • user|password|/home/user/dir|10000
  • user|password||10000

FTPS (File Transfer Protocol + SSL) Example

Issue free Let's Encrypt certificate and use it with alpine-ftp-server.
mkdir -p /etc/letsencrypt
docker run -it --rm \
    -p 80:80 \
    -v "/etc/letsencrypt:/etc/letsencrypt" \
    certbot/certbot certonly \
    --standalone \
    --preferred-challenges http \
    -n --agree-tos \
    --email i@delfer.ru 
    -d ftp.site.domain
docker run -d \
    --name ftp \
    -p 21:21 \
    -p 21000-21010:21000-21010 \
    -e USERS="one|1234" \
    -e ADDRESS=ftp.site.domain \
    -e TLS_CERT="/etc/letsencrypt/live/vds2291318.my-ihor.ru/fullchain.pem" \
    -e TLS_KEY="/etc/letsencrypt/live/vds2291318.my-ihor.ru/privkey.pem" \
    delfer/alpine-ftp-server

  • Do not forget to replace ftp.site.domain with actual domain pointing to your server's IP.
  • Be shure you have avalible port 80 for standalone mode of certbot to issue certificate.
  • Do not forget to renew certificate in 3 month with certbot renew command.

Serve vsftpd FTP Server on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.

Proxying vsftpd-ftp-server.example.com to http://localhost:21

Add this to your Caddyfile

vsftpd-ftp-server.example.com {
	reverse_proxy http://localhost:21
}

Check the logs first

Nine times out of ten the logs tell you exactly what went wrong.

  • In Portainer, go to Containers, click the container, then Logs. Or run docker logs vsftpd
  • Exit codes help too: 137 means killed, usually out of memory. 126 or 127 means the command inside the image is broken.

Runs on the host network

This container shares your server's network directly, so port mappings are ignored and every port the app opens binds straight to the host.

  • If a port won't bind, find the clash with sudo ss -tlnp and stop the other service, or change the port in vsftpd's own settings.

Permission denied on volumes

If the logs show "permission denied", the app can't write to its data folder on the host.

  • Fix the ownership: sudo chown -R 1000:1000 /media/storage/tvshows (and the same for the other mapped folders)

Image won't pull

Test the pull directly on the host: docker pull delfer/alpine-ftp-server

  • "manifest unknown" means the tag no longer exists. This template uses latest, so try pinning a specific version instead.
  • "toomanyrequests" is the Docker Hub rate limit. Log in with docker login to raise it.
  • "no space left on device" means a full disk. Reclaim space with docker system prune

"exec format error"

This means the image was built for a different CPU architecture than your server.

  • This image supports: amd64, arm/v7, arm/v6, arm64/v8
  • Check yours with uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.

Required settings are blank

ADDRESS has no default value, and vsftpd may crash or misbehave if left empty.

  • Fill it in on the deploy screen before hitting deploy.

Raise an issue

Found something which isn't working as it should? Here's how to report it.

A single container

vsftpd FTP Server runs as one container, the simplest kind of app here. Just the one image to pull and nothing else wired up alongside it.

The app image

An image is the app packed up ready to go, everything vsftpd FTP Server needs bundled into one download. This template pulls delfer/alpine-ftp-server, which Docker fetches once (about 4 MB) and then starts your own copy from.

Where the image comes from

Docker pulls its images from registries, public libraries of ready-built apps. vsftpd FTP Server's comes from Docker Hub, published by delfer.

Version tags

The bit after the colon in the image name is the version tag. Here it's latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Pin a specific tag if you would rather stay on one version.

Which machines it runs on

Every image is built for particular CPU types. This one ships for amd64, arm/v7, arm/v6, arm64/v8, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.

Ports

A port is the door the app answers on. Here the app exposes a port but leaves the host side blank, so Docker picks a free one for you. It opens:

  • 21, published on a random host port
  • 21000, published on a random host port
  • 21001, published on a random host port
  • 21002, published on a random host port
  • 21003, published on a random host port
  • 21004, published on a random host port
  • 21005, published on a random host port
  • 21006, published on a random host port
  • 21007, published on a random host port
  • 21008, published on a random host port
  • 21009, published on a random host port
  • 21010, published on a random host port

Volumes

A volume is where vsftpd FTP Server keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:

  • /home/depot/tvshows from /media/storage/tvshows on the host
  • /home/depot/movies from /media/storage/movies on the host
  • /home/depot/music from /media/storage/music on the host
  • /home/depot/ebooks from /media/storage/ebooks on the host
  • /home/depot/photos from /media/storage/photos on the host
  • /home/depot/documents from /media/storage/documents on the host
  • /home/depot/downloads from /media/storage/downloads on the host
  • /home/depot/software from /media/storage/software on the host
  • /home/depot/blackhole from /media/temp/blackhole on the host
  • /home/depot/processing from /media/temp/processing on the host

Environment variables

Environment variables are the settings you hand over when you deploy, things like a password or a timezone. vsftpd FTP Server takes 2 of them, and one needs a value before it'll start properly:

  • ADDRESS, needs a value
  • USERS, defaults to depot|badpass|/home/depot|15000

Networking

vsftpd FTP Server runs on the host network, so it shares your server's networking directly instead of getting a private one of its own. Its ports open straight on the server with no mapping in between.

Container name

Once it's deployed, Portainer names the container vsftpd. That's what you'll spot in the containers list and use in commands like docker logs vsftpd.

Portainer app templates

Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set vsftpd FTP Server up. Add the template list to Portainer once, then deploying vsftpd FTP Server is a click rather than a wall of config.