Log inSign up

Running conda environments on a Linux server

For a server, start with a minimal installer: Miniforge (preset to the community conda-forge channel) or Miniconda (preset to the vendor default channels). Run it in batch mode with bash Miniforge3-Linux-x86_64.sh -b -p $HOME/miniforge3, initialise your shell, then create one named environment per workload with conda create. The full Anaconda distribution works the same way but uses several gigabytes of disk, so it only makes sense when you want its whole package set.

Topic: Python · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13, Rocky Linux 9, AlmaLinux 9 · Updated 2026-12-03

Miniforge, Miniconda or Anaconda: which one?

All three install the same conda package manager; they differ in what comes preinstalled and which channel they pull from.

  • Miniforge: a small installer maintained by the conda-forge community, with conda and mamba, set to the conda-forge channel only.
  • Miniconda: a small installer published by Anaconda, set to the vendor default channels.
  • Anaconda Distribution: the same base plus hundreds of preinstalled data science packages and a large download.

On a server you rarely need hundreds of packages you did not ask for, so a minimal installer plus an explicit environment file is the usual choice. It also keeps disk usage predictable, which matters on smaller plans.

What should you know about the licence terms?

The conda tool itself is open source, but the package channels have their own terms. Anaconda publishes terms of service for its default channels (the ones Miniconda and Anaconda Distribution use out of the box) that, at the time of writing, allow free use for individuals and smaller organisations and require a paid agreement for larger organisations. Recent Miniconda releases also ask you to accept those channel terms before the first install.

The conda-forge channel is run by a community project and its packages carry their own open source licences, with no separate service agreement for using the channel. That is why many teams install Miniforge on servers. Whichever route you choose, read the current terms yourself and decide; this guide does not give legal advice.

How do you install Miniforge?

Download the installer that matches your architecture, check it, and run it unattended as your normal user. No root is needed, because conda installs into your home directory.

# curl is usually present; if not:
sudo apt install -y curl     # Ubuntu and Debian
sudo dnf install -y curl     # Rocky and Alma

cd /tmp
curl -fsSLO "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
curl -fsSLO "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh.sha256"
sha256sum -c "Miniforge3-$(uname)-$(uname -m).sh.sha256"
bash "Miniforge3-$(uname)-$(uname -m).sh" -b -p "$HOME/miniforge3"
"$HOME/miniforge3/bin/conda" init bash
exec bash -l
conda --version
mamba --version

The -b flag accepts the licence screen and skips questions; -p sets the install folder. The conda init step adds a short block to ~/.bashrc so the conda command is available in every new shell.

How do you install Miniconda or full Anaconda instead?

The flow is the same with the vendor installers. Compare the SHA-256 hash with the value listed on the download page before running anything.

cd /tmp
curl -fsSLO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sha256sum Miniconda3-latest-Linux-x86_64.sh   # compare with the published hash
bash Miniconda3-latest-Linux-x86_64.sh -b -p "$HOME/miniconda3"
"$HOME/miniconda3/bin/conda" init bash
exec bash -l
conda --version
conda tos --help     # shows how to review and accept channel terms

For the full distribution, open the archive listing at https://repo.anaconda.com/archive/, pick the newest Anaconda3-...-Linux-x86_64.sh file and install it with the same -b -p flags. Plan for several gigabytes of disk and a longer install. The uname -m output tells you whether to pick the x86_64 or aarch64 file.

How do you switch an existing Miniconda to conda-forge?

Change the channel list in ~/.condarc so conda-forge comes first and the default channels are no longer used. Mixing the two in one environment often causes slow solves and library conflicts, so strict priority is recommended.

conda config --add channels conda-forge
conda config --set channel_priority strict
conda config --remove channels defaults
conda config --show channels
cat ~/.condarc

Existing environments keep the packages they already have. Recreate them from an environment file to move them fully to the new channel.

How do you create and share an environment?

Create a named environment with the Python version and packages you need, activate it, and keep a small YAML file in your project so it can be rebuilt anywhere. Stop the base environment from activating on login so you never install into it by accident.

conda config --set auto_activate_base false
conda create -y -n analysis python=3.12 numpy pandas
conda activate analysis
python -c "import numpy, pandas; print(numpy.__version__, pandas.__version__)"
conda env export --from-history > environment.yml
conda deactivate

# on another server
conda env create -f environment.yml
conda env update -n analysis -f environment.yml --prune

The --from-history option writes only the packages you asked for, which keeps the file portable. If a library exists only on PyPI, install it with pip inside the activated environment after all conda packages, and list it under a pip: key in the YAML.

How do you run a conda environment as a service?

Call the interpreter inside the environment by its full path; no activation is needed. Each environment lives under envs/ in the install folder.

sudo tee /etc/systemd/system/nightly-report.service >/dev/null <<'EOF'
[Unit]
Description=Nightly pandas report

[Service]
Type=oneshot
User=deploy
WorkingDirectory=/home/deploy/reports
ExecStart=/home/deploy/miniforge3/envs/analysis/bin/python build_report.py
EOF
sudo tee /etc/systemd/system/nightly-report.timer >/dev/null <<'EOF'
[Unit]
Description=Run the report at 02:30

[Timer]
OnCalendar=*-*-* 02:30:00
Persistent=true

[Install]
WantedBy=timers.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now nightly-report.timer
systemctl list-timers nightly-report.timer

Some packages need activation hooks to set variables (for example GDAL data paths). In that case use ExecStart=/home/deploy/miniforge3/bin/conda run -n analysis python build_report.py, which runs the hooks first. For interactive notebooks on the same environment, see JupyterLab on a server.

How do you keep conda tidy and updated?

Update the base tools occasionally and clean the package cache, which grows quickly with large scientific libraries.

conda update -n base conda
conda update -n analysis --all
conda env list
du -sh ~/miniforge3/pkgs
conda clean --all -y
df -h /

To uninstall completely, run conda init --reverse bash, remove the install folder and delete ~/.condarc and ~/.conda. Note that conda environments and system Python are independent: removing conda never touches the interpreter your distribution uses, and the system Python with pip and venv keeps working.

Plans that fit this guide

Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.

All prices
PlanFits becauseSizeMonthlyOrder from
A2-4Miniforge plus a few environments2 vCPU, 4 GB RAM, 100 GB NVMe$14.40/mo$43.20 for 3 months
A4-8pandas work on mid sized datasets4 vCPU, 8 GB RAM, 180 GB NVMe$28.80/mo$86.40 for 3 months
A8-16full Anaconda and large in-memory data8 vCPU, 16 GB RAM, 350 GB NVMe$57.60/mo$57.60 for 1 month

Questions about Miniconda and Anaconda on a server

Should conda be installed as root for all users?

Usually not. A per user install avoids permission problems. If several users must share one, install to /opt/conda with sudo, give a group write access to that folder, and let each user keep personal environments in ~/.conda/envs.

Why is the conda solver slow?

Recent conda releases use the libmamba solver by default, which is much faster than the old one. Slow solves today usually come from mixing channels; use strict channel priority and a single main channel.

Can I use pip inside a conda environment?

Yes, after installing everything you can from conda. Use the environment pip (python -m pip while activated) and never run pip in the base environment.

How much disk does Anaconda need?

The full distribution takes several gigabytes once unpacked, and the package cache adds more. Miniforge or Miniconda start at a few hundred megabytes and grow only with what you install.

Do I need a large plan for data work?

Pandas and NumPy load data into memory, so size RAM to your largest dataset plus headroom. Moving up later means deploying a larger plan and migrating, as described in moving to a larger plan.