This commit is contained in:
zleyyij 2022-12-28 15:44:02 -07:00
parent ea81f18adc
commit 3e6484ebee
6 changed files with 180 additions and 20 deletions

29
.obsidian/core-plugins-migration.json vendored Normal file
View File

@ -0,0 +1,29 @@
{
"file-explorer": true,
"global-search": true,
"switcher": true,
"graph": true,
"backlink": true,
"outgoing-link": false,
"tag-pane": true,
"page-preview": true,
"daily-notes": false,
"templates": false,
"note-composer": true,
"command-palette": true,
"slash-command": false,
"editor-status": true,
"starred": false,
"markdown-importer": true,
"zk-prefixer": false,
"random-note": false,
"outline": false,
"word-count": true,
"slides": false,
"audio-recorder": false,
"workspaces": false,
"file-recovery": true,
"publish": false,
"sync": false,
"canvas": true
}

View File

@ -4,6 +4,7 @@
"switcher", "switcher",
"graph", "graph",
"backlink", "backlink",
"canvas",
"tag-pane", "tag-pane",
"page-preview", "page-preview",
"note-composer", "note-composer",

16
.obsidian/graph.json vendored
View File

@ -5,18 +5,18 @@
"showAttachments": false, "showAttachments": false,
"hideUnresolved": false, "hideUnresolved": false,
"showOrphans": true, "showOrphans": true,
"collapse-color-groups": true, "collapse-color-groups": false,
"colorGroups": [], "colorGroups": [],
"collapse-display": true, "collapse-display": false,
"showArrow": false, "showArrow": false,
"textFadeMultiplier": 0, "textFadeMultiplier": 0,
"nodeSizeMultiplier": 1, "nodeSizeMultiplier": 1,
"lineSizeMultiplier": 1, "lineSizeMultiplier": 1.52341666289951,
"collapse-forces": false, "collapse-forces": false,
"centerStrength": 0.518713248970312, "centerStrength": 0.33099769449844,
"repelStrength": 10, "repelStrength": 3.43745761945662,
"linkStrength": 1, "linkStrength": 0,
"linkDistance": 250, "linkDistance": 313,
"scale": 0.48669242494486276, "scale": 0.48669242494486326,
"close": false "close": false
} }

View File

@ -4,11 +4,11 @@
"type": "split", "type": "split",
"children": [ "children": [
{ {
"id": "a2ee6c287d93b1cf", "id": "659832c930a69b24",
"type": "tabs", "type": "tabs",
"children": [ "children": [
{ {
"id": "c47117a697f83aab", "id": "a1c05f2be34d0cb6",
"type": "leaf", "type": "leaf",
"state": { "state": {
"type": "markdown", "type": "markdown",
@ -18,8 +18,33 @@
"source": false "source": false
} }
} }
},
{
"id": "05303b21b207169d",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Ohm's Law.md",
"mode": "source",
"source": false
} }
] }
},
{
"id": "fcb065c9da91bb43",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Deploying pihole-docker to a brand new Debian instance.md",
"mode": "source",
"source": false
}
}
}
],
"currentTab": 2
} }
], ],
"direction": "vertical" "direction": "vertical"
@ -77,7 +102,7 @@
"state": { "state": {
"type": "backlink", "type": "backlink",
"state": { "state": {
"file": "Homelabbity.md", "file": "Deploying pihole-docker to a brand new Debian instance.md",
"collapseAll": false, "collapseAll": false,
"extraContext": false, "extraContext": false,
"sortOrder": "alphabetical", "sortOrder": "alphabetical",
@ -106,17 +131,26 @@
"width": 300, "width": 300,
"collapsed": true "collapsed": true
}, },
"active": "c47117a697f83aab", "left-ribbon": {
"hiddenItems": {
"switcher:Open quick switcher": false,
"graph:Open graph view": false,
"canvas:Create new canvas": false,
"command-palette:Open command palette": false,
"markdown-importer:Open format converter": false
}
},
"active": "fcb065c9da91bb43",
"lastOpenFiles": [ "lastOpenFiles": [
"Fixing a non booting linux install.md", "Ohm's Law.md",
"Setting up SSH keys.md",
"Installing Arch.md",
"Specify Server.md",
"Homelabbity.md",
"Writing a completely functional shell in Rust.md", "Writing a completely functional shell in Rust.md",
"Understanding how to handle paths for Ash.md",
"wlan0 disabled after restart or wake from hibernate.md", "wlan0 disabled after restart or wake from hibernate.md",
"unable to connect to wpa-enterprise via iwd.md", "unable to connect to wpa-enterprise via iwd.md",
"The basics of Git.md", "Fixing a non booting linux install.md",
"Setting up SSH keys.md", "Enabling fingerprint authentication on Zephyrus G15.md"
"Enabling fingerprint authentication on Zephyrus G15.md",
"Installing Arch.md",
"Fixing supergfxctl black screen on dedicated mode.md"
] ]
} }

View File

@ -0,0 +1,64 @@
#documentation #homelab
## Preperation
- The system was entirely updated with `sudo apt update` and `sudo apt upgrade`.
- `docker` and `docker-compose` were installed via `apt`
- It was noted that `docker.service` was not running, with an error similar to
```
Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.8.2 (nf_tables): CHAIN_ADD failed
```
- This was resolved by running the commands below as detailed [here](https://forums.docker.com/t/failing-to-start-dockerd-failed-to-create-nat-chain-docker/78269)
```
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
```
## Deployment
- A `docker-compose.yml` file was created with the contents:
```
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
- "80:80/tcp"
environment:
TZ: 'America/Chicago'
# WEBPASSWORD: 'set a secure password here or it will be random'
# Volumes store your data between container upgrades
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
restart: unless-stopped
```
The time zone was updated to the correct timezone, and the docker container started with (Note: If you are not using a `docker` user, you will need to add your user to the docker group. This can be done with `sudo usermod -aG docker [user]`):
```
docker-compose -f docker-compose.yml up -d
```
You can check the status of all docker containers with `docker ps`, and get detailed logs for the pihole container with `docker logs pihole`
Test and see if the pihole is running by changing a system's DNS server to the pihole's IP, then going to `http://[ip]/admin/` or `http://pi.hole`
## Troubleshooting
- Restart the server:
```
sudo reboot -h now
```
- Check if the container is running:
```
docker ps
```
- Check the logs:
```
docker logs pihole
```
- See if the container is listening(grep can be omitted to check all services):
```
sudo ss -tulpn | grep 53
```

32
Specify Server.md Normal file
View File

@ -0,0 +1,32 @@
12/24: Beginning of the server.
Updated packages and installed `nginx` and `php-fpm`
Edited the nginx config located at`/etc/nginx/sites-enabled/default`:
- Added `index.php` to line 44
```
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
```
To:
```
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
```
- Uncommented lines 56, 57, 60, and 63
```
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
```
- Uncommented lines 68-70
```
location ~ /\.ht {
deny all;
}
```