Meet ONLYOFFICE Docs Cloud, complete office software as a service
Meet ONLYOFFICE Docs Cloud

Migrate ONLYOFFICE Workspace installed via script to ONLYOFFICE Workspace Docker version

On a Linux Ubuntu 20.04 LTS VM I installed Onlyoffice Workspace Community Ver. performed via script to which during execution I replied with N (no Docker).
I would like to migrate all the data on a new installation carried out on another VM equipped with Linux Ubuntu 22.04 LTS on which I have installed the same version of Onlyoffice Workspace Community always via script to which, however, I answered with Y during the installation (Docker).

First of all I must say that the installation with Docker seems to be better as the Mail Server works correctly and Onlyoffice version updates and SSL certificates can be easily done from Control Panel.

I made a Full Backup from the Control Panel of the production installation (the one installed without Docker), but I can no longer log in after restoring the new Server where the Onlyoffice installation with Docker is present.

I have read that in order to restore a Backup on a new installation, the core.machinekey hash must match.

The problem is that the production Onlyoffice hash code is as follows:

“Vskoproizvolny Salt par Chivreski”

instead of an alphanumeric string similar to this: vaD7xGXGV432

and that it is possible to implicitly impose a hash key when running the installation script via the following command:

bash -ims true -md “” -mk vaD7xGXGV432

but I don’t know if it is correct to use this method for migration from no Docker to Docker.

I am confused and would like to know, if there is a migration procedure.

Thank you.

Hello @maxbon

but I don’t know if it is correct to use this method for migration from no Docker to Docker.

You are thinking in the right direction. You have to install Workspace via Docker on the new server and change core.machinekey so it matches to old installation. You can do it manually when installation is finished or you can do it via installation script as it is described here (Data restore section): Using the Control Panel backup/restore feature - ONLYOFFICE

Recently I discussed the same request with other user, please take a look at this topic: Upgrade via Backup / Restore 6.x to 7.x - #2 by Alexandre

the problem that on the installation of Onlyoffice no Docker that I would like to migrate, the hash value of core.machinekey is the following:

“Vskoproizvolny Salt par Chivreski”

instead of an alphanumeric string like this: vaD7xGXGV432

and if I try to install Onlyoffice via the following command:

bash -ims true -md “” -mk Vskoproizvolny Salt par Chivreski

it returns me an error.

Is it possible that in onlyoffice version no DOcker the Hash of core.machinekey has not been generated or that it is hidden somewhere?
And if so, where?

Thank you.

We are checking the situation, I will update this thread when we have something to share.

Thank you for pointing us to this situation. We have reproduced the issue and we added a bug to internal tracksystem (internal number - 59287). We have started working on it.

As for migration case, you still can change machinekey value manually on the fresh installation.

Is it possible that in onlyoffice version no DOcker the Hash of core.machinekey has not been generated or that it is hidden somewhere?

No, machinekey parameter persists in all Workspace versions. In your case, it’s ’ Vskoproizvolny Salt par Chivreski’. Please try to set that key on the new server manually > restart Community server container > restore prepared backup on the new server.

One more time, thank you for valuable data!

Hi Alexandra,
I have repeatedly edited the file containing the core.machinekey hash on both containers: communityserver and controlpanel.
Unfortunately after restarting the entire Linux VM the value I replaced is automatically changed with the original one generated during installation.
However, I haven’t tried to restart only the communityserver and controlpanel containers because I don’t know the exact command to use.
Could you please tell me how to do it?
Thank you.

For the Docker version, you can replace machinekey here /app/onlyoffice/CommunityServer/data/.private/machinekey and restart the Community Server container.
We have information about it here:

Go to the host and run docker ps. You will see list of running containers. Pay attention to their IDs.
Now run docker restart ID_of_necessary_container

Hi Alexandre,

now I understand.

I actually substituted the value in the files contained within each container.
Here’s what I did every time:

docker ps -a

67c4ca80250b onlyoffice / communityserver:

docker exec -it 67c4ca80250b bash

nano /var/www/onlyoffice/WebStudio/web.appsettings.config

nano /var/www/onlyoffice/Services/TeamLabSvc/TeamLabSvc.exe.config


docker ps -a

27a36d1b39c9 onlyoffice / controlpanel:

docker exec -it 27a36d1b39c9 bash

nano /var/www/onlyoffice/controlpanel/www/config/production.json

“core.machinekey”: “vaD8xGXGV375”,


Only after the restart the value returned to set itself as the previous one.

After all, I found the names of the files that I edited in the Backup and Restore guide on the official website of Onlyoffice.

At this point it would be advisable for the web page to which I refer to be corrected because it generates confusion.

I try to follow your instructions and let you know if I can solve.

Thank you

I just ran your directions, replacing the hash key that is inside the file:


but as soon as I restart the Container communityserver, the admin account is automatically disconnected and no longer accepts the login credentials.

I also tried to limit myself to just replacing the key without restarting the dockercommunity container, but as soon as I start the backup restore, the user is logged out, and as in the previous case, he no longer accepts the login credentials.

Any other suggestions?

After several attempts it finally seems to have managed to migrate.
Below is the detailed list of all the steps I had to carry out:

Onlyoffice migration procedure from No Docker version to Docker version

To be able to migrate Onlyoffice from a NO Docker installation to a Docker installation, proceed as follows:

From VM NO Docker version

First you need to make a complete backup of the NO Docker version through the Control Panel and save it on an external repository or on your PC.

Always from the same VM you must also find and write down the Hash key of core.machinekey automatically generated during installation, to do so consult the following file:

nano /var/www/onlyoffice/controlpanel/www/config/production.json

“core.machinekey”: “Vskoproizvolny Salt par Chivreski”,

From VM Docker version

Log into the Control Panel as an administrator and start restoring the backup file of the NO Docker version installation, making sure to check the item:

Notify users about the portal restore process

Once the recovery has started, all users, including the administrator, will be automatically logged out.

It will therefore be necessary to wait for the receipt, in the Administrator’s Email box, of a successful restoration confirmation message.

At this point it will be sufficient to replace the Hash key previously obtained from the VM NO Docker version using the following command:

nano /app/onlyoffice/CommunityServer/data/.private/machinekey


Vskoproizvolny Salt par Chivreski

Finally restart the entire VM


You will not need to set a new password as indicated in the body of the email.

Clear the cache of your browser and log in as an Administrator user

Verify that everything is working properly and that all user data is present.

A big thank you to Alexandre who helped me with this migration.

Hello @maxbon
We are glad that the issue is solved. Also I want to say thank you for the guide which you placed here, it will be useful for other users.