Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // To install
- # Set MYSQL_USERNAME to your username
- # Set as JWT_SECRET a random string (you can use `openssl rand -base64 32`)
- # Set MYSQL_ROOT_PASSWORD and MYSQL_PASSWORD to your different passwords (you can use `openssl rand -base64 16`)
- docker network create --driver bridge onlyoffice
- docker run --net onlyoffice -i -t -d --restart=on-failure --name onlyoffice-document-server \
- -e JWT_ENABLED=true \
- -e JWT_HEADER=AuthorizationJwt \
- -e JWT_SECRET=JWT_SECRET \
- -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \
- -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
- -v /app/onlyoffice/DocumentServer/fonts:/usr/share/fonts/truetype/custom \
- -v /app/onlyoffice/DocumentServer/forgotten:/var/lib/onlyoffice/documentserver/App_Data/cache/files/forgotten \
- onlyoffice/documentserver
- docker run --net onlyoffice -i -t -d --restart=on-failure --name onlyoffice-control-panel \
- -v /var/run/docker.sock:/var/run/docker.sock \
- -v /app/onlyoffice/CommunityServer/data:/app/onlyoffice/CommunityServer/data \
- -v /app/onlyoffice/ControlPanel/data:/var/www/onlyoffice/Data \
- -v /app/onlyoffice/ControlPanel/logs:/var/log/onlyoffice onlyoffice/controlpanel
- docker run --net onlyoffice -i -t -d --privileged --cgroupns=host --restart=on-failure --name onlyoffice-community-server -p 4457:80 -p 4467:443 -p 5222:5222 \
- -e MYSQL_SERVER_ROOT_PASSWORD=MYSQL_ROOT_PASSWORD \
- -e MYSQL_SERVER_DB_NAME=onlyoffice \
- -e MYSQL_SERVER_HOST=127.0.0.1 \
- -e MYSQL_SERVER_USER=MYSQL_USERNAME \
- -e MYSQL_SERVER_PASS=MYSQL_PASSWORD \
- -e DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server \
- -e CONTROL_PANEL_PORT_80_TCP=80 \
- -e CONTROL_PANEL_PORT_80_TCP_ADDR=onlyoffice-control-panel \
- -e DOCUMENT_SERVER_JWT_ENABLED=true \
- -e DOCUMENT_SERVER_JWT_HEADER=JWT_HEADER \
- -e DOCUMENT_SERVER_JWT_SECRET=JWT_SECRET \
- -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
- -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
- -v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
- -v /sys/fs/cgroup:/sys/fs/cgroup:rw \
- onlyoffice/communityserver
- # Now go to the top left dropdown and select Settings -> Document Service
- # Replace now `http://onlyoffice-community-server/` with your IP!
- # If you have changed the port (OnlyOffice is not running on port 80) append your chosen port to your IP
- # Like this: `http://123.123.123.12:4457/`
- // To uninstall
- docker kill onlyoffice-document-server
- docker kill onlyoffice-control-panel
- docker kill onlyoffice-community-server
- docker rm onlyoffice-document-server
- docker rm onlyoffice-control-panel
- docker rm onlyoffice-community-server
- docker network rm onlyoffice
Add Comment
Please, Sign In to add comment