Skip to content

About

Reverse-proxy for all your self-hosted needs

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

40 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-traefik

Docker container for running Traefik reverse-proxy using Cloudflare as DNS

The example user is test//test.

Create hashed passwords using bcrypt with htpasswd -bnBC 15 "" <PASSWORD> | tr -d ':\n' (note the leading space to avoid it showing up in shell history, requires apache2-utils).

Add to usersfile as user:<hash>.

DNS Setup

  1. Create an A record for your domain name
  2. Create another A record with the name "*" that's pointing to the same IP as the record above (suggestion: use ddclient to keep DNS records up to date)

Docker Setup

Traefik

  1. Add your user to usersfile (don't forget to remove the example user!)
  2. Input your domain name in .env
  3. Input your Cloudflare API email in secrets/CF_API_EMAIL.secret
  4. Go to the Cloudflare dashboard to create an API token.
  5. Create a Custom token and select the following permissions:
    • Zone->DNS - Edit
    • Zone->Zone - Read
  6. Input your Cloudflare API token in secrets/CF_DNS_API_TOKEN.secret
  7. Ensure that cert/acme.json has 600 permissions
  8. Create proxy network for communication with other applications, docker network create traefik
  9. Run docker-compose up and check logs

Crowdsec

  1. Generate a bouncer API key by running: docker compose exec crowdsec cscli bouncers add traefik-bouncer
  2. Copy the generated key and put it under LAPI_KEY in .env
  3. Restart the traefik container to have it load the new env var: docker compose up -d --force-recreate traefik

About

Reverse-proxy for all your self-hosted needs

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages