This article is for one person who wants to analyse their own microbiome data on a laptop or desktop. It covers installing atima, starting and stopping it, where it keeps your data, the settings that matter on one computer, upgrading, backing up, and what to do when it does not start. In this mode there are no accounts, and other computers cannot connect.
What you need
| What | Version | Notes |
|---|---|---|
| R | 4.3 or later | |
| rbiom | 4.0.0 or later | The R package that does the analyses. It is installed together with atima. |
| Pandoc | any recent | A document converter. atima uses it for project descriptions. |
| A web browser | a current one | The interface runs in the browser. |
atima runs on Windows, macOS and Linux.
Installing
rbiom 4 is not on CRAN yet, so atima and rbiom are both installed
from GitHub. The pak package does this in one step:
install.packages("pak")
pak::pak("cmmr/atima")Then check that R can find Pandoc:
pandoc::pandoc_available()If the answer is FALSE, install Pandoc from https://pandoc.org/installing.html, or from R with
pandoc::pandoc_install(). RStudio ships with a copy of
Pandoc, which is found when atima is started from inside RStudio.
Starting atima
atima::run()R prints what it is doing and then waits:
Initializing Atima Server...
- Data Directory: <your data directory>
- Temp Directory: <a temporary directory>
- Sign-in: none (single local user)
- CPU cores: 8 (1 for this process). Starting 7 worker processes
- Loading example projects
Server listening on 127.0.0.1 port 8080. Open http://127.0.0.1:8080
AI apps can connect to http://127.0.0.1:8080/mcp
When R is used interactively (the R console or RStudio), the address is opened in your browser. Otherwise, open http://127.0.0.1:8080 yourself.
The R session that called run() is busy for as long as
the server runs. To keep using R for other things, start atima in a
second R session or in a terminal:
Where your data is kept
Everything atima keeps is in one directory, the data directory. By default it is the directory R assigns to the package for user data:
tools::R_user_dir("atima", "data")| Operating system | Default data directory |
|---|---|
| Windows | %APPDATA%\R\data\R\atima |
| macOS | ~/Library/Application Support/org.R-project.R/R/atima |
| Linux | ~/.local/share/R/atima |
It holds:
| Path | Contents |
|---|---|
sqlite.db |
The database: projects, their titles and descriptions, and your
project tree. While the server runs there are also
sqlite.db-wal and sqlite.db-shm, which belong
to it. |
files/ |
The uploaded BIOM files and the versions atima derives from them. |
cache/ |
Results kept so that they need not be computed twice. It can be deleted while the server is stopped. |
sqlite.db.v<N>.<date>.bak |
Copies of the database made before an upgrade changed it (see “Upgrading”). |
To keep the data somewhere else, name the directory when you start:
atima::run(data_dir = "D:/microbiome/atima-data")Use the same data_dir every time, or set it once as
described in the next section. Starting with a different directory gives
you a new, empty atima with only the example projects; the other
directory is not changed.
Figures, exports and uploads in progress go to a separate temporary
directory, temp_dir. By default it is a new directory
inside R’s temporary directory, which R removes when the R session
ends.
The article Where your data goes describes in detail what is stored and what leaves your computer.
Settings
Each setting can be given in three ways. The first that is set is used:
- an argument,
atima::run(port = 8081); - an environment variable,
ATIMA_PORT=8081; - an R option,
options(atima.port = 8081), for example in your.Rprofile.
These are the settings that matter on one computer.
?atima::run lists them all.
| Argument | Environment variable | Default | What it does |
|---|---|---|---|
port |
ATIMA_PORT |
8080 |
The port in the address, http://127.0.0.1:<port>.
Change it if another program uses 8080. |
data_dir |
ATIMA_DATA_DIR |
see above | Where the database, stored files and cache are kept. |
temp_dir |
ATIMA_TEMP_DIR |
a new directory in R’s temporary directory | Figures, exports and uploads in progress. It must not be
data_dir, or inside it, or contain it: atima deletes old
files here. |
cpus |
ATIMA_CPUS |
every CPU core | The most CPU cores atima may use, for answering the browser and for its jobs (figures, uploads, exports) together. |
time_limit |
ATIMA_TIME_LIMIT |
no limit | The longest a job may run, in seconds. On your own computer there is no limit unless you set one: a figure or test may take as long as it needs. (A shared server stops a job after 60 seconds, so that one person’s long analysis does not hold up everyone else.) |
max_upload_mb |
ATIMA_MAX_UPLOAD_MB |
50 |
The largest file accepted, in megabytes. |
cache_size_mb |
ATIMA_CACHE_SIZE_MB |
100 |
Upper limit for cache/, in megabytes. |
session_hours |
ATIMA_SESSION_HOURS |
24 |
Unsaved changes in a browser tab, and that tab’s figures and exports, are deleted when the tab has not been heard from for this many hours. |
open |
ATIMA_OPEN |
TRUE when R is interactive |
Whether to open the browser when the server is up. |
Jobs are run by worker processes: separate R processes, each with its own copy of R and rbiom in memory. One core is kept for the process that answers the browser, and atima starts a worker for each of the others, but no more than one for every 2 GB of your computer’s memory. So the page stays quick while a slow figure is drawn: lists and tables do not wait behind it.
Most figures, statistics and tables are computed by rbiom functions that can use several cores. Such a job is given all the cores that are free when it starts, and keeps them until it is done. Jobs that arrive meanwhile wait for it if it took every core. Other jobs, such as uploads and edits, have one core.
With cpus = 1 or 2 jobs run one after
another. That is enough for one person who is in no hurry, and uses the
least memory.
A figure is drawn again after every change of a setting. With a large dataset that can mean waiting several times on the way to the figure you want. The box that appears while a figure is drawn has a checkbox, Re-render automatically. Untick it, and a change of a setting no longer draws anything: the figure on screen is greyed out and marked “Settings changed”, and the Download button is switched off, until you press Render. The same button reads Stop while a figure is being drawn. A page you open then waits for Render too. The box goes away once the figure is drawn and up to date, but not while the mouse is over it, so a quick figure does not take the checkbox away before you can click it. It is back with the next change of a setting, and ticking it then draws the figure at once. The browser remembers the choice for every kind of figure.
A figure’s page keeps the figure’s settings in its address, after the
#: the controls, the sample filter, the image settings and,
if it is not the one the project was saved with, the rarefaction depth.
A reload, a bookmark or a link brings back the same settings and draws
the figure again; the link opens only for someone who can open the
project. When every worker is busy, the box says where the figure is in
the queue. Leaving the page stops the figure; the address brings it
back.
An example for a laptop with little memory and a large dataset:
atima::run(cpus = 4, max_upload_mb = 200)Optional packages
Some features need an R package that rbiom does not install by itself. Without the package, atima does not offer the feature. Install the ones you want and start atima again.
| Package | What it switches on |
|---|---|
readxl |
Uploading sample metadata as an Excel workbook. |
openxlsx |
Exporting a project as an Excel workbook. |
zip |
Exporting a project as files for QIIME 2 or mothur.
(openxlsx installs it too.) |
phyloseq |
Exporting a project as a phyloseq object. It is on Bioconductor, not CRAN. |
fillpattern |
Patterns (hatching) to tell groups apart in a figure. |
Rtsne |
tSNE ordinations. |
uwot |
UMAP ordinations. |
ggdensity |
The density layer of ordination plots. |
lmerTest |
The strata option of the differential abundance forest
plot. |
svglite |
Saving figures as SVG. |
bcrypt |
Importing from an older atima. |
install.packages(c("readxl", "openxlsx", "zip", "fillpattern", "Rtsne", "uwot", "ggdensity", "lmerTest", "svglite"))
# phyloseq, from Bioconductor
install.packages("BiocManager")
BiocManager::install("phyloseq")Upgrading
Install the new version the same way as the first time, then start atima with the same data directory:
If the new version stores things differently, atima first saves a
copy of the database next to it, named
sqlite.db.v<N>.<date>.bak, where
<N> is the database’s version number before the
upgrade and <date> is the date and time in UTC. It
then upgrades sqlite.db in place. atima never deletes these
copies. Delete them yourself when you are satisfied that the upgrade
went well; each is as large as the database was.
A database cannot be opened by an older atima than the one that last
upgraded it. atima refuses to start and asks you to install a newer
version; to go back, restore the .bak copy (see
“Restoring”).
A data directory from atima 5.0.x
A data directory made by atima 5.0.x is upgraded the same way when
the server first starts on it. The copy is named
sqlite.db.v0.<date>.bak. atima 5.0.x had accounts
with passwords, and guests. A local atima has one user and no sign-in,
so every project and collection that any account or guest had in that
directory becomes the local user’s, and the old accounts are removed.
Nothing has to be claimed or imported.
Backing up
The data directory is all there is to back up. cache/
can be left out.
With the server stopped, copy the data directory.
When atima stops it writes everything into sqlite.db, so
the copy is complete.
While the server runs, do not copy
sqlite.db by itself. The database is in write-ahead logging
(WAL) mode, in which recent changes are in the
sqlite.db-wal file beside it, and a copy of one file
without the other can be incomplete or unreadable. Ask SQLite for a
consistent copy instead, from a second R session, and then copy the
files directory:
data_dir <- tools::R_user_dir("atima", "data")
backup_dir <- "D:/backups/atima-2026-11-13"
dir.create(backup_dir, recursive = TRUE)
con <- DBI::dbConnect(RSQLite::SQLite(), file.path(data_dir, "sqlite.db"))
RSQLite::sqliteCopyDatabase(con, file.path(backup_dir, "sqlite.db"))
DBI::dbDisconnect(con)
file.copy(file.path(data_dir, "files"), backup_dir, recursive = TRUE)Copy the database first and the files second, in that order, so that every file the database copy refers to is in the backup.
Restoring
Stop the server. Put the backup’s sqlite.db and
files directory into an empty directory and start atima
with that directory as data_dir. To restore into the
original data directory instead, first move its contents away, including
sqlite.db-wal and sqlite.db-shm if they are
there: they belong to the database that is being replaced.
When it does not start
Failed to create server. The port is in
use, often by an atima that is still running in another R session. Stop
that one, or choose another port:
atima::run(port = 8081).
The installed rbiom is too old for this version of atima.
rbiom’s version number stays at 4.0.0 until it is on CRAN, so an early
copy of rbiom 4 can be too old without its number saying so. Install the
current one and start again:
pak::pak("cmmr/rbiom")An error that mentions Pandoc, such as
Requested Pandoc binary is not available, while the example
projects are loaded or when you upload a file. R cannot find Pandoc. See
“Installing” above.
auth = "none" has no accounts, so it only runs on this computer.
You set host to an address that other computers can reach.
Without accounts atima only listens on this computer
(127.0.0.1, localhost or ::1) and
refuses to start otherwise. To let other people use it, see Running a shared server.
temp_dir must not be the same as data_dir, or inside it, or contain it.
Choose a temporary directory elsewhere. atima deletes old files in
temp_dir, and refuses a layout in which that could reach
your data.
This database has schema version ..., but this version of atima only knows up to ....
The data directory was last used by a newer atima. Install that version
or a later one.
The page says 403, “This server only answers requests made to
localhost”. You opened atima under a name other than
localhost, 127.0.0.1 or [::1],
for example the computer’s network name. Use the address
run() printed.
That took longer than the 60 seconds allowed, and was stopped,
in the browser. A figure, upload or export ran longer than
time_limit seconds. A local install has no limit unless one
was set, so this means atima was started with time_limit
(or ATIMA_TIME_LIMIT), or that you are using a shared
server. Start your own without a limit, atima::run(), and
run the analysis again.
When an error in the browser shows a short id, the line with the same
id in R’s console has the details.
Where to go next
- Where your data goes: what is stored, and what leaves your computer.
- Connecting an AI app: let an AI app explore your projects.
- Importing from an older atima: bring projects over from an atima 2 site.
- Running a shared server: atima for a lab or the public.