Last active
March 21, 2023 01:15
-
-
Save divadsn/e9d3294c759e0ad2866721c256eefdf5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export DEBIAN_FRONTEND=noninteractive | |
PASSWORD=$(LC_ALL=C </dev/urandom tr -dc A-Za-z0-9 | head -c 24) | |
IP_ADDRESS=$(dig @resolver4.opendns.com myip.opendns.com +short -4) | |
# Update system | |
apt update | |
apt dist-upgrade -y | |
# Install git | |
apt install --no-install-recommends -y git | |
# Install Docker | |
curl -sSL https://get.docker.com/ | CHANNEL=stable sh | |
systemctl enable --now docker | |
# Clone repo to stream | |
git clone https://github.com/divadsn/docker-private-stream stream && cd stream | |
# Setup environment | |
cat << EOF > wireguard.env | |
PASSWORD=${PASSWORD} | |
WG_HOST=${IP_ADDRESS} | |
EOF | |
# Start everything | |
docker compose up -d | |
echo "==================================================" | |
echo "" | |
echo "Your docker-private-stream instance is ready!" | |
echo "" | |
echo "Admin panel: http://${IP_ADDRESS}:51821" | |
echo "Password: ${PASSWORD}" | |
echo "" | |
echo "==================================================" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment