← All posts
February 12, 20243 min read

CryoSPARC Installation & Management

Licensing, installing, and standing up a CryoSPARC master on a single machine or an HPC cluster node.

#cryo-em#hpc#linux

Installation

  1. Request a license — it usually takes CryoSPARC about two business days to issue one.
  2. Add it to your shell profile: export LICENSE_ID="<license_id>" in .bashrc.
  3. Download the master (and, for a cluster, the worker) package:
curl -L https://get.cryosparc.com/download/master-latest/$LICENSE_ID -o cryosparc_master.tar.gz
curl -L https://get.cryosparc.com/download/worker-latest/$LICENSE_ID -o cryosparc_worker.tar.gz

For a single-PC setup, only the master package is required.

  1. Extract it:
tar -xzvf cryosparc_master.tar.gz

Install as a non-root user — run the install.sh steps below from a regular account, not as root.

  1. Pick a database location — scratch space works well on a cluster, e.g. /scratch/cryo/cryoDB.
  2. Install from the extracted folder:
./install.sh --license $LICENSE_ID --hostname hostname --dbpath /scratch/cryo/cryoDB --port 61000

Single workstation: add --standalone with --worker_path /path/to/cryosparc_worker so the install bundles the worker setup in the same run.

Get the hostname with hostname. On a cluster this changes with node allocation, so update config.sh accordingly — adding export CRYOSPARC_FORCE_HOSTNAME=true to config.sh also helps.

Worker nodes

On each compute node, extract the worker tarball and install it with just the license:

tar -xzvf cryosparc_worker.tar.gz
./install.sh --license $LICENSE_ID

Then point the worker at the master:

bin/cryosparcw connect <master-ip> <worker-ip>

(On a single workstation, the --standalone install above has already made this connection.)

Starting it up

bin/cryosparcm start

The first start takes a while to configure; subsequent starts are fast.

Create a user:

bin/cryosparcm createuser --email "email@email.com" --username "user1" --firstname "user" --lastname "1" --password "somepass"

Elevate that user to admin:

cryosparcm updateuser --email "<email address>" --admin "true"

Since v5.0 these commands moved under the user subcommand: cryosparcm user create, cryosparcm user list, cryosparcm user update, cryosparcm user resetpassword.

CryoSPARC is now ready at port 61000. On a cluster, forward the port over SSH before opening it in a browser:

ssh -N -L 61000:cg001.sol.asu.edu:61000 user@sol.asu.edu

(cg001 is the compute node's id — on a personal machine you can skip this step.) Then open localhost:61000 in the browser.

Managing the master

bin/cryosparcm stop
bin/cryosparcm status
bin/cryosparcm licensestatus

stop shuts the master down cleanly, status reports the running services, and licensestatus shows the license state — the license ID is checked online during installation.

Service ports and hostname live in cryosparc_master/config.sh:

CRYOSPARC_BASE_PORT         first port in the service range (default 61000)
CRYOSPARC_MASTER_HOSTNAME   hostname the master advertises
CRYOSPARC_INSECURE          set to allow plain-HTTP (non-TLS) access

Troubleshooting

  • cryosparcm createuser / updateuser are gone: v5.0+ renamed them to cryosparcm user create / cryosparcm user update / cryosparcm user resetpassword — same flags as above.

References