ARMHF based Linuxserver.io image of letsencrypt nginx container
1M+
THIS IMAGE IS DEPRECATED. PLEASE USE THE MULTI-ARCH IMAGES AT linuxserver/letsencrypt
The LinuxServer.io team brings you another container release featuring easy user mapping and community support. Find us for support at:
#linuxserver.ioThis container sets up an Nginx webserver and reverse proxy with php support and a built-in letsencrypt client that automates free SSL server certificate generation and renewal processes. It also contains fail2ban for intrusion prevention.
docker create \
--cap-add=NET_ADMIN \
--name=letsencrypt \
-v <path to data>:/config \
-e PGID=<gid> -e PUID=<uid> \
-e EMAIL=<email> \
-e URL=<url> \
-e SUBDOMAINS=<subdomains> \
-e VALIDATION=<method> \
-p 80:80 -p 443:443 \
-e TZ=<timezone> \
lsioarmhf/letsencrypt
The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side. For example with a port -p external:internal - what this shows is the port mapping from internal to external of the container. So -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 http://192.168.x.x:8080 would show you what's running INSIDE the container on port 80.
-p 80 -p 443 - the port(s)-v /config - all the config files including the webroot reside here-e URL - the top url you have control over ("customdomain.com" if you own it, or "customsubdomain.ddnsprovider.com" if dynamic dns)-e SUBDOMAINS - subdomains you'd like the cert to cover (comma separated, no spaces) ie. www,ftp,cloud. For a wildcard cert, set this exactly to wildcard (wildcard cert is available via dns and duckdns validation only)-e VALIDATION - letsencrypt validation method to use, options are http, tls-sni, dns or duckdns (dns method also requires DNSPLUGIN variable set) (duckdns method requires DUCKDNSTOKEN variable set, and the SUBDOMAINS variable set to wildcard)-e PGID for GroupID - see below for explanation-e PUID for UserID - see below for explanation-e TZ - timezone ie. America/New_YorkOptional settings:
-e DNSPLUGIN - required if VALIDATION is set to dns. Options are cloudflare, cloudxns, digitalocean, dnsimple, dnsmadeeasy, google, luadns, nsone, ovh, rfc2136 and route53. Also need to enter the credentials into the corresponding ini file under /config/dns-conf-e DUCKDNSTOKEN - required if VALIDATION is set to duckdns. Retrieve your token from https://www.duckdns.org-e EMAIL - your e-mail address for cert registration and notifications-e DHLEVEL - dhparams bit value (default=2048, can be set to 1024 or 4096)-p 80 - Port 80 forwarding is required when VALIDATION is set to http, but not dns or tls-sni-e ONLY_SUBDOMAINS - if you wish to get certs only for certain subdomains, but not the main domain (main domain may be hosted on another machine and cannot be validated), set this to true-e EXTRA_DOMAINS - additional fully qualified domain names (comma separated, no spaces) ie. extradomain.com,subdomain.anotherdomain.org-e STAGING - set to true to retrieve certs in staging mode. Rate limits will be much higher, but the resulting cert will not pass the browser's security test. Only to be used for testing purposes.-e HTTPVAL - Deprecated, please use the VALIDATION parameter insteadImportant notice:
Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA. Please set the VALIDATION parameter to either http or dns and follow the above directions to revalidate.It is based on alpine linux with s6 overlay, for shell access whilst the container is running do docker exec -it letsencrypt /bin/bash.
Sometimes when using data volumes (-v flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user PUID and group PGID. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" ™.
In this instance PUID=1001 and PGID=1001. To find yours use id user as below:
$ id <dockeruser>
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
IMPORTANT... THIS IS THE ARMHF VERSION
http validation, port 80 on the internet side of the router should be forwarded to this container's port 80tls-sni validation, port 443 on the internet side of the router should be forwarded to this container's port 443dns validation, make sure to enter your credentials into the corresponding ini file under /config/dns-conf
duckdns validation, set the SUBDOMAINS variable to wildcard, and set the DUCKDNSTOKEN variable with your duckdns token. Due to a limitation of duckdns, the resulting cert will only cover the sub-subdomains (ie. *.yoursubdomain.duckdns.org) but will not cover yoursubdomain.duckdns.org. Therefore, it is recommended to use a sub-subdomain like www.yoursubdomain.duckdns.org for subfolders. You can use our duckdns image to update your IP on duckdns.org.--cap-add=NET_ADMIN is required for fail2ban to modify iptablesURL will be yoursubdomain.duckdns.org and the SUBDOMAINS can be www,ftp,cloud with http validation, or wildcard with dns validation.https://yourdomain.url to access the default homepagedocker exec -it letsencrypt htpasswd -c /config/nginx/.htpasswd <username>.htpasswd. For the first user, use the above command, for others, use the above command without the -c flag, as it will force deletion of the existing .htpasswd and creation of a new one/config/nginx/site-confs/default. Feel free to modify this file, and you can add other conf files to this directory. However, if you delete the default file, a new default will be created on container start._readme file under /config/nginx/proxy_confs for instructions on how to enable themadd_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
This will ask Google et al not to index and list your site. Be careful with this, as you will eventually be de-listed if you leave this line in on a site you wish to be present on search engines-v /path-to-le-config:/le-ssl) and in the other containers, use the cert location /le-ssl/keys/letsencrypt/etc/letsencrypt that resides under /config in other containers (ie. -v /path-to-le-config/etc/letsencrypt:/le-ssl) and in the other containers, use the cert location /le-ssl/live/<your.domain.url>/ (This is more secure because the first method shares the entire letsencrypt config folder with other containers, including the www files, whereas the second method only shares the ssl certs)cert.pem, chain.pem, fullchain.pem and privkey.pem, which are generated by letsencrypt and used by nginx and various other appsprivkey.pfx, a format supported by Microsoft and commonly used by dotnet apps such as Emby Server (no password)priv-fullchain-bundle.pem, a pem cert that bundles the private key and the fullchain, used by apps like ZNC/config/fail2ban/jail.local.conf files, create .local files with the same name and edit those because .conf files get overwritten when the actions and filters are updated. .local files will append whatever's in the .conf files (ie. nginx-http-auth.conf --> nginx-http-auth.local)docker exec -it letsencrypt fail2ban-client statusdocker exec -it letsencrypt fail2ban-client status <jail name>docker exec -it letsencrypt fail2ban-client set <jail name> unbanip <IP>Shell access whilst the container is running: docker exec -it letsencrypt /bin/bash
To monitor the logs of the container in realtime: docker logs -f letsencrypt
container version number
docker inspect -f '{{ index .Config.Labels "build_version" }}' letsencrypt
docker inspect -f '{{ index .Config.Labels "build_version" }}' lsioarmhf/letsencrypt
linuxserver/reverse-proxy-confs, update baseimage packages during buildVALIDATION parameter added for choosing letsencrypt validation methods, including dns through official plugins. HTTPVAL is deprecated. STAGING parameter added for testing. Backwards compatibility for the short term. Since tls-sni is disabled by letsencrypt, most users will have to change their settings and adopt the new parameters within the next 90 days. Reorganized the nginx default config, split ssl settings into new ssl.conf/config/fail2ban/action.d/iptables-common.local and restarting the container after updating the image--privileged is no longer required as long as --cap-add=NET_ADMIN is added, instructions modified accordingly, disabled fail2ban ipv6 actions due to requiring access to host kernel modulesContent type
Image
Digest
Size
64.3 MB
Last updated
over 7 years ago
docker pull lsioarmhf/letsencrypt