nginx is a reverse proxy supported by Authelia.
We will be working with these files.
/etc/nginx/authelia.conf
#! /usr/bin/env bash | |
# | |
update () { | |
apt update | |
apt upgrade -y | |
apt -t buster-backports update | |
apt -t buster-backports upgrade -y | |
apt autoremove -y | |
[[ -f /var/run/reboot-required ]] && echo -e "\n\e[31mThis machine requires a reboot to continue installation. Please reboot now.\e[0m\n" || : | |
} |
mkdir -p ~/bin && source ~/.profile | |
wget -qO ~/node.js.tar.gz "$(curl -sNL https://nodejs.org/en/download/ | grep -Po 'https://nodejs.org/dist/(.*)/node-v(.*)-linux-x64.tar.xz')" | |
tar xf ~/node.js.tar.gz --strip-components=1 -C ~/ | |
cd && rm -rf node.js.tar.gz README.md LICENSE CHANGELOG.md |
export python_version="$(curl -sNL https://www.python.org/downloads/source/ | sed -rn 's|(.*)Latest Python 3 Release - Python (.*)</a></li>|\2|p')" | |
export python_url="https://www.python.org/ftp/python/$python_version/Python-$python_version.tgz" |
## https://docs.docker.com/engine/security/rootless | |
## Debian Specific | |
echo "kernel.unprivileged_userns_clone=1" > /etc/sysctl.d/10-docker.conf \ | |
&& sysctl --system | |
echo "options overlay permit_mounts_in_userns=1" > /etc/modprobe.d/10-docker.conf \ | |
&& modprobe overlay permit_mounts_in_userns=1 |
#! /usr/bin/env bash | |
# | |
# shellcheck disable=SC1091,SC2034 # sourced files | |
# | |
set -a | |
# | |
export DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" | |
# | |
cr="\e[31m" # [c]olor[r]ed | |
cg="\e[32m" # [c]olor[g]reen |
#! /usr/bin/env bash | |
# | |
# shellcheck disable=SC1091,SC2034 # sourced files | |
# | |
set -a | |
# | |
export DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" | |
# | |
cr="\e[31m" # [c]olor[r]ed | |
cg="\e[32m" # [c]olor[g]reen |
#! /usr/bin/env bash | |
# | |
# shellcheck disable=SC1091,SC2034 # sourced files | |
# | |
set -a | |
# | |
export DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" | |
# | |
cr="\e[31m" # [c]olor[r]ed | |
cg="\e[32m" # [c]olor[g]reen |
authelia_local_version="$($HOME/bin/authelia --version | awk '{ print $3 }' | sed -rn 's|v(.*)|\1|p')" | |
authelia_remote_version="$(git ls-remote -t --sort=-v:refname --refs https://github.com/authelia/authelia.git | awk '{sub("refs/tags/v", "");sub("(.*)(rc|alpha|beta)(.*)", ""); print $2 }' | awk '!/^$/' | head -n 1)" | |
# | |
if [[ "$authelia_local_version" != "$authelia_remote_version" ]]; then | |
wget -qO "$HOME/authelia.tar.gz" "https://github.com/authelia/authelia/releases/download/v${authelia_remote_version}/authelia-linux-amd64.tar.gz" | |
tar -xf "$HOME/authelia.tar.gz" -C "$HOME/bin/" authelia-linux-amd64 | |
mv -f "$HOME/bin/authelia-linux-amd64" "$HOME/bin/authelia" | |
[[ -f "$HOME/authelia.tar.gz" ]] && rm -f "$HOME/authelia.tar.gz" | |
systemctl --user restart authelia.service | |
echo "Authelia updated and restarted" |
#! /usr/bin/env bash | |
# | |
#shellcheck source=sources/functions/utils | |
. /etc/swizzin/sources/functions/utils | |
#shellcheck source=sources/functions/os | |
. /etc/swizzin/sources/functions/os | |
#shellcheck source=sources/functions/app_port | |
. /etc/swizzin/sources/functions/app_port | |
#shellcheck source=sources/functions/ip | |
. /etc/swizzin/sources/functions/ip |