This is a collection of scripts and configuration files that I use to manage my homelab infrastructure.
(VPN power by tailsacle :)
To start a new server, I use the following steps:
- install docker
curl https://get.docker.com | sh
- clone this repo
git clone https://github.com/minpeter/homelab_infra.git
- config .env
web interface passwod change
echo "WEBPASSWORD=<password>" > pihole/.env
set traefik basic auth username and password
echo "<username>:<htpassword>" >> secrets/usersfile.secret
- cloudflare settings
A record: *.domain.com -> <server_ip>
A record: domain.com -> <server_ip>
SSL -> Full (strict)
API token ๋ฐ๊ธ
๊ทธ๋ฆฌ๊ณ secrets/cf-dns-api-token.secret ํ์ผ์ ํ ํฐ์ ๋ฃ๋๋ค.
- server start up
docker-compose up -d
https://dockge.domain.com๋ก ์ ์ํด์ ํ์ํ ์๋น์ค๋ฅผ ์์์ํจ๋ค.
-
add [service].toml to external folder
-
add [service].toml to
[http.routers]
[http.routers.[service]]
rule = "Host(`[service].minpeter.tech`)"
service = "[service]-ext-srv"
[http.routers.[service].tls]
[[http.services.[service]-ext-srv.loadBalancer.servers]]
url = "http://[service]:[port]"
// If the service is running on the same server, connect to host.docker.internal:[port]
-
add [service].toml to external folder
-
add [service].toml to
[tcp.routers]
[tcp.routers.[service]]
rule = "HostSNI(`[service].minpeter.tech`)"
service = "[service]-ext-srv"
[tcp.routers.[service].tls]
[[tcp.services.[service]-ext-srv.loadBalancer.servers]]
address = "[service]:[port]"
- disable proxy for the service domain in cloudflare DNS
// If the service is running on the same server, connect to host.docker.internal:[port]