Install SeqDesk on AWS EC2
This guide creates a small SeqDesk test system on one Amazon EC2 instance. It assumes you have an AWS account but have not used EC2 before. The result is:
- SeqDesk and PostgreSQL on one Ubuntu server
- the SeqDesk user interface open in your browser
- automatic application restarts through PM2
- Conda and Nextflow for small pipeline tests
- optionally, a one-node Slurm setup for testing SeqDesk’s SLURM integration
The one-node Slurm setup is an integration smoke test; it does not add compute capacity. A real multi-node cluster has additional shared-filesystem and network requirements described later.
Security: SeqDesk is designed for a trusted internal network. The direct browser access below is only for a temporary test and is restricted to your current public IP. Never choose
Anywhereor0.0.0.0/0for the SeqDesk or SSH ports. Do not use real credentials or sequencing data in this HTTP-only setup. A permanent installation should use private/VPN access and HTTPS.
AWS changes its console occasionally. These labels match the console as checked in July 2026.
Before you start
You need an AWS account with permission to create and terminate EC2 instances, security groups, key pairs, and EBS volumes. Allow 45–90 minutes; the Conda environment is usually the slowest part.
AWS charges for running instances, EBS storage, data transfer, public IPv4 addresses, and sometimes surplus T3 CPU credits. Review the estimate on the EC2 launch screen and terminate test resources when finished.
| Goal | Instance | Root disk | Installer option |
|---|---|---|---|
| UI only | t3.medium (2 vCPU, 4 GiB) | 40 GiB gp3 | --without-pipelines |
| UI plus small pipeline/Slurm tests | t3.large (2 vCPU, 8 GiB) | 100 GiB gp3 | --with-pipelines |
This guide uses the second row and an x86_64 instance. It is not large enough for production MAG, MetaxPath, or other substantial analyses.
1. Launch an EC2 instance
-
Sign in to the AWS console .
-
Search for
EC2, then choose EC2. -
Select a nearby Region in the upper-right corner, for example Europe (Frankfurt) eu-central-1. Keep using that Region.
-
Choose Launch instance.
-
Under Name and tags, enter
seqdesk-test. -
Under Application and OS Images choose:
- Quick Start → Ubuntu
- Ubuntu Server 24.04 LTS
- 64-bit (x86) architecture
-
Under Instance type, choose
t3.large. -
Under Key pair (login) choose Create new key pair:
- Name:
seqdesk-test-key - Type:
RSA - Format:
.pem - choose Create key pair
Save
seqdesk-test-key.pemsecurely. AWS cannot display the private key again. - Name:
-
Under Network settings, choose Edit:
- VPC: the default VPC is sufficient for this test
- Subnet: No preference
- Auto-assign public IP: Enable
- Firewall: Create security group
- Name:
seqdesk-test-sg
-
Add only these inbound rules:
Type Port Source Purpose SSH 22 My IP Terminal access Custom TCP 8000 My IP SeqDesk UI Do not add PostgreSQL port
5432. Do not use Anywhere-IPv4 or Anywhere-IPv6. AWS recommends authorizing only the specific source ranges that need access; see security group rules . -
Under Configure storage, set a
100 GiBgp3root volume. Leave Delete on termination enabled for this disposable test. -
Review Summary, choose Launch instance, then View all instances.
-
Wait for Running and 2/2 checks passed.
See AWS’s launch-instance guide for the current wizard fields.
2. Note the URL and connect
On EC2 → Instances, select seqdesk-test and copy Public IPv4 address.
This guide calls it PUBLIC_IP. An automatically assigned address normally
changes after the instance is stopped and started.
Connect with SSH
Open Terminal on macOS/Linux or PowerShell on Windows. Change to the directory containing the key and run:
cd ~/Downloads
chmod 400 seqdesk-test-key.pem
ssh -i seqdesk-test-key.pem ubuntu@PUBLIC_IPReplace PUBLIC_IP with the copied address. Confirm the expected host by
entering yes. The EC2 prompt looks similar to:
ubuntu@ip-172-31-12-34:~$Or use the AWS browser terminal
- Select the instance and choose Connect.
- Choose EC2 Instance Connect → Connect using a Public IP.
- Confirm username
ubuntu, then choose Connect.
If unavailable, use SSH. EC2 Instance Connect can require an AWS-managed prefix
list for port 22; do not solve that by opening SSH to Anywhere. See the
AWS connection guide .
All remaining terminal commands run on EC2, not on your own computer.
3. Install prerequisites
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y curl ca-certificatesDo not install or start PostgreSQL yourself. Run the installer as the ubuntu
user and SeqDesk provisions its own private PostgreSQL cluster under
/home/ubuntu/.seqdesk/postgres (override the location with
SEQDESK_PG_HOME). That cluster is socket-only, opens no TCP port, is
peer-authenticated for its owner, and is started by SeqDesk’s start.sh rather
than by systemd. If the PostgreSQL server binaries are missing, the installer
installs the distro package itself using passwordless sudo. If you do install
and start the distro postgresql service first, SeqDesk adopts that system
server instead and then needs passwordless sudo to create its role and
database.
Install Node.js 22, SeqDesk, and PM2:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g seqdesk@latest pm2Verify them:
node --version
npm --version
seqdesk --helpExpect Node.js v22.13.0 or newer on the 22.x line (any 24.x also qualifies),
npm, and SeqDesk help. Stop if a command reports command not found. psql is
not required before the install; SeqDesk installs the PostgreSQL packages if
they are missing.
4. Install SeqDesk
Replace the example with the EC2 public address:
export SEQDESK_PUBLIC_IP="203.0.113.10"
printf 'SeqDesk URL will be http://%s:8000\n' "$SEQDESK_PUBLIC_IP"Run the guided install with pipeline support:
seqdesk \
--interactive \
--dir /home/ubuntu/seqdesk \
--port 8000 \
--nextauth-url "http://${SEQDESK_PUBLIC_IP}:8000" \
--with-pipelines \
--use-pm2 \
--run-doctorFor UI only, replace --with-pipelines with --without-pipelines; the Slurm
sections will then not apply.
Answer the prompts as follows:
- For Database — where should SeqDesk store its data?, enter
1for local PostgreSQL. PostgreSQL stays private on this instance. - Enter an administrator email and a strong test password. If the installer generates a password, save it immediately because it is shown once.
- Create a researcher account if you want to test both roles.
- Accept app port
8000. - At the review screen confirm:
/home/ubuntu/seqdesk- port
8000 http://PUBLIC_IP:8000- pipelines enabled
- Continue only if those values are correct.
The installer downloads SeqDesk, creates the database, installs Conda/Nextflow, starts PM2, and runs health checks. Do not close the terminal. At the end note the printed Browser URL, Install directory, and Log.
5. Enable startup after reboot
pm2 status
pm2 startupThe seqdesk row should be online. PM2 prints a command beginning with
sudo env ... pm2 startup. Copy and run that complete command on this EC2
instance, then save the process list:
pm2 save6. Verify the application
seqdesk doctor --dir /home/ubuntu/seqdesk --url http://127.0.0.1:8000
curl -fsS http://127.0.0.1:8000/api/setup/statusThe doctor should confirm the files, configuration, PostgreSQL, authentication, and HTTP endpoint. Fix failures before proceeding.
Useful commands:
pm2 status
pm2 logs seqdesk --lines 100
pm2 restart seqdeskPress Ctrl+C to leave live logs without stopping SeqDesk.
7. Open and navigate the UI
-
On your own computer, open the printed URL, for example:
http://203.0.113.10:8000 -
Sign in with the administrator account.
-
A browser may label this HTTP page not secure. This is why access is limited to your IP and this setup is only for testing.
-
Choose Settings → Infrastructure → Open Data Storage and test that the sequencing directory is writable.
-
Return to Settings → Infrastructure → Open Pipeline Runtime. Conda and run-directory checks should pass. Leave Use SLURM off for now.
-
Choose Settings → Info. Under Demo data, turn Load dummy data on if you want small synthetic orders and FASTQ files for testing.
The application is now usable. Continue only if you also want the Slurm smoke test.
8. Optional one-node Slurm smoke test
This installs controller, submit client, and compute daemon on the same EC2 instance. It tests SeqDesk’s scheduler integration but does not add capacity. SchedMD’s quick start likewise describes a one-node controller/compute arrangement as a test.
Continue only with t3.large and --with-pipelines.
Install and configure Slurm
sudo apt-get update
sudo apt-get install -y slurm-wlm munge
sudo systemctl enable --now mungeGenerate the node line from the EC2 hardware and write a minimal configuration:
SLURM_NODE="$(hostname -s)"
SLURM_NODE_CONFIG="$(slurmd -C | sed -n '1p')"
{
printf 'ClusterName=seqdesk\n'
printf 'SlurmctldHost=%s\n' "$SLURM_NODE"
printf 'SlurmUser=slurm\n'
printf 'AuthType=auth/munge\n'
printf 'MpiDefault=none\n'
printf 'ProctrackType=proctrack/linuxproc\n'
printf 'ReturnToService=2\n'
printf 'SchedulerType=sched/backfill\n'
printf 'SelectType=select/cons_tres\n'
printf 'SelectTypeParameters=CR_Core_Memory\n'
printf 'StateSaveLocation=/var/spool/slurmctld\n'
printf 'SlurmdSpoolDir=/var/spool/slurmd\n'
printf 'SlurmctldPidFile=/run/slurmctld.pid\n'
printf 'SlurmdPidFile=/run/slurmd.pid\n'
printf '%s State=UNKNOWN\n' "$SLURM_NODE_CONFIG"
printf 'PartitionName=cpu Nodes=%s Default=YES MaxTime=INFINITE State=UP\n' "$SLURM_NODE"
} | sudo tee /etc/slurm/slurm.conf >/dev/nullStart the services:
sudo install -d -o slurm -g slurm /var/spool/slurmctld
sudo install -d -o root -g root /var/spool/slurmd
sudo systemctl enable --now slurmctld slurmd
sudo systemctl restart slurmctld slurmdVerify one idle node and submit a short job:
sinfo
scontrol show node "$(hostname -s)"
SLURM_TEST_JOB="$(sbatch --parsable --partition=cpu --cpus-per-task=1 --mem=256M --wrap='hostname; sleep 10')"
printf 'Submitted Slurm job %s\n' "$SLURM_TEST_JOB"
squeue -j "$SLURM_TEST_JOB"sinfo should show partition cpu with one idle node. The test job briefly
appears as pending/running and then disappears.
Prevent nested-job deadlock on one node
On a real cluster Nextflow submits Slurm jobs per process. On one node, the outer SeqDesk job can reserve resources while nested jobs wait for them. Use one allocation for this smoke test and persist it in PM2:
export SEQDESK_SLURM_INLINE_EXECUTOR=1
pm2 restart seqdesk --update-env
pm2 saveDo not use this setting on a real multi-node cluster.
Enable Slurm in the UI
- Choose Settings → Infrastructure → Open Pipeline Runtime.
- Turn Use SLURM on and choose Test. It should report available.
- Set Queue/Partition to
cpu. - Choose Show beside Advanced Configuration and enter:
- CPU Cores:
2 - Memory:
6GB - Time Limit:
2hours - Additional SLURM Options: blank
- Nextflow Profile Override: blank
- CPU Cores:
- Choose Save Runtime Settings and wait for Saved!.
Do not save Slurm as the default if Test fails.
Run FASTQ Checksum through Slurm
- Choose Settings → Pipelines → Installed and confirm FASTQ Checksum is installed and Enabled. If under Available, choose Install, then Enable.
- Under Settings → Info, turn Load dummy data on if needed.
- Choose Sequencing Orders and open the seeded submitted order with reads.
- Choose FASTQ Checksum in the order pipeline navigation.
- Under Execution Target, choose SLURM.
- Choose Run All Ready and confirm any raw-read warning.
- Watch queued → running → completed. R1/R2 checksum prefixes should appear.
In the EC2 terminal you can also run:
squeue
pm2 logs seqdesk --lines 100The checksum test may finish before squeue refreshes. SeqDesk’s run details
and logs are the final verification.
Moving to a real AWS Slurm cluster
Use an established deployment such as AWS ParallelCluster instead of manually adding nodes to the smoke-test configuration.
SeqDesk requires all of the following:
-
Run SeqDesk on the submit/head node, or where
sbatch,squeue,sacct, andscancelwork. -
Mount sequencing data and the pipeline run directory at identical absolute paths on every compute node (for example through EFS or FSx).
-
Make installed pipeline workflow paths visible at the same absolute paths on compute nodes. Installing SeqDesk under
/shared/seqdeskis the simplest first arrangement; sharing only the run directory is insufficient. -
Share the Conda installation and Nextflow cache at identical paths, or give compute nodes outbound access. A pre-populated shared cache is more reliable.
-
Use the same Unix identity and permissions across submit and compute nodes.
-
If weblog callbacks are enabled, compute nodes must reach the configured SeqDesk
/api/pipelines/weblogURL; it cannot belocalhostremotely. -
Enter real queues, resources, shared paths, and optional weblog settings under Settings → Infrastructure → Open Pipeline Runtime.
-
Disable the one-node mode, restart, and save PM2:
export SEQDESK_SLURM_INLINE_EXECUTOR=0 pm2 restart seqdesk --update-env pm2 save -
Use Test and a checksum run before a large analysis.
ParallelCluster can scale compute nodes down, but head-node and shared-storage resources still cost money.
Routine operations
Status and restart
pm2 status
pm2 logs seqdesk --lines 200
seqdesk doctor --dir /home/ubuntu/seqdesk --url http://127.0.0.1:8000
pm2 restart seqdeskAfter stopping and starting
Copy the new EC2 public address, then run:
export SEQDESK_PUBLIC_IP="NEW_PUBLIC_IP"
seqdesk -y \
--reconfigure \
--dir /home/ubuntu/seqdesk \
--nextauth-url "http://${SEQDESK_PUBLIC_IP}:8000"
pm2 restart seqdeskUpdate both security-group rules with My IP if your own IP changed. A static Elastic IP avoids server-address changes but is charged.
Before using real data, implement and test PostgreSQL backups plus EBS/file backups. Do not rely on one EBS volume as the only copy.
Troubleshooting
For application failures, start with the local health check before changing the security group or replacing files:
seqdesk doctor --dir /home/ubuntu/seqdesk --url http://127.0.0.1:8000SSH or EC2 Instance Connect cannot connect
Confirm the instance is Running with 2/2 checks passed, then copy its
current public IPv4 address again. For an Ubuntu AMI the SSH user is ubuntu,
and a downloaded private key must not be readable by other users:
chmod 400 seqdesk-test-key.pem
ssh -i seqdesk-test-key.pem ubuntu@PUBLIC_IPCheck that the instance’s active security group allows TCP 22 from your
current public IP. If your network address changed, update My IP; do not
open SSH to Anywhere. AWS’s
Linux connection troubleshooting
also covers incorrect usernames, keys, routes, public addresses, and failed
instance checks.
Browser cannot open port 8000
pm2 status
curl -v http://127.0.0.1:8000/api/setup/status
sudo ss -ltnp | grep ':8000'If local curl works, open EC2 → Security Groups → seqdesk-test-sg → Edit
inbound rules. Port 8000 must use your current My IP. Save the rule; do
not change it to Anywhere. Use the public address, not an address beginning
with 10., 172.16–172.31, or 192.168.
SeqDesk is offline after a reboot
Use the same Linux user that installed SeqDesk; running PM2 with sudo creates
a separate root-owned process list.
pm2 status
pm2 logs seqdesk --lines 100
pm2 resurrectIf the saved process list is missing, recreate only the SeqDesk process:
pm2 start /home/ubuntu/seqdesk/start.sh --name seqdesk
pm2 save
pm2 startupPoint PM2 at the root start.sh, not current/start.sh. That wrapper also
starts SeqDesk’s private PostgreSQL cluster, which is deliberately not a
systemd service; if the application returns but the database does not, check
/home/ubuntu/.seqdesk/postgres/server.log.
Run the complete sudo env ... pm2 startup command printed by the last command,
then run pm2 save once more. If the installer selected a local PM2 binary,
use the exact PM2 command it printed instead of the global pm2 shown here.
Installer fails
Rerun the failing command with --verbose first. It prints the diagnostic
detail that otherwise goes only to the install log, which usually names the
failing step directly. Then collect:
command -v node npm seqdesk
node --version
sudo -n true
# SeqDesk-owned private cluster: socket-only, no TCP listener
pg_isready -h /home/ubuntu/.seqdesk/postgres/socket
tail -n 50 /home/ubuntu/.seqdesk/postgres/server.log
# only if you adopted a system PostgreSQL instead
pg_isready -h 127.0.0.1 -p 5432
sudo systemctl status postgresql --no-pager
sudo journalctl -u postgresql -n 100 --no-pager
SEQDESK_INSTALL_LOG="$(ls -1t /tmp/seqdesk-install-*.log | head -n 1)"
printf 'Installer log: %s\n' "$SEQDESK_INSTALL_LOG"
tail -n 100 "$SEQDESK_INSTALL_LOG"
df -h
free -hNode must be at least 22.13.0 on the 22.x line; any 24.x also qualifies,
while 23.x and 25 or newer are rejected outright. sudo -n true only needs to
succeed when the installer has to install the PostgreSQL server package, or
when a distro PostgreSQL is already running and SeqDesk must create the role
and database through sudo -n -u postgres psql. When SeqDesk provisions its
own private cluster it uses no sudo at all, and you must not run the
installer under sudo, because it refuses to create a cluster owned by root.
Keep PostgreSQL port 5432 closed in the security group even while diagnosing
it.
If Conda or Nextflow setup runs out of memory or disk, resize the instance/EBS
volume or reinstall this disposable test with --without-pipelines. If a failed
attempt already created the target, verify that it is the incomplete test
directory and contains no needed data before intentionally replacing it with
--overwrite-existing; do not use that flag on a working installation.
Remove credentials and tokens before sharing logs. The general installer checklist explains Node, target-directory, database, download, and process-manager failures in more detail.
Slurm fails or jobs stay pending
sudo systemctl status munge slurmctld slurmd --no-pager
sudo journalctl -u munge -u slurmctld -u slurmd -n 100 --no-pager
squeue -o '%.18i %.9P %.20j %.2t %.10M %R'
sinfo -N -l
scontrol show job JOB_IDCompare hostname -s with SlurmctldHost, NodeName, and PartitionName in
/etc/slurm/slurm.conf. If a job reports Resources, reduce CPU/memory in
Pipeline Runtime. This test uses 2 cores and 6GB.
If a one-node pipeline queues but internal work never starts:
export SEQDESK_SLURM_INLINE_EXECUTOR=1
pm2 restart seqdesk --update-env
pm2 saveStop or delete the test
To keep it, select the instance and choose Instance state → Stop instance. Compute billing stops, but EBS still costs money, as does an Elastic IP attached to a stopped instance. The automatic public address is released and normally changes when restarted.
To delete it permanently:
- Export or snapshot anything needed; termination is destructive.
- Choose Instance state → Terminate (delete) instance and confirm.
- Check EC2 → Volumes for volumes configured to survive termination.
- Disassociate and release any Elastic IP.
- Remove
seqdesk-test-sgand theseqdesk-test-keyAWS record if unused.
See AWS’s stop/start behavior for details.