-
-
Save tavinus/64b89730e8deb5253e66cce3b5a6b21f to your computer and use it in GitHub Desktop.
#!/bin/bash | |
########################################################################## | |
# Tavinus Nov 2022 | |
# | |
# https://gist.github.com/tavinus/64b89730e8deb5253e66cce3b5a6b21f | |
# This is a work in progress, use at your own risk | |
# | |
# The POSTGRES password is 'onlyoffice' and | |
# it will be asked during install | |
########################################################################## | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
# initial setup | |
apt update | |
apt upgrade -y | |
apt install -y sudo nano htop gnupg2 | |
# postgresql | |
apt install -y postgresql | |
sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice;" | |
sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';" | |
sudo -i -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;" | |
# rabbitmq | |
apt install -y rabbitmq-server | |
# nginx | |
apt install -y nginx-extras | |
# add gpg key | |
mkdir -p ~/.gnupg | |
chmod 700 ~/.gnupg | |
gpg --no-default-keyring --keyring gnupg-ring:/tmp/onlyoffice.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 | |
chmod 644 /tmp/onlyoffice.gpg | |
chown root:root /tmp/onlyoffice.gpg | |
mv /tmp/onlyoffice.gpg /etc/apt/trusted.gpg.d/ | |
# add repo | |
echo "deb https://download.onlyoffice.com/repo/debian squeeze main" | tee /etc/apt/sources.list.d/onlyoffice.list | |
apt update | |
# add ms fonts | |
apt install -y ttf-mscorefonts-installer | |
# install only office | |
apt install -y onlyoffice-documentserver | |
# Show JWT info | |
documentserver-jwt-status.sh | |
echo | |
echo "ALL DONE" | |
exit 0 |
Its not possible to connect Office to Nextcloud. My Office is installing well with your script into Proxmox LXC container. But this container tell me 502 Bad Gateway nginx. I didnt touch nginx configs for now! The Welcome page is working!
Had the same issue as @master-mcfly. After digging into problem i found out that "ds-docservice.service" had errors mentioning "DB table "task_result" does not exist". Also there was nothing running on port 8000.
To fix that:
Set the onlyoffice to be the DB owner sudo -i -u postgres psql -c "ALTER DATABASE onlyoffice OWNER TO onlyoffice;"
Import the schema psql -h localhost -U onlyoffice -d onlyoffice -f /var/www/onlyoffice/documentserver/server/schema/postgresql/createdb.sql
Restart the service systemctl restart ds-docservice.service
The ss -tuln | grep 8000
should now return the doc server listening
Troubleshooting
I was getting a weird error in Nextcloud when choosing fonts. Scrolling to the end would show 3 "empty" fonts and totally break the interface, even making the file not editable and displaying an error message. I noticed that this was not happening in the
ds:example
app, so I cleared my firefox cache and reloaded the Nextcloud page and document and all was fine.