fix owncloud configuration plus dns resolution

This commit is contained in:
2026-03-05 07:44:15 +01:00
parent 9560c6b40f
commit a9788fe669

View File

@@ -138,6 +138,11 @@ get_country_from_timezone() {
fi
}
oc_installapp() {
local appid="$1"
docker exec -u www-data owncloud_server /var/www/owncloud/occ market:install $appid
echo "$appid installed for owncloud"
}
# what this script needs to do:
#formatting variables:
@@ -146,7 +151,7 @@ cyan='\033[0;36m'
cyanbold='\033[1;36m'
greenbold='\033[1;32m'
nc='\033[0m'
underline='\033[4m'
underline='\033[4;0m'
# request all install parameters needed from user
# ---- User input ----
@@ -276,7 +281,10 @@ umask 0022
#disable stub listener
echo "DNSStubListener=no" | tee -a /etc/systemd/resolved.conf
systemctl restart systemd-resolved
sleep 5
systemctl restart docker
sleep 5
# up dockge
@@ -296,6 +304,13 @@ docker compose up -d
echo -e "${cyan}Nginx Proxy Manager${nc} has been installed and launched. go to http://$localip:81 and configure your username and password, then press any key to continue"
read -n 1 -s -r -p ""
echo ""
echo -e "Multiple applications will now be installed in quick succession without continuous user prompting."
echo -e "when each application is installed, you will see an output providing you the url to verify it is online"
echo -e "do not worry if you miss it, you will be reminded later"
echo -e "you can skip verifying as the script runs, and take a short coffee break here."
echo -e "the script will continue automatically in 30 seconds"
sleep 30
cd /opt/stacks/dozzle
docker compose up -d
@@ -315,14 +330,36 @@ echo -e "${cyan}it-tools${nc} has been launched from http://tools.$domain, verif
cd /opt/stacks/onlyoffice
docker compose up -d
echo -e "${cyan}onlyoffice${nc} has been launched from http://tools.$domain, verify it is online"
echo -e "${cyan}onlyoffice${nc} has been launched from http://office.$domain, verify it is online"
#owncloud
# todo: use OC config commands to install addons and configure onlyoffice
cd /opt/stacks/owncloud
docker compose up -d
echo -e "${cyan}owncloud${nc} has been launched from http://cloud.$domain, check if it is online and working, it may take a bit to launch. feel free to add marketplace plugins"
echo "awaiting owncloud boot"
sleep 120
docker exec -u www-data owncloud_server /var/www/owncloud/occ maintenance:mode --on
oc_installapp bookmarks
oc_installapp calendar
oc_installapp camerarawpreviews
oc_installapp checksum
oc_installapp contacts
oc_installapp drawio
oc_installapp extract
oc_installapp files_3dviewer
oc_installapp files_clipboard
oc_installapp files_textviewer
oc_installapp gallery
oc_installapp metadata
oc_installapp music
oc_installapp notes
oc_installapp onlyoffice
oc_installapp systemtags
oc_installapp tasks
docker exec -u www-data owncloud_server /var/www/owncloud/occ config:app:set onlyoffice DocumentServerUrl --value="https://office.$domain/"
docker exec -u www-data owncloud_server /var/www/owncloud/occ config:app:set onlyoffice jwt_secret --value="$onlyofficeJWT"
echo -e "${cyan}owncloud${nc} has been launched from http://cloud.$domain, check if it is online and working, it may take a bit to launch. 502 error = still starting"
cd /opt/stacks/site
docker compose up -d
@@ -379,7 +416,7 @@ echo -e "${cyan}uptime kuma${nc} has been launched from http://status.$domain, p
read -n 1 -s -r -p ""
#pihole
systemctl restart systemd-resolved
cd /opt/stacks/pihole
docker compose up -d
echo -e "${cyan}pihole${nc} has been launched from http://dns.$domain, to use pihole as your DNS provider, set your DNS to $localip in your router for DHCP and on your device for any device with a static ip. Currently, the DNS is configured to use the joindns4.eu DNS, which *also* has built-in adblocking."