ferron
A fast, modern, and easily configurable web server with automatic TLS.
10K+
Ferron - a fast, modern, and easily configurable web server with automatic TLS
For more information, read the Ferron documentation.
To download the latest Ferron image from Docker Hub, run the following command:
docker pull ferronserver/ferron:2
Once the image is downloaded, start a Ferron container using the command below:
docker run --name myferron -d -p 80:80 --restart=always ferronserver/ferron:2
This command does the following:
--name myferron - assigns a name (myferron) to the running container.-d - runs the container in detached mode (as a background process).-p 80:80 - maps port 80 of the container to port 80 on the host machine.--restart=always - ensures the container automatically restarts if it stops or if the system reboots.Ferron on Docker has following file structure:
If you’re using Docker Compose, you can define a service for Ferron in your docker-compose.yml file:
services:
ferron:
image: ferronserver/ferron:2
ports:
- "80:80"
restart: always
Then, you can start Ferron using:
docker-compose up -d
If using Ferron with Docker Compose and automatic TLS, you can use the following docker-compose.yml file contents:
services:
# Ferron container
ferron:
image: ferronserver/ferron:2
ports:
- "80:80"
- "443:443"
volumes:
- "./ferron.kdl:/etc/ferron.kdl" # Ferron configuration file
- "ferron-acme:/var/cache/ferron-acme" # This volume is needed for persistent automatic TLS cache, otherwise the web server will obtain a new certificate on each restart
restart: always
volumes:
ferron-acme:
You might also configure Ferron in a “ferron.kdl” file like this:
// Replace "example.com" with your website's domain name
example.com {
root "/var/www/ferron"
}
Then, you can start Ferron using:
docker-compose up -d
Ferron provides the following tags for the Ferron image (for Ferron 2):
2 - Based on Distroless, statically-linked binaries2-alpine - Based on Alpine Linux, statically-linked binaries2-debian - Based on Debian GNU/Linux, dynamically-linked binaries (GNU libc required)// Example configuration with static file serving. Replace "example.com" with your domain name.
example.com {
root "/var/www/html" // Replace "/var/www/html" with the directory containing your static files
}
// Example configuration with reverse proxy. Replace "example.com" with your domain name.
example.com {
proxy "http://localhost:3000/" // Replace "http://localhost:3000" with the backend server URL
}
You can find more configuration examples for common use cases in the Ferron documentation.
You can check the Ferron documentation to see configuration properties used by Ferron.
Ferron is licensed under the MIT License. See LICENSE in GitHub repository for details.
Content type
Image
Digest
sha256:f5e91759f…
Size
17.6 MB
Last updated
3 minutes ago
docker pull ferronserver/ferron:3