Skip to content

silv3rr/docker-glftpd

Repository files navigation

docker-glftpd (v3)

Docker

Dockerized glftpd for all

Optionally adds pzs-ng and included Web UI

GitHub container registry: docker-glftpd

Quick Start

Usage: docker run ghcr.io/silv3rr/docker-glftpd

Without changing anything, this gets a (temp) ftp up and running. Good for testing.

It uses these default settings:

  • listen port is 1337
  • ftp login: glftpd/glftpd, internal ip ranges allowed
  • no permanent config, udb or storage
  • does not include zs, bot or webui components

Test connection: ./test/login.sh (also shows bind ip ;p)

Change password for 'glftpd' user: GLFTPD_PASSWD="MyPassw0rd" ./docker-run.sh

Contents

so, i heard you like reading..

Customizing

To use permanent configuration, add zipscript, bot and webui components you can set variables before staring docker build/run scripts.

Example:

# run a 'full' permanent glftpd setup, with bot:
GLFTPD_PERM_UDB=1 GLFTPD_CONF=1 GLFTPD_SITE=1 \
IRC_SERVERS="irc.efnet.org:6667 irc2.example.org:6697" IRC_CHANNELS="#pzs #pzs-staff" \
USE_FULL=1 WEBUI=1 ./docker-run.sh

For details about an even more tailored setup (diferrent ip/port, gl ver etc), or changing the images, see docs/Customization.md. Also check this page for using sitebot and info about adding 3rd party scripts.

Images

To use prebuild images from github, just run: ./docker-run.sh.

Or, for the 'full' glftpd image: USE_FULL=1 ./docker-run.sh

Scripts

docker-run.sh

Main script that takes care of creating/changing config files and docker runtime args for you. Then it starts glftpd and web-gui container.

Uses environment variables to change settings. Put them in front of script, e.g. FORCE=1 GLFTPD_PASV_ADDR="1.2.3.4" ./docker-run.sh.

Example:

# change gl ports:
GLFTPD_CONF=1 GLFTPD_PORT="7113" GLFTPD_PASV_PORTS="8888-9999" ./docker-run.sh

# permanent glftpd.conf, udb and storage:
GLFTPD_CONF=1 GLFTPD_PERM_UDB=1 GLFTPD_SITE=1 ./docker-run.sh

# or, add your own docker args:
./docker-run.sh --network host --volume $(pwd)/site/mp3:/glftpd/site/mp3:rw --volume $(pwd)/site/xxx:/glftpd/site/xxx:rw

docker-build.sh

Wrapper script to (re)build images that can be used for local images besides the prebuild images from github registry.

Example:

# build with web interface, pzs-ng and bot:
INSTALL_WEBUI=1 INSTALL_ZS=1 INSTALL_BOT=1 ./docker-build.sh; ./docker-run.sh

To update glftpd when there's a new glftpd version out (come December), change GLFTPD_URL and GLFTPD_SHA in docker-build.sh and rerun script.

Compose

What about docker compose you ask? Sure, just run docker compose up --detach. Details: docs/Compose.md.

WebUI

A web interface can optionally be installed as a bonus. Can be used to manage glftpd and bot etc from the comfort of your browser.. it's quite the prize.

Start: docker run ghcr.io/silv3rr/docker-glftpd-web

Open url: https://your.ip:4444 and login: shit/EatSh1t (basic web auth).

For screenshots and more information see github.com/silv3rr/glftpd-webui

Files

See docs/Files.md for directory structure.

Issues

  • why would you use this? uhh i dunno, cuz ur too stupid to setup gl urself?! :P
  • why does the web interface suck? .. it was originally named SHIT...
  • will it run on windows/macos/k8s? no idea, probably.. try it. podman? probably not
  • hashgen doesnt work? try recompiling: gcc -o hashgen hashgen.c -lcrypto -lcrypt
  • the bot doesnt start? check owner/perms of sitebot files
  • why bind mounts? if you want volumes instead .. change type in docker-run.sh / docker-compose.yml
  • other than that, just rm -rf ./glftpd; docker rm -f glftpd to start over

Changes

See docs/Changelog.md