Skip to content

๐Ÿ“‹ rasspberry pi homelab infra using compose

Notifications You must be signed in to change notification settings

minpeter/homelab_infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

60 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

homelab_infra

This is a collection of scripts and configuration files that I use to manage my homelab infrastructure.

(VPN power by tailsacle :)

Starting a new server

To start a new server, I use the following steps:

  1. install docker
curl https://get.docker.com | sh
  1. clone this repo
git clone https://github.com/minpeter/homelab_infra.git
  1. config .env

web interface passwod change

echo "WEBPASSWORD=<password>" > pihole/.env

set traefik basic auth username and password

echo "<username>:<htpassword>" >> secrets/usersfile.secret
  1. cloudflare settings
A record: *.domain.com -> <server_ip>
A record: domain.com -> <server_ip>

SSL -> Full (strict)

API token ๋ฐœ๊ธ‰

image

๊ทธ๋ฆฌ๊ณ  secrets/cf-dns-api-token.secret ํŒŒ์ผ์— ํ† ํฐ์„ ๋„ฃ๋Š”๋‹ค.

  1. server start up
docker-compose up -d

https://dockge.domain.com๋กœ ์ ‘์†ํ•ด์„œ ํ•„์š”ํ•œ ์„œ๋น„์Šค๋ฅผ ์‹œ์ž‘์‹œํ‚จ๋‹ค.

Setting up HTTP services that are not inside HomeLab

  1. add [service].toml to external folder

  2. 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]

Setting up TCP services that are not inside HomeLab

  1. add [service].toml to external folder

  2. 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]"
  1. disable proxy for the service domain in cloudflare DNS

// If the service is running on the same server, connect to host.docker.internal:[port]

About

๐Ÿ“‹ rasspberry pi homelab infra using compose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published