CoCalc Docker Image

Major Update: July 25, 2021

On July 25, 2021, we released a new version of the CoCalc Docker image. This is a massive change from the last release. The internal architecture is significantly simpler. Much of the code has been refactored or rewritten. We have fixed many bugs. It’s now possible to disable idle timeout, change the basepath, and modify CoCalc itself much more easily. If you are already using the CoCalc Docker image, please upgrade and test it out: CoCalc Docker image upgrade.

About the CoCalc Docker Image

Not only does CoCalc let you use all open source math software in your browser, but CoCalc itself is open source. This means you can run CoCalc on your own laptop or server.

The CoCalc Docker image lets you:

  • locally run:
    • Sage worksheets

    • Jupyter notebooks with R, Sage, and Python 2 & 3 kernels

    • Julia programs

  • edit LaTeX documents and markdown locally

  • learn about how CoCalc works

Note that files edited with the Docker image are fully compatible with online CoCalc. You can upload files from your Docker image to your account and work on them there. Files from will run in the Docker image as well, but you will need to ensure that any required packages and libraries are also installed locally.


  1. Unlike the service, the Docker image doesn’t isolate projects from each other. There are no resource limitations between different projects.

  2. The Docker image has no provisions to scale horizontally. The Docker image may be useful if you have a small number of trusted, non-malicious users. In contrast, the online service uses a proprietary resource management system based on kubernetes that provides scalability, fault isolation, and resilience. Contact us at if you are interested in running CoCalc with kubernetes infrastructure.

  3. The software stack behind the service is several hundred gigabytes of well-tested code and data. In comparison, the Docker image provides a small subset of that stack, including SageMath and LaTeX. You can extend it on your own, though, by either installing more into the container or by amending the Dockerfile.

  4. SageMath, Inc. doesn’t prioritize supporting the Docker image, which means that if you ask a question about it, or make a support request, we likely won’t have time to answer. Please set your expectations accordingly (but see below for alternatives). On the other hand, if you are willing to fully compensate us for our time, then we can likely be very helpful!

  5. The license is AGPLv3. If you want to run CoCalc internally and cannot use AGPLv3 licensed code at your organization, contact us and we can sell you a version of the Docker image under a different license.


I’m working on a collaborative project on and the scripts we’re using will very likely exceed the allotted server time for my account. Can I run the Docker image of CoCalc on my own machine, but still enable access by my collaborators remotely?

Yes, you definitely can! The CoCalc team does exactly this in some special cases (e.g., for Sage Days workshops). Follow the directions here: sagemathinc/cocalc-docker. Be sure to make your account an admin and set an “account creation token” so that only you and your collab can make accounts on the server.

What support is available for the CoCalc Docker image?

If you want professional-level support for running the server from us, send email to There are also mailing lists for general community discussion described below.

Is Anaconda available in the CoCalc Docker image?

The Docker image does NOT currently include Anaconda at all. If you need it, you’ll have to install it yourself. This isn’t difficult, since the Docker image is running Ubuntu 18.04, and it is easy to install Anaconda into Ubuntu.

What about compatibility with the operating system on my local computer?

The CoCalc Docker image is completely isolated from your main Linux system. It can’t mess up anything installed there! It uses the exact same Linux kernel, but otherwise has minimal overhead (it is very much not a virtual machine). Docker is designed to not touch or break anything related to your OS.

How much disk space is needed for the CoCalc Docker image?

About 12 GB. Remember, the Docker image includes a full LaTeX and Sage install, which is pretty big.

Getting Started

Detailed instructions to get the image up and running are at the github repo for sagemathinc/cocalc-docker.

Additional Licensing and Support Available

CoCalc code is licensed under AGPLv3. If you would instead like a business-friendly MIT license instead, please contact, and we will sell you a 1-year license for $999. This also includes some support, though with no guarantees (that costs more). We do have several happy paying customers as of Sept 2019.

Online Mailing Lists and Open Issues

For additional news and support, we recommend joining the following lists:

Security Status

The CoCalc Docker image is not blatantly insecure from outside attack: the database has a long random password, user accounts are separate, encrypted SSL communication is used by default, etc. That said, please observe the following:


A determined user with an account can easily access or change files of other users in the same container! Use this for personal use, behind a firewall, or with an account creation token, so that only other people you trust create accounts. Don’t make one of these publicly available with important data in it and no account creation token! See issue 2031. Basically, use the CoCalc Docker image only with people you trust.

Updates to the CoCalc Docker Image

The CoCalc Docker image is updated several times a year. Updates incorporate all features and bug fixes that have been merged into the CoCalc GitHub code repository master branch at the time of the build.

Other updates, such as new versions of Sagemath, Julia, and other additional software, happen less frequently but will be announced on the CoCalc Docker mailing list.