- Home
- Docs
- Installation and configuration
- Community
- Docker version
- Updating ONLYOFFICE Docs for Docker to the latest version
Updating ONLYOFFICE Docs for Docker to the latest version
Introduction
This guide will show you how to update your ONLYOFFICE Docs Community Edition Docker version to the latest version.
onlyoffice/documentserver-ie
) and install Enterprise Edition instead of it.Before updating, please make sure that your Docker version corresponds to system requirements (any version supported by Docker team).
Shutting down ONLYOFFICE Docs
Due to the operational characteristic, ONLYOFFICE Docs saves a document only after the document has been closed by all the users who edited it. To avoid data loss, you must forcefully disconnect the ONLYOFFICE Docs users when you need to stop ONLYOFFICE Docs in case of the application update. To do that, execute the following script:
sudo docker exec {{DOCUMENT_SERVER_ID}} documentserver-prepare4shutdown.sh
where {{DOCUMENT_SERVER_ID}} stands for the ONLYOFFICE Docs container name or ID.
You can easily find out the current ONLYOFFICE Docs container name or ID using the Docker command, which will list all the existing containers:
sudo docker ps -a
Updating ONLYOFFICE Docs for Docker
Updating using the script
If your ONLYOFFICE Docs version was installed using the following script, execute the following command:
bash docs-install.sh -u true
Type Y and press Enter to update ONLYOFFICE Docs using Docker.
Updating manually
Step 1: Check if all the external data storage folders are mounted
Make sure that all the container volumes used to store ONLYOFFICE Docs data are mounted using the following command:
sudo docker inspect --format='{{range $p,$conf:=.HostConfig.Binds}}{{$conf}};{{end}}' {{DOCUMENT_SERVER_ID}}
Step 2: Stop the current ONLYOFFICE Docs Docker container.
sudo docker stop {{DOCUMENT_SERVER_ID}}
Step 3: Download the latest ONLYOFFICE Docs image
Download the latest ONLYOFFICE Docs image specifying the latest
tag:
docker pull onlyoffice/documentserver:latest
Step 4: Run the new image with the same map paths
sudo docker run -i -t -d -p 80:80 --restart=always \
-v /host_folder:/volume \
-v /host_folder:/volume -e JWT_SECRET=my_jwt_secret onlyoffice/documentserver
Make sure that you run the new image with the folder paths mapped exactly as they had been mounted for the previous version, otherwise the data stored in these folders will not be picked up automatically. To do that, specify the -v
option arguments by replacing the /host_folder:/volume
values with the actual paths as they were shown in Step 1.
If you've installed the previous version using a different port or HTTPS and want to install the new version in the same way, please refer to the following installation instruction to find the necessary commands.
Once the installation process is over, run ONLYOFFICE Docs and check it for correct work.
Step 5 (Optional): Remove old ONLYOFFICE Docs container and image
After you make sure that everything is ok and your updated ONLYOFFICE Docs version works correctly, you can remove an old ONLYOFFICE Docs container:
sudo docker rm {{OLD_DOCUMENT_SERVER_CONTAINER_ID}}
where {{OLD_DOCUMENT_SERVER_CONTAINER_ID}} stands for the OLD ONLYOFFICE Docs container name or ID.
If you want to free up space, you can also remove an old image. Display all docker images:
sudo docker images -a
Find the unnecessary image ID in the image list and remove the image:
sudo docker rmi {{OLD_DOCUMENT_SERVER_IMAGE_ID}}
- Download the script for upgrading the database schema.
- Execute the script using the command line.
- For PostgreSQL:
psql -U onlyoffice -W onlyoffice < {path-to-upgradev630.sql}
- For MySQL:
mysql -u root -p onlyoffice < {path-to-upgradev630.sql}
Specify the password used when creating the database (
onlyoffice
). - For PostgreSQL: