Sign inSign up

humbertovvaronafong/tiny-webserver

By humbertovvaronafong

•Updated over 1 year ago

Tiny WebServer Docker Image

Image
Networking
Web servers
0

293

humbertovvaronafong/tiny-webserver repository overview

⁠Tiny WebServer Docker Image

This Docker image provides a compact and efficient web server designed for simple deployments, custom configurations, and optional HTTPS support. It offers out-of-the-box features such as automatic certificate generation, time zone configuration, and HTTP to HTTPS redirection—all managed via environment variables for maximum flexibility.

⁠🐳 How to Run

You can run the container in three different modes:

⁠1. HTTP Mode (No HTTPS)
docker run -d --name testtinywebserver \
  -e TIMEZONE=America/Havana \
  -p 8080:80 \
  -v $(pwd)/config:/config \
  humbertovvaronafong/tiny-webserver
⁠2. HTTPS Mode with Automatic Certificates (Let's Encrypt)
docker run -d --name testtinywebserver \
  -e TIMEZONE=America/Havana \
  -e REDIRECT_TO_HTTPS=yes \
  -e AUTOCERT=yes \
  -p 8443:443 \
  -v $(pwd)/config:/config \
  humbertovvaronafong/tiny-webserver
⁠3. HTTPS Mode with Manual Certificates
docker run -d --name testtinywebserver \
  -e TIMEZONE=America/Havana \
  -e REDIRECT_TO_HTTPS=yes \
  -e AUTOCERT=no \
  -p 8443:443 \
  -v $(pwd)/config:/config \
  humbertovvaronafong/tiny-webserver
⁠4. Docker Compose Example

You can also use Docker Compose to manage the container:

version: '3.8'
services:
  tinywebserver:
    image: humbertovvaronafong/tiny-webserver
    container_name: testtinywebserver
    ports:
      - "8080:80"
      - "8443:443"
    environment:
      - TIMEZONE=America/Havana
      - REDIRECT_TO_HTTPS=yes
      - AUTOCERT=yes
    volumes:
      - ./config:/config
    restart: unless-stopped

Start the service:

docker-compose up -d

⁠🌐 Accessing the Web Server

Use your browser to access the server:

⁠HTTP Mode
http://192.168.1.4:8080/
⁠HTTPS Mode
https://192.168.1.4:8443/

⁠🩺 Health Check

To inspect the container's health status:

docker inspect --format='{{json .State.Health}}' testtinywebserver | jq

⁠📄 Logs

To view the logs from the container:

docker logs testtinywebserver

⁠⚙️ Environment Variables

VariableDescriptionDefault Value
TIMEZONESets the system timezone inside the container.UTC
NGINX_WORKER_PROCESSESDefines the number of worker processes for NGINX.auto
REDIRECT_TO_HTTPSEnables HTTP to HTTPS redirection (yes or no).no
AUTOCERTEnables automatic HTTPS certificates via Let's Encrypt (yes or no).no
CERT_WARN_DAYSDays before certificate expiration to trigger a renewal or warning.30

⁠🔗 Repositories


⁠👤 Author

Humberto Vinlay Varona-Fong 📧 [email protected]⁠


⁠🪪 License

This project is licensed under the Creative Commons Zero (CC0) license. You are free to use, modify, and distribute without restriction.

⁠How to cite

Varona-Fong, H. V. (2025). Tiny WebServer Docker Image (1.0). Zenodo. https://doi.org/10.5281/zenodo.15399437

Tag summary

Content type

Image

Digest

sha256:15e3c1566…

Size

31.1 MB

Last updated

over 1 year ago

docker pull humbertovvaronafong/tiny-webserver