[Ask for help]Uncaught ReferenceError: DocsAPI is not defined

my operation:

1.I’m on my centos server installed onlyoffice follow the document:Installing ONLYOFFICE Docs for CentOS and derivatives - ONLYOFFICE

2.I downloaded the “python example” demo from my server and started it with the command:
“xxxx” is my server‘s IP
make server-prod DEBUG=true DOCUMENT_SERVER_API_PATH=//xxxx:8080 DOCUMENT_SERVER_PUBLIC_URL=//xxxx:8080 DOCUMENT_SERVER_PRIVATE_URL=//xxxx:80

My question:

1.How should I configure to access onlyoffice document server normally.

Hi @lxof :wave:

First of all, the DOCUMENT_SERVER_API_PATH variable is unnecessary.

When using your setup, you need to install the Document Server separately.
By default, the document server uses JWT_SECRET if you have installed the document server separately. Add the JWT_SECRET parameter.

Check the connectivity between the document server and the Python example. The error indicates that the example cannot reach the document server.

If you used a proxy, remember to configure the EXAMPLE_URL parameter.

Name Description Example
DEBUG Disable or enable debug mode. false
ADDRESS The address where the server should be started. 0.0.0.0
PORT The port on which the server should be running. 80
DOCUMENT_SERVER_PRIVATE_URL The URL through which the server will communicate with Document Server. http://proxy:8080
DOCUMENT_SERVER_PUBLIC_URL The URL through which a user will communicate with Document Server. http://localhost:8080
EXAMPLE_URL The URL through which Document Server will communicate with the server. http://proxy
JWT_SECRET JWT authorization secret. Leave blank to disable authorization. your-256-bit-secret

Example:
make server-prod ADDRESS=0.0.0.0 PORT=80 DOCUMENT_SERVER_PUBLIC_URL=http://xxx.xxx.xxx.xxx/ DOCUMENT_SERVER_PRIVATE_URL=http://xxx.xxx.xxx.xxx/ JWT_SECRET=uzq5KKcTPFsWN4Lmy3Ynuh4f4t9wCoLw

1 Like