Justman10000

Manage OnlyOffice

Jul 5th, 2023 (edited)
1,052
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.72 KB | None | 0 0
  1. // To install
  2. # Set MYSQL_USERNAME to your username
  3. # Set as JWT_SECRET a random string (you can use `openssl rand -base64 32`)
  4. # Set MYSQL_ROOT_PASSWORD and MYSQL_PASSWORD to your different passwords (you can use `openssl rand -base64 16`)
  5. docker network create --driver bridge onlyoffice
  6.  
  7. docker run --net onlyoffice -i -t -d --restart=on-failure --name onlyoffice-document-server \
  8.     -e JWT_ENABLED=true \
  9.     -e JWT_HEADER=AuthorizationJwt \
  10.     -e JWT_SECRET=JWT_SECRET \
  11.     -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice  \
  12.     -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  \
  13.     -v /app/onlyoffice/DocumentServer/fonts:/usr/share/fonts/truetype/custom \
  14.     -v /app/onlyoffice/DocumentServer/forgotten:/var/lib/onlyoffice/documentserver/App_Data/cache/files/forgotten \
  15.     onlyoffice/documentserver
  16.  
  17. docker run --net onlyoffice -i -t -d --restart=on-failure --name onlyoffice-control-panel \
  18.     -v /var/run/docker.sock:/var/run/docker.sock \
  19.     -v /app/onlyoffice/CommunityServer/data:/app/onlyoffice/CommunityServer/data \
  20.     -v /app/onlyoffice/ControlPanel/data:/var/www/onlyoffice/Data \
  21.     -v /app/onlyoffice/ControlPanel/logs:/var/log/onlyoffice onlyoffice/controlpanel
  22.  
  23. 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 \
  24.     -e MYSQL_SERVER_ROOT_PASSWORD=MYSQL_ROOT_PASSWORD \
  25.     -e MYSQL_SERVER_DB_NAME=onlyoffice \
  26.     -e MYSQL_SERVER_HOST=127.0.0.1 \
  27.     -e MYSQL_SERVER_USER=MYSQL_USERNAME \
  28.     -e MYSQL_SERVER_PASS=MYSQL_PASSWORD \
  29.     -e DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server \
  30.     -e CONTROL_PANEL_PORT_80_TCP=80 \
  31.     -e CONTROL_PANEL_PORT_80_TCP_ADDR=onlyoffice-control-panel \
  32.     -e DOCUMENT_SERVER_JWT_ENABLED=true \
  33.     -e DOCUMENT_SERVER_JWT_HEADER=JWT_HEADER \
  34.     -e DOCUMENT_SERVER_JWT_SECRET=JWT_SECRET \
  35.     -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
  36.     -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
  37.     -v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
  38.     -v /sys/fs/cgroup:/sys/fs/cgroup:rw \
  39.     onlyoffice/communityserver
  40.  
  41. # Now go to the top left dropdown and select Settings -> Document Service
  42. # Replace now `http://onlyoffice-community-server/` with your IP!
  43. # If you have changed the port (OnlyOffice is not running on port 80) append your chosen port to your IP
  44. # Like this: `http://123.123.123.12:4457/`
  45.  
  46. // To uninstall
  47. docker kill onlyoffice-document-server
  48. docker kill onlyoffice-control-panel
  49. docker kill onlyoffice-community-server
  50.  
  51. docker rm onlyoffice-document-server
  52. docker rm onlyoffice-control-panel
  53. docker rm onlyoffice-community-server
  54.  
  55. docker network rm onlyoffice
Add Comment
Please, Sign In to add comment