Initial commit on temp branch
This commit is contained in:
31
.gitignore
vendored
Normal file
31
.gitignore
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Ignore Proxmox container files
|
||||||
|
*.qcow2
|
||||||
|
*.raw
|
||||||
|
*.vmdk
|
||||||
|
*.vdi
|
||||||
|
*.iso
|
||||||
|
*.img
|
||||||
|
*.ova
|
||||||
|
*.ovf
|
||||||
|
*.log
|
||||||
|
*.tmp
|
||||||
|
|
||||||
|
# Ignore backup files
|
||||||
|
*.bak
|
||||||
|
*.backup
|
||||||
|
*.tar.gz
|
||||||
|
*.zip
|
||||||
|
|
||||||
|
# Ignore configuration files
|
||||||
|
*.conf
|
||||||
|
*.cfg
|
||||||
|
*.ini
|
||||||
|
|
||||||
|
# Ignore temporary files
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*.tmp
|
||||||
|
*.temp
|
||||||
|
|
||||||
|
# Ignore environment files
|
||||||
|
.env
|
||||||
57
README.md
Normal file
57
README.md
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
# Zion: Private Cloud
|
||||||
|
|
||||||
|
## Services
|
||||||
|
|
||||||
|
- [Cloudflared](https://github.com/jensdufour/homelab/tree/main/services/cloudflared.md)
|
||||||
|
|
||||||
|
## Applications
|
||||||
|
- [Proxmox](https://github.com/jensdufour/homelab/tree/main/applications/proxmox.md)
|
||||||
|
- [Home Assistant](https://github.com/jensdufour/homelab/tree/main/applications/homeassistant.md)
|
||||||
|
- [Cockpit](https://github.com/jensdufour/homelab/tree/main/applications/cockpit.md)
|
||||||
|
- [Portainer](https://github.com/jensdufour/homelab/tree/main/applications/portainer.md)
|
||||||
|
- [Plex Stack](https://github.com/jensdufour/homelab/tree/main/applications/plex.md)
|
||||||
|
- [Servarr Stack](https://github.com/jensdufour/homelab/tree/main/applications/servarr.md)
|
||||||
|
|
||||||
|
## Data Directory
|
||||||
|
General overview of the directory structure in my vault.
|
||||||
|
```
|
||||||
|
data
|
||||||
|
├── books
|
||||||
|
├── downloads
|
||||||
|
│ ├── qbittorrent
|
||||||
|
│ │ ├── completed
|
||||||
|
│ │ ├── incomplete
|
||||||
|
│ │ └── torrents
|
||||||
|
│ └── nzbget
|
||||||
|
│ ├── completed
|
||||||
|
│ ├── intermediate
|
||||||
|
│ ├── nzb
|
||||||
|
│ ├── queue
|
||||||
|
│ └── tmp
|
||||||
|
├── movies
|
||||||
|
├── music
|
||||||
|
└── shows
|
||||||
|
```
|
||||||
|
|
||||||
|
## User Permissions
|
||||||
|
Using bind mounts can lead to permissions conflicts between the host operating system and the container. To avoid this problem, you we specify the user ID (PUID) and group ID (PGID) in our Docker Compose.
|
||||||
|
|
||||||
|
If you run into errors, after creating all the folders you can assign the permissions using chown.
|
||||||
|
```
|
||||||
|
sudo chown -R 1000:1000 /data
|
||||||
|
```
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
1. Proxmox
|
||||||
|
Proxmox is a powerful open-source server virtualization management solution. Setup instructions can be found [here](https://github.com/jensdufour/homelab/tree/main/applications/proxmox.md).
|
||||||
|
|
||||||
|
2. Cloudflared: Cloudflared is used to expose your internal services to the internet securely. You can find the setup instructions [here](https://github.com/jensdufour/homelab/tree/main/services/cloudflared.md).
|
||||||
|
|
||||||
|
3. Backup: Setup a Cron backup script for the Docker containter on your NAS.
|
||||||
|
|
||||||
|
4. Home Assistant: Home Assistant is an open-source home automation platform. Setup instructions can be found [here](https://github.com/jensdufour/homelab/tree/main/applications/homeassistant.md).
|
||||||
|
|
||||||
|
5. Plex Stack: Plex Stack is used for managing and streaming your media. Setup instructions can be found [here](https://github.com/jensdufour/homelab/tree/main/applications/plex.md).
|
||||||
|
|
||||||
|
6. Servarr Stack: Servarr Stack is a collection of applications to automate media management. Setup instructions can be found [here](https://github.com/jensdufour/homelab/tree/main/applications/servarr.md).
|
||||||
88
applications/1-proxmox.md
Normal file
88
applications/1-proxmox.md
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
# Proxmox
|
||||||
|
|
||||||
|
## Installing Proxmox through the Wizard
|
||||||
|
|
||||||
|
1. **Download Proxmox VE ISO**:
|
||||||
|
- Go to the [Proxmox Download page](https://www.proxmox.com/en/downloads) and download the latest Proxmox VE ISO image.
|
||||||
|
|
||||||
|
2. **Create a Bootable USB Drive**:
|
||||||
|
- Use a tool like [Rufus](https://rufus.ie/) to create a bootable USB drive with the Proxmox VE ISO.
|
||||||
|
|
||||||
|
3. **Boot from USB**:
|
||||||
|
- Insert the USB drive into your server and boot from it. You may need to change the boot order in the BIOS/UEFI settings.
|
||||||
|
|
||||||
|
4. **Start the Installation**:
|
||||||
|
- Follow the on-screen instructions to start the Proxmox VE installation.
|
||||||
|
|
||||||
|
5. **Select Target Hard Disk**:
|
||||||
|
- Choose the hard disk where you want to install Proxmox VE. This would preferably be an SSD to store the VM and CT.
|
||||||
|
|
||||||
|
6. **Configure Country, Time Zone, and Keyboard Layout**:
|
||||||
|
- Set your country, time zone, and keyboard layout.
|
||||||
|
|
||||||
|
7. **Set Root Password and Email**:
|
||||||
|
- Enter a strong password for the root user and provide an email address for system notifications.
|
||||||
|
|
||||||
|
8. **Configure Network**:
|
||||||
|
- Set the hostname for your Proxmox server.
|
||||||
|
- Choose the network interface and configure a static IP address, subnet mask, gateway, and DNS server.
|
||||||
|
|
||||||
|
9. **Complete Installation**:
|
||||||
|
- Review your settings and complete the installation. The server will reboot.
|
||||||
|
|
||||||
|
10. **Access Proxmox Web Interface**:
|
||||||
|
- Open a web browser and navigate to `https://<your-static-ip>:8006`.
|
||||||
|
- Log in with the root user and the password you set during installation.
|
||||||
|
|
||||||
|
## Adding TOTP to the User
|
||||||
|
|
||||||
|
1. **Access Proxmox Web Interface**:
|
||||||
|
- Open a web browser and navigate to `https://<your-static-ip>:8006`.
|
||||||
|
- Log in with the root user and the password you set during installation.
|
||||||
|
|
||||||
|
2. **Navigate to User Management**:
|
||||||
|
- In the Proxmox web interface, go to `Datacenter` -> `Permissions` -> `Users`.
|
||||||
|
|
||||||
|
3. **Edit User Settings**:
|
||||||
|
- Select the user you want to add TOTP for and click `Edit`.
|
||||||
|
|
||||||
|
4. **Enable TOTP**:
|
||||||
|
- In the user settings, check the box for `Enable TOTP`.
|
||||||
|
- Click `OK` to save the changes.
|
||||||
|
|
||||||
|
5. **Configure TOTP**:
|
||||||
|
- After enabling TOTP, a QR code will be displayed.
|
||||||
|
- Use a TOTP app (e.g., Google Authenticator, Authy) to scan the QR code.
|
||||||
|
- Enter the generated TOTP code to verify and complete the setup.
|
||||||
|
|
||||||
|
6. **Test TOTP Configuration**:
|
||||||
|
- Log out of the Proxmox web interface.
|
||||||
|
- Log back in and you should be prompted for a TOTP code in addition to your password.
|
||||||
|
|
||||||
|
By following these steps, you will have added TOTP authentication to your Proxmox user, enhancing the security of your server.
|
||||||
|
|
||||||
|
## Creating the ZFS Vault with RAIDZ and LZ4 Compression through the Web GUI
|
||||||
|
|
||||||
|
1. **Access Proxmox Web Interface**:
|
||||||
|
- Open a web browser and navigate to `https://<your-static-ip>:8006`.
|
||||||
|
- Log in with the root user and the password you set during installation.
|
||||||
|
|
||||||
|
2. **Navigate to Storage**:
|
||||||
|
- In the Proxmox web interface, go to `Datacenter` -> `Storage`.
|
||||||
|
|
||||||
|
3. **Add ZFS Storage**:
|
||||||
|
- Click on `Add` and select `ZFS`.
|
||||||
|
|
||||||
|
4. **Configure ZFS Pool**:
|
||||||
|
- Enter a name for the ZFS pool, for example, `vault`.
|
||||||
|
- Select the RAID level as `RAIDZ`.
|
||||||
|
- Choose the hard drives you want to include in the pool.
|
||||||
|
|
||||||
|
5. **Enable LZ4 Compression**:
|
||||||
|
- In the same configuration window, find the option for compression.
|
||||||
|
- Select `LZ4` from the dropdown menu.
|
||||||
|
|
||||||
|
6. **Create the ZFS Pool**:
|
||||||
|
- Review your settings and click `Create` to set up the ZFS pool with RAIDZ and LZ4 compression.
|
||||||
|
|
||||||
|
By following these steps, you will have created a ZFS vault with RAIDZ and LZ4 compression using the Proxmox web GUI.
|
||||||
103
applications/2-storage.md
Normal file
103
applications/2-storage.md
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
# Storage - TODO: Currently you just create one disk image and keep mounting this -> Not the right way to go.
|
||||||
|
|
||||||
|
This script sets up Cockpit on a Proxmox Virtual Environment (PVE) using a bash command. It downloads and executes a script from a GitHub repository to automate the installation process.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
To set up Home Assistant, run the following command in your Proxmox shell:
|
||||||
|
```
|
||||||
|
bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/cockpit.sh)"
|
||||||
|
```
|
||||||
|
Use the advanced configuration for this, mainly to set a static IP and disable IPv6.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
### Mount the ZFS pool to Cockpit
|
||||||
|
First, mount the ZFS directory to the Cockpit LXC using the Proxmox web GUI:
|
||||||
|
- Navigate to the Proxmox web interface.
|
||||||
|
- Select the LXC container you want to mount the ZFS directory to.
|
||||||
|
- Go to the "Resources" tab.
|
||||||
|
- Click on "Add" and select "Mount Point".
|
||||||
|
- Set the "Storage" to the ZFS pool and the "Mount Point" to `/data`.
|
||||||
|
- Click "Add" to save the configuration.
|
||||||
|
|
||||||
|
### Install Cockpit Identities, File Sharing and Identities
|
||||||
|
Run these commands from the Cockpit console in Proxmox Virtual Environment (PVE):
|
||||||
|
```
|
||||||
|
wget https://github.com/45Drives/cockpit-identities/releases/download/vX.X.X/cockpit-identities_X.X.X_amd64.deb
|
||||||
|
dpkg -i cockpit-identities_X.X.X_amd64.deb
|
||||||
|
wget https://github.com/45Drives/cockpit-file-sharing/releases/download/vX.X.X/cockpit-file-sharing_X.X.X_amd64.deb
|
||||||
|
dpkg -i cockpit-file-sharing_X.X.X_amd64.deb
|
||||||
|
wget https://github.com/45Drives/cockpit-navigator/releases/download/vX.X.X/cockpit-navigator_X.X.X_amd64.deb
|
||||||
|
dpkg -i cockpit-navigator_X.X.X_amd64.deb
|
||||||
|
```
|
||||||
|
Replace `X.X.X` with the latest version numbers available on the respective GitHub pages.
|
||||||
|
Refresh the Cockpit GUI with ctrl+shift+r, the relevant components should now be visible.
|
||||||
|
After completing these steps, you should have Cockpit set up with the necessary components installed.
|
||||||
|
|
||||||
|
### Creating the Folder Structure
|
||||||
|
|
||||||
|
To create the folder structure, run this command from the Cockpit console in Proxmox Virtual Environment (PVE):
|
||||||
|
```
|
||||||
|
mkdir -p /data/{books,movies,music,shows,downloads/{qbittorrent/{completed,incomplete,torrents},nzbget/{completed,intermediate,nzb,queue,tmp}}}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configuring Cockpit
|
||||||
|
|
||||||
|
To add a group `data-share` that contains a user `media`, follow these steps:
|
||||||
|
|
||||||
|
1. **Access the Cockpit Web Interface**
|
||||||
|
|
||||||
|
Open your web browser and navigate to the Cockpit web interface. Log in with your administrative credentials.
|
||||||
|
|
||||||
|
2. **Create a New Group**
|
||||||
|
|
||||||
|
- In the "Identities" section, switch to the "Groups" tab.
|
||||||
|
- Click on "Create New Group".
|
||||||
|
- Enter `data-share` as the group name.
|
||||||
|
- Click "Create" to add the new group.
|
||||||
|
|
||||||
|
3. **Create a New User**
|
||||||
|
|
||||||
|
- Go to the "Identities" section in the Cockpit interface.
|
||||||
|
- Switch to the "Users" tab.
|
||||||
|
- Click on "New User".
|
||||||
|
- Enter `media` as the username and fill in the required details.
|
||||||
|
- Add the group `data-share` created in the previous step to the user.
|
||||||
|
- Set a password for the `media` user.
|
||||||
|
- Click "Create" to add the new user.
|
||||||
|
- Once the user has been created set a Samba password for the `media` user.
|
||||||
|
|
||||||
|
After completing these steps, you will have successfully created a `data-share` group and added the `media` user to it using the Cockpit GUI.
|
||||||
|
|
||||||
|
### Creating a File Share in Cockpit
|
||||||
|
|
||||||
|
To create a share through the File Sharing GUI in Cockpit and configure the global settings, follow these steps:
|
||||||
|
|
||||||
|
1. **Access the Cockpit Web Interface**
|
||||||
|
|
||||||
|
Open your web browser and navigate to the Cockpit web interface. Log in with your administrative credentials.
|
||||||
|
|
||||||
|
2. **Open the File Sharing Interface**
|
||||||
|
|
||||||
|
- In the Cockpit web interface, navigate to the "File Sharing" section.
|
||||||
|
|
||||||
|
3. **Configure Global Settings**
|
||||||
|
|
||||||
|
- Click on the "Global Configuration" tab.
|
||||||
|
- Set the "Server Description" to `Vault`.
|
||||||
|
- Ensure the "Workgroup" is set to `workgroup`.
|
||||||
|
- Enable the "Global macOS Shares" option.
|
||||||
|
- Click "Save" to apply the global configuration settings.
|
||||||
|
|
||||||
|
4. **Create a New Share**
|
||||||
|
|
||||||
|
- Switch to the "Shares" tab in the File Sharing interface.
|
||||||
|
- Click on "Add New Share".
|
||||||
|
- Enter `vault` as the share name.
|
||||||
|
- Set the "Path" to `/data`.
|
||||||
|
- Enable the "Windows ACLs with Linux/MacOS Support" option.
|
||||||
|
- Enable the "MacOS Share" option.
|
||||||
|
- Click "Create" to add the new share.
|
||||||
|
|
||||||
|
After completing these steps, you will have successfully configured the global settings and created a new share named `vault` with the specified options using the Cockpit File Sharing GUI.
|
||||||
28
applications/3-homeassistant.md
Normal file
28
applications/3-homeassistant.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# Home Assistant
|
||||||
|
|
||||||
|
This script sets up Home Assistant on a Proxmox Virtual Environment (PVE) using a bash command. It downloads and executes a script from a GitHub repository to automate the installation process.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
To set up Home Assistant, run the following command in your Proxmox shell:
|
||||||
|
```
|
||||||
|
bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/vm/haos-vm.sh)"
|
||||||
|
```
|
||||||
|
Use the advanced configuration for this, mainly to set a static IP and disable IPv6.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
After the installation of Home Assistant, follow these steps to complete the setup and configure remote access:
|
||||||
|
|
||||||
|
1. Open your web browser and navigate to `http://homeassistant:8123`. This will take you to the Home Assistant setup page.
|
||||||
|
2. Follow the on-screen instructions to complete the initial setup of Home Assistant.
|
||||||
|
3. To enable remote access, you need to configure a public hostname using Cloudflare:
|
||||||
|
- Log in to your Cloudflare account.
|
||||||
|
- Navigate to the Zero Trust dashboard.
|
||||||
|
- Go to the configuration of the Cloudflare Tunnel you created.
|
||||||
|
- Create a public hostname pointing to your Home Assistant instance.
|
||||||
|
- Ensure that the DNS record is proxied (orange cloud icon) to enable Cloudflare's security and performance features.
|
||||||
|
4. Update your Home Assistant configuration to use the new public hostname for remote access.
|
||||||
|
5. Save the configuration and restart Home Assistant to apply the changes.
|
||||||
|
|
||||||
|
You should now be able to access your Home Assistant instance remotely using the configured public hostname.
|
||||||
104
applications/4-docker.md
Normal file
104
applications/4-docker.md
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
# Plex Stack
|
||||||
|
|
||||||
|
To create an LXC container with specific configurations, follow the steps below:
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
Run the Command to create the Docker container:
|
||||||
|
|
||||||
|
Open your terminal and execute the following command:
|
||||||
|
```bash
|
||||||
|
bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/docker.sh)"
|
||||||
|
```
|
||||||
|
Use the advanced configuration for both stacks, mainly to set a hostname,static IP, disable IPv6 and give it the required performance.
|
||||||
|
|
||||||
|
### Plex stack
|
||||||
|
|
||||||
|
- **Hostname:** plex
|
||||||
|
- **Resources:**
|
||||||
|
- **Storage:** 32 GB
|
||||||
|
- **vCPU:** 4 vCPUs
|
||||||
|
- **RAM:** 8192 MiB
|
||||||
|
- **Static IP:** Assign a static IP address to the container.
|
||||||
|
- **Disable IPv6:** Ensure that IPv6 is disabled for the container.
|
||||||
|
|
||||||
|
### Servarr stack
|
||||||
|
|
||||||
|
- **Hostname:** servarr
|
||||||
|
- **Resources:**
|
||||||
|
- **Storage:** 4 GB
|
||||||
|
- **vCPU:** 4 vCPUs
|
||||||
|
- **RAM:** 8192 MiB
|
||||||
|
- **Static IP:** Assign a static IP address to the container.
|
||||||
|
- **Disable IPv6:** Ensure that IPv6 is disabled for the container.
|
||||||
|
|
||||||
|
There is no real need to add portainer to any of the stacks, as we will manage them through Docker Compose.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
### Configuration Files Storage
|
||||||
|
|
||||||
|
Create a mount point in the storage LXC with the path `/docker` and storage as `local-lvm` to leverage the SSD, follow these steps:
|
||||||
|
|
||||||
|
1. Open the storage LXC and navigate to the **Resources** section.
|
||||||
|
2. Select Add Mount Point:
|
||||||
|
- **Storage**: `local-lvm`
|
||||||
|
- **Size**: `128 GB`
|
||||||
|
- **Path**: `/docker`
|
||||||
|
|
||||||
|
This setup will store all Docker configurations, which can then be backed up to Azure, as described in the services overview.
|
||||||
|
|
||||||
|
### Mount the Configuration Files Storage
|
||||||
|
|
||||||
|
To copy the mount points from the Cockpit LXC in `/etc/pve/lxc/<id>.conf` to the Plex and Servarr LXC configuration, follow these steps:
|
||||||
|
|
||||||
|
|
||||||
|
1. **Copy the Mount Points:**
|
||||||
|
- Identify and copy the mount point configurations from the Cockpit LXC configuration file. The lines will look similar to:
|
||||||
|
```
|
||||||
|
mp0: /path/on/host,mp=/path/in/container
|
||||||
|
mp1: /path/on/host,mp=/path/in/container
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Update the Plex/Servarr LXC Configuration:**
|
||||||
|
- Open the Plex LXC configuration file:
|
||||||
|
```bash
|
||||||
|
nano /etc/pve/lxc/<plex-lxc-id>.conf
|
||||||
|
```
|
||||||
|
- Paste the copied mount point configurations into the Plex LXC configuration file.
|
||||||
|
|
||||||
|
3. **Save and Exit:**
|
||||||
|
- Save the changes and exit the editor.
|
||||||
|
|
||||||
|
4. **Restart the Plex LXC Container:**
|
||||||
|
|
||||||
|
This will ensure that the Plex LXC container has the same mount points as the Cockpit LXC container.
|
||||||
|
|
||||||
|
### Docker Compose
|
||||||
|
To configure the Plex and Servarr Stack, we will use Docker Compose. The Docker Compose file can be found at the following link: [Plex - Docker Compose File](https://github.com/jensdufour/homelab/tree/main/assets/compose/plex.yaml) and [Servarr - Docker Compose File](https://github.com/jensdufour/homelab/tree/main/assets/compose/servarr.yaml).
|
||||||
|
The Docker Compose was made using the Fleet of [LinuxServer.io](https://fleet.linuxserver.io).
|
||||||
|
On the Plex stack the configured containers are Plex, Overseer and Tautulli.
|
||||||
|
|
||||||
|
- **Plex:** A media server that organizes video, music, and photos from personal media libraries and streams them to smart TVs, streaming boxes, and mobile devices.
|
||||||
|
- **Overseer:** A request management and media discovery tool that integrates with Plex to allow users to request new content and track media availability.
|
||||||
|
- **Tautulli:** A monitoring and tracking tool for Plex Media Server that provides detailed insights into server activity, including user watch history and media consumption statistics.
|
||||||
|
|
||||||
|
On the Servarr stack the configured containers are qBittorrent, nzbGet, Prowlarr, Sonarr, Radarr and Bazarr.
|
||||||
|
|
||||||
|
- **Gluetun:** VPN client to obscude the traffic from qBittorrent and nzbGet.
|
||||||
|
- **qBittorrent:** A free and open-source BitTorrent client.
|
||||||
|
- **nzbGet:** A binary newsgrabber for downloading from Usenet.
|
||||||
|
- **Prowlarr:** An indexer manager/proxy for managing both Torrent and Usenet indexers.
|
||||||
|
- **Sonarr:** A PVR for Usenet and BitTorrent users to manage TV series.
|
||||||
|
- **Radarr:** A movie collection manager for Usenet and BitTorrent users.
|
||||||
|
- **Bazarr:** A companion tool to Sonarr and Radarr for managing subtitles.
|
||||||
|
|
||||||
|
Follow these steps to set up the Plex/Servarr Stack using Docker Compose:
|
||||||
|
|
||||||
|
1. Create the `docker-compose.yaml` file and paste the contents from the link provided.
|
||||||
|
2. Run the following command to start the Plex Stack:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
This will set up and run the Plex Stack with the specified configurations.
|
||||||
41
assets/compose/plex.yaml
Normal file
41
assets/compose/plex.yaml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
services:
|
||||||
|
plex:
|
||||||
|
image: lscr.io/linuxserver/plex:latest
|
||||||
|
container_name: plex
|
||||||
|
network_mode: host
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/Brussels
|
||||||
|
- VERSION=docker
|
||||||
|
- PLEX_CLAIM=
|
||||||
|
volumes:
|
||||||
|
- /docker/plex:/config
|
||||||
|
- /data:/data
|
||||||
|
restart: unless-stopped
|
||||||
|
tautulli:
|
||||||
|
image: lscr.io/linuxserver/tautulli:latest
|
||||||
|
container_name: tautulli
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/Brussels
|
||||||
|
volumes:
|
||||||
|
- /docker/tautulli:/config
|
||||||
|
ports:
|
||||||
|
- 8181:8181
|
||||||
|
restart: unless-stopped
|
||||||
|
overseerr:
|
||||||
|
image: lscr.io/linuxserver/overseerr:latest
|
||||||
|
container_name: overseerr
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/Brussels
|
||||||
|
volumes:
|
||||||
|
- /docker/overseerr:/config
|
||||||
|
- /data:/data
|
||||||
|
ports:
|
||||||
|
- 5055:5055
|
||||||
|
restart: unless-stopped
|
||||||
103
assets/compose/servarr.yaml
Normal file
103
assets/compose/servarr.yaml
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
---
|
||||||
|
services:
|
||||||
|
gluetun:
|
||||||
|
image: qmcgaw/gluetun
|
||||||
|
container_name: gluetun
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
devices:
|
||||||
|
- /dev/net/tun:/dev/net/tun
|
||||||
|
ports:
|
||||||
|
- 8888:8888/tcp # HTTP proxy
|
||||||
|
- 8388:8388/tcp # Shadowsocks
|
||||||
|
- 8388:8388/udp # Shadowsocks
|
||||||
|
- 8080:8080 #qbittorrent
|
||||||
|
- 6881:6881 #qbittorrent
|
||||||
|
- 6881:6881/udp #qbittorrent
|
||||||
|
volumes:
|
||||||
|
- /docker/gluetun:/gluetun
|
||||||
|
environment:
|
||||||
|
- VPN_SERVICE_PROVIDER=privado
|
||||||
|
- OPENVPN_USER=abc
|
||||||
|
- OPENVPN_PASSWORD=abc #Verify there are no special characters in the password
|
||||||
|
- SERVER_COUNTRIES=Netherlands
|
||||||
|
# Timezone for accurate log times
|
||||||
|
- TZ=Europe/Brussels
|
||||||
|
qbittorrent:
|
||||||
|
image: lscr.io/linuxserver/qbittorrent:latest
|
||||||
|
container_name: qbittorrent
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/Brussels
|
||||||
|
- WEBUI_PORT=8080
|
||||||
|
- TORRENTING_PORT=6881
|
||||||
|
volumes:
|
||||||
|
- /docker/qbittorrent:/config
|
||||||
|
- /data:/data
|
||||||
|
network_mode: service:gluetun
|
||||||
|
restart: unless-stopped
|
||||||
|
nzbget:
|
||||||
|
image: lscr.io/linuxserver/nzbget:latest
|
||||||
|
container_name: nzbget
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/Brussels
|
||||||
|
volumes:
|
||||||
|
- /docker/nzbget:/config
|
||||||
|
- /data:/data
|
||||||
|
ports:
|
||||||
|
- 6789:6789
|
||||||
|
restart: unless-stopped
|
||||||
|
prowlarr:
|
||||||
|
image: lscr.io/linuxserver/prowlarr:latest
|
||||||
|
container_name: prowlarr
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/Brussels
|
||||||
|
volumes:
|
||||||
|
- /docker/prowlarr:/config
|
||||||
|
ports:
|
||||||
|
- 9696:9696
|
||||||
|
restart: unless-stopped
|
||||||
|
sonarr:
|
||||||
|
image: lscr.io/linuxserver/sonarr:latest
|
||||||
|
container_name: sonarr
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/Brussels
|
||||||
|
volumes:
|
||||||
|
- /docker/sonarr:/config
|
||||||
|
- /data:/data
|
||||||
|
ports:
|
||||||
|
- 8989:8989
|
||||||
|
restart: unless-stopped
|
||||||
|
radarr:
|
||||||
|
image: lscr.io/linuxserver/radarr:latest
|
||||||
|
container_name: radarr
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/Brussels
|
||||||
|
volumes:
|
||||||
|
- /docker/radarr:/config
|
||||||
|
- /data:/data
|
||||||
|
ports:
|
||||||
|
- 7878:7878
|
||||||
|
restart: unless-stopped
|
||||||
|
bazarr:
|
||||||
|
image: lscr.io/linuxserver/bazarr:latest
|
||||||
|
container_name: bazarr
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/Brussels
|
||||||
|
volumes:
|
||||||
|
- /docker/bazarr:/config
|
||||||
|
- /data:/data
|
||||||
|
ports:
|
||||||
|
- 6767:6767
|
||||||
|
restart: unless-stopped
|
||||||
6
hotfixes/1-nzbGet.md
Normal file
6
hotfixes/1-nzbGet.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
### nzbGet - Categories fix
|
||||||
|
To fix the "directory does not appear to exist inside the container" error in Sonarr and Radarr, follow these steps:
|
||||||
|
|
||||||
|
**NZBGet Configuration:**
|
||||||
|
- Once NZBGet is set up, go to settings.
|
||||||
|
- Under INCOMING NZBS, change the `AppendCategoryDir` to `No`. This will prevent some potential mapping issues and save on unnecessary directories.
|
||||||
45
services/1-cloudflared.md
Normal file
45
services/1-cloudflared.md
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# Cloudflared
|
||||||
|
|
||||||
|
This script sets up Cloudflared on a Proxmox Virtual Environment (VE) container. Cloudflared is a tunneling daemon that proxies traffic from Cloudflare to your local server.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
To use the Proxmox helper script for setting up Cloudflared, execute the following command in your Proxmox VE environment:
|
||||||
|
```
|
||||||
|
bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/cloudflared.sh)"
|
||||||
|
```
|
||||||
|
Use the advanced configuration for this, mainly to set a static IP and disable IPv6.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
To configure a Cloudflare Tunnel from the Zero Trust portal with the Cloudflared service install command, follow these steps:
|
||||||
|
|
||||||
|
1. **Login to Cloudflare Zero Trust Dashboard**:
|
||||||
|
- Navigate to the [Cloudflare Zero Trust Dashboard](https://dash.teams.cloudflare.com/).
|
||||||
|
- Log in with your Cloudflare account.
|
||||||
|
|
||||||
|
2. **Create a Tunnel**:
|
||||||
|
- Go to the "Access" section and select "Tunnels".
|
||||||
|
- Click on "Create a tunnel".
|
||||||
|
- Provide a name for your tunnel and click "Save".
|
||||||
|
|
||||||
|
3. **Install Cloudflared**:
|
||||||
|
- Follow the instructions to install Cloudflared on your server if you haven't already done so.
|
||||||
|
|
||||||
|
4. **Run the Cloudflared Service Install Command**:
|
||||||
|
- Copy the provided command from the Zero Trust Dashboard.
|
||||||
|
- Run the command on your Proxmox VE container to install and configure the Cloudflared service. The command will look similar to this:
|
||||||
|
```
|
||||||
|
cloudflared service install <TOKEN>
|
||||||
|
```
|
||||||
|
- Replace `<TOKEN>` with the actual token provided in the Zero Trust Dashboard.
|
||||||
|
|
||||||
|
5. **Verify the Tunnel**:
|
||||||
|
- After running the command, verify that the tunnel is active in the Zero Trust Dashboard.
|
||||||
|
- You should see your tunnel listed with a status of "Active".
|
||||||
|
|
||||||
|
6. **Configure Public Hostname**:
|
||||||
|
- Go to the "Public Hostname" section in the Zero Trust Dashboard.
|
||||||
|
- Create a public hostname record that points to your service.
|
||||||
|
|
||||||
|
Your Cloudflare Tunnel is now configured and ready to use.
|
||||||
105
services/2-backup.md
Normal file
105
services/2-backup.md
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
# Rclone
|
||||||
|
|
||||||
|
## Install rClone on the host
|
||||||
|
|
||||||
|
```sh
|
||||||
|
apt install rclone
|
||||||
|
```
|
||||||
|
|
||||||
|
## Create the Azure Storage account
|
||||||
|
To create an Azure Storage account and a blob container called `homelab`, follow these steps:
|
||||||
|
|
||||||
|
1. Sign in to the [Azure portal](https://portal.azure.com/).
|
||||||
|
|
||||||
|
2. In the left-hand menu, select **Storage accounts** and then click **+ Create**.
|
||||||
|
|
||||||
|
3. In the **Basics** tab, enter the following information:
|
||||||
|
- **Subscription**: Select your Azure subscription.
|
||||||
|
- **Resource group**: Select an existing resource group or create a new one.
|
||||||
|
- **Storage account name**: Enter a unique name for your storage account.
|
||||||
|
- **Region**: Select the region where you want to create the storage account.
|
||||||
|
- **Performance**: Select `Standard`.
|
||||||
|
- **Account kind**: Select `StorageV2 (general-purpose v2)`.
|
||||||
|
- **Replication**: Select the replication option that suits your needs.
|
||||||
|
|
||||||
|
4. Click **Review + create** and then **Create**.
|
||||||
|
|
||||||
|
5. Once the storage account is created, navigate to the storage account and select **Containers** under the **Data storage** section.
|
||||||
|
|
||||||
|
6. Click **+ Container** to create a new container.
|
||||||
|
|
||||||
|
7. Enter `homelab` as the name of the container and set the **Public access level** to `Private (no anonymous access)`.
|
||||||
|
|
||||||
|
8. Click **Create** to create the container.
|
||||||
|
|
||||||
|
You now have an Azure Storage account with a blob container named `homelab`.
|
||||||
|
|
||||||
|
## Configure rclone
|
||||||
|
|
||||||
|
### Configure the rclone Remote
|
||||||
|
```sh
|
||||||
|
rclone config
|
||||||
|
|
||||||
|
# Follow the prompts to create a new remote configuration
|
||||||
|
# Select "n" for a new remote
|
||||||
|
# Enter a name for the remote, e.g., "azureblob"
|
||||||
|
# Select "30" for Azure Blob Storage
|
||||||
|
# Follow the prompts to enter your Azure Storage account name and key
|
||||||
|
# Leave the advanced configuration options as default
|
||||||
|
# Select "y" to confirm the configuration
|
||||||
|
|
||||||
|
# Example configuration:
|
||||||
|
# [azureblob]
|
||||||
|
# type = azureblob
|
||||||
|
# account = your_account_name
|
||||||
|
# key = your_account_key
|
||||||
|
```
|
||||||
|
|
||||||
|
### create the back-up script
|
||||||
|
1. Replace `<source>` with the path to the directory or file you want to copy.
|
||||||
|
2. Replace `<remote>` with the name of your rclone remote configuration for Azure Storage.
|
||||||
|
3. Replace `<container>` with the name of your Azure Storage container.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Set the source and destination paths
|
||||||
|
source_path="<source_path>"
|
||||||
|
destination_path="<destination_path>"
|
||||||
|
container="<container>"
|
||||||
|
|
||||||
|
# Copy the local folder to Azure Blob Storage
|
||||||
|
rclone sync -P -L --ignore-errors $source_path $destination_path:$container --exclude "qbittorrent/qBittorrent/ipc-socket"
|
||||||
|
# Print a timestamp for loggigg purposes
|
||||||
|
echo "Backup completed at $(date)" >> /root/backup.log
|
||||||
|
```
|
||||||
|
|
||||||
|
This script will recursively copy all files and directories from the source to the specified Azure Storage container.
|
||||||
|
|
||||||
|
### Make the script executable
|
||||||
|
```sh
|
||||||
|
chmod +x /root/backup.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Schedule the backup daily
|
||||||
|
To schedule the backup script to run daily, you can create a cron job. Follow these steps:
|
||||||
|
|
||||||
|
1. Open the crontab file for editing:
|
||||||
|
```sh
|
||||||
|
crontab -e
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Add the following line to schedule the backup script to run daily at 2 AM:
|
||||||
|
```sh
|
||||||
|
0 2 * * * </path/to/backup.sh>
|
||||||
|
```
|
||||||
|
|
||||||
|
Make sure to replace `</path/to/backup.sh>` with the actual path to your backup script.
|
||||||
|
|
||||||
|
3. Save and close the crontab file.
|
||||||
|
|
||||||
|
This cron job will execute the backup script every day at 2 AM.
|
||||||
|
|
||||||
|
## More Information
|
||||||
|
|
||||||
|
For more details on rclone and its configuration, visit [rclone.org](https://rclone.org/).
|
||||||
20
services/3-gluetun.md
Normal file
20
services/3-gluetun.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Gluetun Proxmox
|
||||||
|
If you encounter the error "Cannot Unix Open TUN device file: operation not permitted and cannot create TUN device file node: operation not permitted" while running this on LXC containers, follow these steps:
|
||||||
|
|
||||||
|
1. Find your `servarr` container number.
|
||||||
|
|
||||||
|
2. Edit the LXC configuration file:
|
||||||
|
```bash
|
||||||
|
nano /etc/pve/lxc/`<servarr_container_id>`.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Add the following lines to the configuration file:
|
||||||
|
```
|
||||||
|
net0:...
|
||||||
|
lxc.cgroup2.devices.allow: c 10:200 rwm
|
||||||
|
lxc.mount.entry: /dev/net dev/net none bind,create=dir
|
||||||
|
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
|
||||||
|
onboot:...
|
||||||
|
```
|
||||||
|
|
||||||
|
These steps will allow the container to access the TUN device properly.
|
||||||
Reference in New Issue
Block a user