mirror of
https://github.com/JonasunderscoreJones/docs.jonasjones.dev.git
synced 2025-10-22 18:49:18 +02:00
Compare commits
15 commits
70f70bed29
...
52299a4af7
Author | SHA1 | Date | |
---|---|---|---|
52299a4af7 | |||
18a8eeb616 | |||
48225cfd2d | |||
f9b172ddb9 | |||
da76396a96 | |||
3afdb95576 | |||
cf78b236a9 | |||
ee9c85a07e | |||
68ca2bc88e | |||
f99c86bdef | |||
1a69b0c4fe | |||
ce8ad608fa | |||
c8735e3306 | |||
6297b9f757 | |||
31334b4abd |
22 changed files with 727 additions and 18 deletions
|
@ -7,4 +7,4 @@
|
|||
"type": "generated-index",
|
||||
"description": "Documentation for the Jonas_Jones API"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,4 +7,4 @@
|
|||
"type": "generated-index",
|
||||
"description": "Documentation for the Jonas_Jones API v1 Routes"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,4 +7,4 @@
|
|||
"type": "generated-index",
|
||||
"description": "Documentation for the BetterConsoleMC mod"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,12 +5,6 @@ slug: /
|
|||
|
||||
# Jonas_Jones Documentation
|
||||
|
||||
:::info
|
||||
Here is all the documentation to my *personal* projects.
|
||||
|
||||
*All projecets managed by Organizations have their separate docs.*
|
||||
:::
|
||||
|
||||
## Anything specific you're looking for?
|
||||
Check out the sidebar or here, below:
|
||||
<div className="page-content-flex-container">
|
||||
|
@ -43,3 +37,11 @@ Check out the sidebar or here, below:
|
|||
An Overview of all my Services and Platforms
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br></br>
|
||||
|
||||
:::info
|
||||
Here is all the documentation to my *personal* projects.
|
||||
|
||||
*All projecets managed by Organizations have their separate docs.*
|
||||
:::
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
"type": "generated-index",
|
||||
"description": "Documentation for the McWebServer mod"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,4 +7,4 @@
|
|||
"type": "generated-index",
|
||||
"description": "The API is split into two parts, the Simple API and the Advanced API."
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,4 +7,4 @@
|
|||
"type": "generated-index",
|
||||
"description": "The Advanced API documentation."
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,4 +7,4 @@
|
|||
"type": "generated-index",
|
||||
"description": "The Simple API documentation."
|
||||
}
|
||||
}
|
||||
}
|
10
docs/misc/_category_.json
Normal file
10
docs/misc/_category_.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"position": 99,
|
||||
"label": "Miscelanous",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"description": "Miscelanous documentation unrelated to my Projects"
|
||||
}
|
||||
}
|
10
docs/misc/linux/_category_.json
Normal file
10
docs/misc/linux/_category_.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"position": 8,
|
||||
"label": "Linux Guides",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"description": "Guides all around Linux"
|
||||
}
|
||||
}
|
10
docs/misc/linux/arch-system-setup/_category_.json
Normal file
10
docs/misc/linux/arch-system-setup/_category_.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"position": 8,
|
||||
"label": "Arch Linux System Setup",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"description": "Guide to setup my Arch Linux system"
|
||||
}
|
||||
}
|
285
docs/misc/linux/arch-system-setup/desktop.md
Normal file
285
docs/misc/linux/arch-system-setup/desktop.md
Normal file
|
@ -0,0 +1,285 @@
|
|||
---
|
||||
sidebar_position: 2
|
||||
slug: /misc/archsetup/desktop
|
||||
---
|
||||
|
||||
# Desktop
|
||||
Sweet, this is gonna be a sick setup. Let's dive in!
|
||||
|
||||
## Prerequisites
|
||||
- Arch and the desired Desktop Environment or Window Manager is installed (equivalent to/or **desktop** setup with `archinstall`)
|
||||
- The system is up to date. To update, run:
|
||||
```bash
|
||||
sudo pacman -Syyu
|
||||
```
|
||||
|
||||
## Font Packages (nerd-fonts)
|
||||
In order to use all icons for some applications and the ZSH shell we need to install some font packages:
|
||||
|
||||
```bash
|
||||
yay -S noto-fonts-cjk noto-fonts-emoji
|
||||
```
|
||||
|
||||
and the very complete ttf file from nerd-fonts-complete by downloading from [this repository](https://github.com/ryanoasis/nerd-fonts), unzipping and moving the font-file into the respected directory:
|
||||
|
||||
```bash
|
||||
curl -OL https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz
|
||||
|
||||
mkdir -p /tmp/jetbrains-nerd-font
|
||||
tar -xf JetBrainsMono.tar.xz -C /tmp/jetbrains-nerd-font
|
||||
|
||||
cp /tmp/jetbrains-nerd-font/JetBrainsMonoNerdFont-Bold.ttf ~/.local/share/fonts/
|
||||
|
||||
fc-cache -f -v
|
||||
|
||||
```
|
||||
:::note
|
||||
This is for the JetBrains Mono Font. All other available fonts can be found in [this](https://github.com/archdroid20/nerd-fonts-complete) repository.
|
||||
:::
|
||||
|
||||
Restart the terminal / reinitialize the shell and any other programs you might need in order to update the emojis and icons for the next step or else they won't appear in the ZSH setup process.
|
||||
|
||||
## Icon pack (MacOS-Icons)
|
||||
The MacOS icon theme looks very clean so let's install it:
|
||||
|
||||
```bash
|
||||
ICONPACK_URL="https://github.com/zayronxio/Mkos-Big-Sur/releases/download/0.3/Mkos-Big-Sur.tar.xz"
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
ICON_DIR="$HOME/.icons"
|
||||
ICONPACK_NAME="Mkos-Big-Sur"
|
||||
|
||||
mkdir -p "$ICON_DIR"
|
||||
|
||||
# Download the icon pack
|
||||
curl -L -o "$TEMP_DIR/Mkos-Big-Sur.tar.xz" "$ICONPACK_URL"
|
||||
|
||||
# Extract the downloaded icon pack
|
||||
tar -xf "$TEMP_DIR/Mkos-Big-Sur.tar.xz" -C "$TEMP_DIR"
|
||||
|
||||
# Move the extracted icons to the user's icons directory
|
||||
mv "$TEMP_DIR/$ICONPACK_NAME" "$ICON_DIR"
|
||||
|
||||
# Clean up temporary files
|
||||
rm -rf "$TEMP_DIR"
|
||||
|
||||
# Set the icon theme using gsettings on Gnome
|
||||
gsettings set org.gnome.desktop.interface icon-theme "$ICONPACK_NAME"
|
||||
```
|
||||
|
||||
## Wallpaper
|
||||
A decent wallpaper can be downloaded from this link (not my current one):
|
||||
|
||||
https://raw.githubusercontent.com/JonasunderscoreJones/ArchSystemSetup/refs/heads/main/wallpaper.jpg
|
||||
|
||||
## ZSH (4 humans)
|
||||
We install the shell (yes, it is very dead but still amazing) as follows:
|
||||
|
||||
```bash
|
||||
if command -v curl >/dev/null 2>&1; then
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh4humans/v5/install)"
|
||||
else
|
||||
sh -c "$(wget -O- https://raw.githubusercontent.com/romkatv/zsh4humans/v5/install)"
|
||||
fi
|
||||
```
|
||||
|
||||
## Pacman Configuration
|
||||
The following commands change the visuals of pacman to be more colorful (and enable the easter-egg) and enables 5 simultaneous downloads:
|
||||
```bash
|
||||
sudo sed -i 's/#Color/Color/g' /etc/pacman.conf
|
||||
sudo sed -i 's/#TotalDownload/TotalDownload/g' /etc/pacman.conf
|
||||
sudo sed -i 's/#VerbosePkgLists/VerbosePkgLists/g' /etc/pacman.conf
|
||||
sudo sed -i 's/#ParallelDownloads/ParallelDownloads/g' /etc/pacman.conf
|
||||
sudo sed -i '/ParallelDownloads/a ILoveCandy' /etc/pacman.conf
|
||||
```
|
||||
|
||||
## Yet Another Yoghurt (AUR)
|
||||
Now we need a connection to the AUR. We install yay, an AUR manager:
|
||||
|
||||
```bash
|
||||
sudo pacman -S --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si
|
||||
```
|
||||
|
||||
# Essential Packages
|
||||
## Pacman
|
||||
The most important packages needed for this setup can be installed with the following command:
|
||||
|
||||
System / CLI:
|
||||
```bash
|
||||
yay -S adb alsa-utils android-tools bluetoothctl bluez-utils browsh-bin btop cargo cloudflare-wrangler cmake cowsay docker dpkg eigen faac fastfetch fdisk fprintd github-cli gtk2 ibus ibus-hangul imagemagick img2pdf jasper jq libadwaita libdc1394 libdc1394 libjpeg9 libjpeg-turbo libtheora libtiff4 libvorbis linux-firmware man mkfs.vfat neofetch networkmananger npm npx opencore-amr openexr php pipewire pipewire-pulse rclone rpm rustc scrcpy sl speedtest-cli sphinx stat syncthing texlive-latexextra v4l-utils vim wget wrangler x264 xvidcore yasm zip
|
||||
```
|
||||
Python packages:
|
||||
```bash
|
||||
yay -S pyright python-dotenv python-markdown python-matplotlib python-numpy python-pip python-praw python-psotipy python-pyautogui python-pycodestyle python-pygame python-pylast python-pylint python-spotipy python-tk python-tk spicetify spotipy
|
||||
```
|
||||
Programs:
|
||||
```bash
|
||||
yay -S xeyes-git realvnc-vnc-viewer lutris qjoypad pavucontrol jetbrains-toolbox gparted firefox firefox-nightly firefox-pwa cpupower-gui ark aseprite blockbench blueman
|
||||
```
|
||||
PS: You might not need all of these...
|
||||
|
||||
## Flatpak
|
||||
The following flatpaks can also be installed:
|
||||
|
||||
```bash
|
||||
flatpak install ca.desrt.dconf-editor cc.arduino.IDE2 com.bitwarden.desktop com.discordapp.Discord com.github.Matoking.protontricks com.github.tchx84.Flatseal com.heroicgameslauncher.hgl com.jaquadro.NBTExplorer com.mattjakeman.ExtensionManager com.modrinth.ModrinthApp com.obsproject.Studio com.playonlinux.PlayOnLinux4 com.protonvpn.www com.skype.Client com.spotify.Client com.sublimetext.three com.usebottles.bottles com.valvesoftware.Steam com.visualstudio.code dev.alextren.Spot dev.lasheen.qr fr.romainvigier.MetadataCleaner io.github.arunsivaramanneo.GPUViewer io.github.diegoivan.pdf_metadata_editor io.github.flattool.Warehouse io.github.Foldex.AdwSteamGtk io.gitlab.gregorni.Letterpress io.github.jonmagon.kdiskmark io.github.prateekmedia.appimagepool io.github.realmazharhussain.GdmSettings io.github.shiftey.Desktop io.github.thetumultuousunicornofdarkness.cpu-x io.github.ungoogled_software.ungoogled_chromium net.ankiweb.Anki net.lutris.Lutris org.audacityteam.Audacity org.bleachbit.BleachBit org.blender.Blender org.freedesktop.Piper org.gaphor.Gaphor org.gnome.Boxes org.gnome.design.IconLibrary org.gnome.PowerStats org.gnome.seahorse.Application org.gnome.World.PikaBackup org.kde.filelight org.kde.kdenlive org.kde.krita org.libreoffice.LibreOffice org.mozilla.Thunderbird org.onlyoffice.desktopeditors org.prismlauncher.PrismLauncher org.qbittorrent.qBittorrent org.raspberrypi.rpi-imager org.signal.Signal org.torproject.torbrowser-launcher org.videolan.VLC page.kramo.Cartridges sh.ppy.osu xyz.xclicker.xclicker
|
||||
```
|
||||
|
||||
## Caddy and Reverse Proxy Aliases
|
||||
To achieve nice reverse proxies like `http://syncthing` for the local syncthing we need to install and enable `caddy`:
|
||||
```bash
|
||||
yay -S caddy
|
||||
sudo systemctl enable --now caddy
|
||||
```
|
||||
Now we edit the `/etc/hosts` file by adding the following line (e.g. for syncthing):
|
||||
```bash
|
||||
127.0.0.1 syncthing
|
||||
```
|
||||
Next, we add the configuration to `/etc/caddy/Caddyfile`:
|
||||
```json
|
||||
http://syncthing {
|
||||
reverse_proxy 127.0.0.1:8384 {
|
||||
header_up Host localhost
|
||||
}
|
||||
}
|
||||
```
|
||||
A simple reload and it should work:
|
||||
```bash
|
||||
sudo systemctl reload caddy
|
||||
```
|
||||
|
||||
## SDKman and java
|
||||
To easily install and mange different java versions, we install SDKman along with Java 21:
|
||||
```bash
|
||||
curl -s "https://get.sdkman.io" | bash
|
||||
source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
sdk install java 21.0.3-oracle
|
||||
```
|
||||
|
||||
# Drivers
|
||||
## CPU (Intel)
|
||||
```bash
|
||||
yay -S xf86-video-intel vulkan-intel mesa lib32-mesa intel-hybrid-codec-driver intel-media-driver
|
||||
```
|
||||
|
||||
## GPU (NVIDIA)
|
||||
```bash
|
||||
yay -S supergfxctl nvidia nvidia-prime nvidia-settings nvtop cuda-tools
|
||||
```
|
||||
|
||||
|
||||
# Desktop Environment & Window Manager
|
||||
This guide covers [Gnome](#gnome), [KDE](#kde) and [Niri](#niri)
|
||||
## Gnome
|
||||
### Additional Software
|
||||
|
||||
A few additional Gnome applications are:
|
||||
|
||||
```bash
|
||||
yay -S gnome-shell-extension gnome-tweaks
|
||||
```
|
||||
|
||||
The same way we also get rid of a few programs:
|
||||
|
||||
```bash
|
||||
yay -Rns gnome-contacts gnome-weather gnome-clocks gnome-maps gnome-tour gnome-connections gnome-music gnome-console gnome-calendar gnome-text-editor
|
||||
```
|
||||
|
||||
We can install the firefox gnome theme:
|
||||
|
||||
```bash
|
||||
curl -s -o- "https://raw.githubusercontent.com/rafaelmardojai/firefox-gnome-theme/master/scripts/install-by-curl.sh" | bash
|
||||
```
|
||||
|
||||
### Gnome Extensions
|
||||
|
||||
Now we can install some gnome extensions. The one's I use/used at one point are:
|
||||
|
||||
```txt
|
||||
AlphabeticalAppGrid@stuarthayhurst
|
||||
batterytime@typeof.pw
|
||||
blur-my-shell@aunetx
|
||||
caffeine@patapon.info
|
||||
clipboard-history@alexsaveau.dev
|
||||
clipboard-indicator@tudmotu.com
|
||||
color-picker@tuberry
|
||||
compiz-alike-magic-lamp-effect@hermes83.github.com
|
||||
dash-to-dock@micxgx.gmail.com
|
||||
ddterm@amezin.github.com
|
||||
drive-menu@gnome-shell-extensions.gcampax.github.com
|
||||
fullscreen-avoider@noobsai.github.com
|
||||
fullscreen-hot-corner@sorrow.about.alice.pm.me
|
||||
fullscreen-to-empty-workspace@aiono.dev
|
||||
grand-theft-focus@zalckos.github.com
|
||||
impatience@gfxmonk.net
|
||||
mediacontrols@cliffniff.github.com
|
||||
net-label@slimani.dev
|
||||
nightthemeswitcher@romainvigier.fr
|
||||
power-profile-switcher@eliapasquali.github.io
|
||||
quick-settings-tweaks@qwreey
|
||||
Rounded_Corners@lennart-k
|
||||
rounded-window-corners@fxgn
|
||||
soft-brightness-plus@joelkitching.com
|
||||
supergfxctl-gex@asus-linux.org
|
||||
system-monitor@gnome-shell-extensions.gcampax.github.com
|
||||
trayIconsReloaded@selfmade.pl
|
||||
unredirect@vaina.lt
|
||||
```
|
||||
|
||||
The easiest way is probably to just manually install them, there is however a shell function for an automatic installation `install_gextension()` in [this](https://github.com/JonasunderscoreJones/ArchSystemSetup/blob/main/syssetup.sh) file.
|
||||
|
||||
### Gnome Settings
|
||||
The following commands set a few settings within gnome:
|
||||
```shell
|
||||
# Add minimize and maximize buttons to the window title bar
|
||||
gsettings set org.gnome.desktop.wm.preferences button-layout '":minimize,maximize,close"'
|
||||
|
||||
# Enable resizing with the right mouse button
|
||||
gsettings set org.gnome.desktop.wm.preferences resize-with-right-button true
|
||||
|
||||
# Set the clock format to show the date and 24-hour time
|
||||
gsettings set org.gnome.desktop.interface clock-format '24h'
|
||||
|
||||
# Configure window movement shortcuts
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys move-to-workspace-left '["<Shift><Super>Page_Down"]'
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys move-to-workspace-right '["<Shift><Super>Page_Up"]'
|
||||
|
||||
# Disable application switcher shortcut
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys app-switch '[]'
|
||||
|
||||
# Set Alt+Tab for window switching
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys window-switch '["<Alt>Tab"]'
|
||||
|
||||
# Configure media control shortcuts
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys next '["<Shift>F12"]'
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys play-pause '["<Shift>F11"]'
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys previous '["<Shift>F10"]'
|
||||
|
||||
# Set Ctrl+Q to close windows
|
||||
gsettings set org.gnome.settings-daemon.plugins.media-keys close '["<Ctrl>q"]'
|
||||
|
||||
# Show battery percentage
|
||||
gsettings set org.gnome.desktop.interface show-battery-percentage true
|
||||
|
||||
# Enable automatic suspend only on battery power
|
||||
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
|
||||
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 30 # You can adjust the timeout as needed
|
||||
|
||||
# Enable dark mode
|
||||
gsettings set org.gnome.desktop.interface gtk-theme 'Yaru-dark' # Adjust to your preferred dark theme
|
||||
|
||||
# Set touchpad scroll direction to traditional
|
||||
gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false
|
||||
|
||||
# Set keyboard layout to English (US, intl with dead keys)
|
||||
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us:intl')]"
|
||||
```
|
||||
|
||||
:::info[Coming Soon]
|
||||
//TODO: additional config
|
||||
|
||||
## KDE
|
||||
//TODO: config that is not yet translated to commands
|
||||
|
||||
## Niri
|
||||
//TODO everything
|
||||
:::
|
38
docs/misc/linux/arch-system-setup/index.md
Normal file
38
docs/misc/linux/arch-system-setup/index.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
sidebar_position: 1
|
||||
slug: /misc/linux/archsetup/
|
||||
---
|
||||
|
||||
# Arch-Linux Setup
|
||||
**A Guide To Install And Configure Arch-Linux The Way I like It (mostly for me to follow)**
|
||||
|
||||
## Why?
|
||||
I often forget how to setup certain things and waste a lot of time re-googleing what I once already googled.
|
||||
|
||||
:::info
|
||||
I have written an install-script that covers some of the steps described in this guide but only **some** and not all
|
||||
|
||||
The script is available at [JonasunderscoreJones/ArchSystemSetup](https://github.com/JonasunderscoreJones/ArchSystemSetup/) and can be run with the following command:
|
||||
|
||||
```bash
|
||||
curl -sSL https://syssetup.jonasjones.dev | bash
|
||||
```
|
||||
It is strongly recommended to follow this guide and to **not** use this script.
|
||||
:::
|
||||
|
||||
## Requirements
|
||||
- **Arch Linux**: Arch is technically required but most steps are almost identical on other distros, meaning that this guide can be followed for any distro (with a few exceptions)
|
||||
|
||||
## System Types
|
||||
This guide is available for multiple types of systems.
|
||||
|
||||
<div className="page-content-flex-container">
|
||||
<div className="page-content-flex-box page-content-flex-box1">
|
||||
### [Desktop](/archsetup/desktop)
|
||||
Guide for PC and Laptop with a Desktop Environment
|
||||
</div>
|
||||
<div className="page-content-flex-box page-content-flex-box2">
|
||||
### [Server (headless)](/archsetup/headless)
|
||||
Guide for a headless server without any kind of Desktop Environment or Window Manager
|
||||
</div>
|
||||
</div>
|
10
docs/misc/linux/arch-system-setup/server.md
Normal file
10
docs/misc/linux/arch-system-setup/server.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
sidebar_position: 3
|
||||
slug: /misc/archsetup/headless
|
||||
---
|
||||
|
||||
# Server (headless)
|
||||
|
||||
:::info
|
||||
Coming Soon...
|
||||
:::
|
131
docs/misc/linux/docker-mailserver.md
Normal file
131
docs/misc/linux/docker-mailserver.md
Normal file
|
@ -0,0 +1,131 @@
|
|||
---
|
||||
sidebar_position: 1
|
||||
slug: /misc/linux/docker-mailserver
|
||||
---
|
||||
|
||||
# Docker Mailserver
|
||||
|
||||
This guide installs docker-mailserver with SSL/TLS for secure incoming and outgoing mail. Below each step includes explanations of what it accomplishes.
|
||||
|
||||
## Step 1: Create project directory
|
||||
```bash
|
||||
mkdir docker-mailserver
|
||||
cd docker-mailserver
|
||||
```
|
||||
|
||||
## Step 2: Create SSL Certificates
|
||||
If your mail server domain is publicly accessible, use Certbot to obtain trusted SSL certificates for free.
|
||||
### use Let's Encrypt
|
||||
```bash
|
||||
sudo certbot certonly --manual --preferred-challenges dns -d mail.jonasjones.dev
|
||||
```
|
||||
Now, add a TXT DNS-Record as indicated by the instructions in the terminal, then hit enter.
|
||||
|
||||
This creates certificates typically in /etc/letsencrypt/live/mail.example.com/:
|
||||
|
||||
- `fullchain.pem` — full certificate chain
|
||||
|
||||
- `privkey.pem` — private key
|
||||
|
||||
Create the directory to put the certificates in (inside the mailserver directory):
|
||||
```bash
|
||||
mkdir config
|
||||
mkdir config/ssl
|
||||
```
|
||||
Now You can copy the certificates into the directory:
|
||||
```bash
|
||||
sudo cp /etc/letsencrypt/live/mail.example.com/fullchain.pem config/ssl/
|
||||
sudo cp /etc/letsencrypt/live/mail.example.com/privkey.pem config/ssl/
|
||||
|
||||
## Step 3: Create docker-compose.yml
|
||||
```yaml
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mailserver:
|
||||
image: mailserver/docker-mailserver:latest
|
||||
hostname: mail
|
||||
domainname: example.com
|
||||
container_name: mailserver
|
||||
ports:
|
||||
- "25:25" # SMTP
|
||||
- "143:143" # IMAP
|
||||
- "587:587" # Submission (SMTP with STARTTLS)
|
||||
- "993:993" # IMAPS (IMAP over SSL)
|
||||
volumes:
|
||||
- maildata:/var/mail
|
||||
- mailstate:/var/mail-state
|
||||
- ./config/:/tmp/docker-mailserver/
|
||||
- ./config/ssl/:/etc/letsencrypt/live/mail.example.com/:ro
|
||||
environment:
|
||||
- ENABLE_SPAMASSASSIN=1
|
||||
- ENABLE_CLAMAV=1
|
||||
- ENABLE_FAIL2BAN=1
|
||||
- ENABLE_POSTGREY=1
|
||||
- ONE_DIR=1
|
||||
- DMS_DEBUG=0
|
||||
- SSL_TYPE=manual
|
||||
- SSL_CERT_PATH=/etc/letsencrypt/live/mail.example.com/mail.example.com.crt
|
||||
- SSL_KEY_PATH=/etc/letsencrypt/live/mail.example.com/mail.example.com.key
|
||||
- SSL_DHPARAM_PATH=/etc/letsencrypt/live/mail.example.com/dhparam.pem # Optional
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
maildata:
|
||||
mailstate:
|
||||
```
|
||||
|
||||
## Step 4: Add DH-Parmeters (recommended)
|
||||
```bash
|
||||
openssl dhparam -out ./config/ssl/dhparam.pem 2048
|
||||
```
|
||||
DH parameters strengthen SSL security by enabling perfect forward secrecy during key exchange. Generating your own DH parameters helps prevent some cryptographic attacks.
|
||||
|
||||
## Step 5: Start Container
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
The logs will show errors about there having to be at least one mail account, this one will be created in the next step
|
||||
|
||||
## Step 6: Create Mail Account
|
||||
```bash
|
||||
docker exec -it mailserver setup email add user@example.com password
|
||||
```
|
||||
OR
|
||||
```bash
|
||||
docker exec -it mailserver setup email add user@example.com
|
||||
```
|
||||
If You don't want the password to be saved in your command history. You will be prompted for a password right after hitting enter
|
||||
|
||||
## Step 7: Verify SSL/TLS
|
||||
```
|
||||
openssl s_client -connect mail.example.com:993
|
||||
openssl s_client -starttls smtp -connect mail.example.com:587
|
||||
```
|
||||
|
||||
## Step 8: Add Email Aliases
|
||||
First, create the alias file:
|
||||
```bash
|
||||
nano config/postfix-virtual.cf
|
||||
```
|
||||
Now You have multiple options:
|
||||
- Single Email alias:
|
||||
```text
|
||||
admin@example.com me@example.com
|
||||
```
|
||||
- Catch-All alias
|
||||
```text
|
||||
@example.com me@example.com
|
||||
```
|
||||
The file can contain multiple aliases, one per line
|
||||
|
||||
Now add the following Env variable to the docker-compose file if not already set:
|
||||
```yaml
|
||||
environment:
|
||||
- ENABLE_POSTFIX_VIRTUAL_TRANSPORT=1
|
||||
```
|
||||
|
||||
Finally, restart the docker container:
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
10
docs/misc/linux/server-admin/_category_.json
Normal file
10
docs/misc/linux/server-admin/_category_.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"position": 8,
|
||||
"label": "Server Admin",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"description": "Guides Server Administration"
|
||||
}
|
||||
}
|
97
docs/misc/linux/server-admin/drive-automount.md
Normal file
97
docs/misc/linux/server-admin/drive-automount.md
Normal file
|
@ -0,0 +1,97 @@
|
|||
---
|
||||
sidebar_position: 2
|
||||
slug: /misc/linux/server-admin/drive-automount
|
||||
---
|
||||
|
||||
# Adding an Automount Drive on Linux
|
||||
|
||||
This guide explains how to configure a drive to automount at boot using `/etc/fstab`.
|
||||
|
||||
---
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. Identify the Drive
|
||||
|
||||
List drives and partitions:
|
||||
|
||||
```bash
|
||||
lsblk -f
|
||||
```
|
||||
|
||||
Find the target partition (e.g., `/dev/sdc1`) and note its UUID:
|
||||
|
||||
```bash
|
||||
blkid /dev/sdc1
|
||||
```
|
||||
|
||||
### 2. Create a Mount Point
|
||||
|
||||
Choose or create a directory where the drive will mount:
|
||||
|
||||
```bash
|
||||
sudo mkdir -p /mnt/mydrive
|
||||
```
|
||||
|
||||
### 3. Backup `/etc/fstab`
|
||||
|
||||
Always back up before editing:
|
||||
|
||||
```bash
|
||||
sudo cp /etc/fstab /etc/fstab.bak
|
||||
```
|
||||
|
||||
### 4. Edit `/etc/fstab`
|
||||
|
||||
Open `/etc/fstab` with an editor:
|
||||
|
||||
```bash
|
||||
sudo nano /etc/fstab
|
||||
```
|
||||
|
||||
Add a line with the drive's UUID, mount point, filesystem type, and options. Example for ext4:
|
||||
|
||||
```
|
||||
UUID=your-uuid-here /mnt/mydrive ext4 defaults 0 2
|
||||
```
|
||||
|
||||
Replace `your-uuid-here` with the actual UUID.
|
||||
|
||||
### 5. Test the Configuration
|
||||
|
||||
Mount all entries without rebooting:
|
||||
|
||||
```bash
|
||||
sudo mount -a
|
||||
```
|
||||
|
||||
Check if the drive is mounted:
|
||||
|
||||
```bash
|
||||
df -h | grep /mnt/mydrive
|
||||
```
|
||||
|
||||
:::danger
|
||||
If the test fails and you still reboot, the system will drop to emergency mode and manual intervention is required.
|
||||
|
||||
**In that case SSH WON'T WORK**
|
||||
:::
|
||||
|
||||
### 6. Reboot and Verify
|
||||
|
||||
Reboot the system and confirm the drive automounts:
|
||||
|
||||
```bash
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
After reboot:
|
||||
|
||||
```bash
|
||||
mount | grep /mnt/mydrive
|
||||
```
|
||||
:::note
|
||||
- Use `defaults` for standard mount options.
|
||||
- For other filesystems (e.g., NTFS, FAT32), adjust filesystem type and options accordingly.
|
||||
- If mounting fails at boot, system may drop to emergency mode; always test with `mount -a` first.
|
||||
:::
|
106
docs/misc/linux/server-admin/partition-and-filesystem.md
Normal file
106
docs/misc/linux/server-admin/partition-and-filesystem.md
Normal file
|
@ -0,0 +1,106 @@
|
|||
---
|
||||
sidebar_position: 1
|
||||
slug: /misc/linux/server-admin/partition-and-filesystem
|
||||
---
|
||||
|
||||
# Creating Partition Tables and Filesystems on Linux
|
||||
|
||||
This guide covers creating partition tables and filesystems using command-line tools.
|
||||
|
||||
---
|
||||
|
||||
## 1. Identify the Disk
|
||||
|
||||
List disks and partitions:
|
||||
|
||||
```bash
|
||||
lsblk
|
||||
```
|
||||
|
||||
Assume the target disk is `/dev/sdc`.
|
||||
|
||||
---
|
||||
|
||||
## 2. Create a Partition Table with `fdisk`
|
||||
|
||||
Start fdisk:
|
||||
|
||||
```bash
|
||||
sudo fdisk /dev/sdc
|
||||
```
|
||||
|
||||
### Inside `fdisk`:
|
||||
|
||||
- Create a new GPT partition table (recommended for disks >2TB):
|
||||
|
||||
```
|
||||
g
|
||||
```
|
||||
- Create a new partition:
|
||||
```
|
||||
n
|
||||
```
|
||||
- Accept defaults for partition number, first sector, and last sector (full disk).
|
||||
|
||||
- Write changes and exit:
|
||||
```
|
||||
w
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. Format the Partition
|
||||
|
||||
Assuming partition `/dev/sdc1`:
|
||||
|
||||
- Create an ext4 filesystem:
|
||||
|
||||
```bash
|
||||
sudo mkfs.ext4 /dev/sdc1
|
||||
```
|
||||
|
||||
- For other filesystems:
|
||||
|
||||
- NTFS: `sudo mkfs.ntfs /dev/sdc1`
|
||||
- FAT32: `sudo mkfs.vfat /dev/sdc1`
|
||||
|
||||
---
|
||||
|
||||
## 4. Verify the Filesystem
|
||||
|
||||
```bash
|
||||
sudo blkid /dev/sdc1
|
||||
```
|
||||
|
||||
Check UUID and filesystem type.
|
||||
|
||||
---
|
||||
|
||||
## 5. Mount the Partition
|
||||
|
||||
Create mount point and mount:
|
||||
|
||||
```bash
|
||||
sudo mkdir -p /mnt/mydrive
|
||||
sudo mount /dev/sdc1 /mnt/mydrive
|
||||
```
|
||||
|
||||
Verify:
|
||||
|
||||
```bash
|
||||
df -h | grep /mnt/mydrive
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 6. Automount (Optional)
|
||||
|
||||
Follow the **Adding an Automount Drive** guide to configure `/etc/fstab`.
|
||||
|
||||
|
||||
:::note
|
||||
- Creating new partition tables and filesystems will erase data on the disk.
|
||||
- Backup important data before proceeding.
|
||||
- Use GPT for disks larger than 2TB; MBR is limited to ~2TB.
|
||||
- Use `parted` or `gparted` for GUI or more advanced partitioning.
|
||||
:::
|
|
@ -7,4 +7,4 @@
|
|||
"type": "generated-index",
|
||||
"description": "Documentation for my random script dump repository"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,4 +7,4 @@
|
|||
"type": "generated-index",
|
||||
"description": "Documentation for the Spotify scripts"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,4 +7,4 @@
|
|||
"type": "generated-index",
|
||||
"description": "Documentation for the YetAnotherDiscordChatLink mod"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,8 +21,8 @@
|
|||
"cheerio": "^1.0.0-rc.12",
|
||||
"clsx": "^2.0.0",
|
||||
"prism-react-renderer": "^2.3.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "^3.7.0",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue