CK Editor works locally but not on ubuntu server


I am using gunicorn +nginx on Ubuntu 18.08 server. When I enter the CK editor local admin panel, it works without any problems. However, the mentioned server does not work in the same place, what could be the reason for this?


Unfortunately, this statement in not clear. I’m interpreting this as saying that your installation of CK editor works in your local development environment, but not in your deployed server. If this is not the correct interpretation, please clarify.

Under that assumption, I’ll guess that if you look at the network tab in your browser’s developer tools that you will find it getting a 404 from the server when requesting the editor to be loaded.

I would probably start by checking the gunicorn logs to see if it tells you where it’s trying to load the files from, and verifying that the files are present and the uid under which gunicorn is running has permissions to those files. (I don’t know gunicorn, so I don’t know what logging information might be available or if you need to configure the logging to a more detailed level to get the information you need to diagnose this.)

In general, this type of problem is caused by one of:

  • Not having done a collectstatic
  • Not having the files in the right directory
  • Not having your settings correct for that static directory
  • Not having permissions to the file

The development runserver (or runserver_plus) are a lot more “flexible” with how and where they’ll look for static files. (See the base docs for runserver and the “staticfiles app” docs for runserver for more information on this topic.