Short answer
DSpace 10.1 needs Java 21, Maven 3.9, Ant, PostgreSQL 15 to 17, Solr 9 and Node 22. Build the backend with mvn package and ant fresh_install, run /dspace/webapps/server-boot.jar as a systemd service (no Tomcat), then build the web interface with npm run build:prod and run it as a second service. On 8 GB of RAM the web build needs a 4 GB swap file.
Tested on Ubuntu 26.04 and 24.04, two separate runs. On 24.04? 3 sections differ, each step marked “On Ubuntu 24.04” right under it: Step 1: Install Java 21, Maven, Ant and Node, Step 2: PostgreSQL and the database, Step 10: Run the web interface as a service. Everything that differed
Before you start
- A fresh Ubuntu 26.04 or 24.04 server with 8 GB of RAM and about 10 GB free disk. The test server had 4 CPUs and 8 GB; that was enough only with swap for one step (step 9).
- A sudo user, logged in over SSH.
- About an hour: the builds take most of it.
- This guide keeps every DSpace part on
localhost. Opening it to the internet with a name and HTTPS is the next guide in the series.
Step 1: Install Java 21, Maven, Ant and Node
$ sudo apt update[… 46 lines not shown …]Fetched 30.1 MB in 2s (14.7 MB/s)5 packages can be upgraded. Run 'apt list --upgradable' to see them.$ sudo apt install -y openjdk-21-jdk-headless ant git curl unzip maven nodejs npmOn Ubuntu 24.04
Ubuntu 24.04’s own Maven and Node are too old for DSpace 10 (it needs Maven 3.9 and Node 20.19 or newer):
$ sudo apt install -y openjdk-21-jdk-headless ant git curl unzip$ apt-cache policy maven nodejs | grep -E "^[a-z]|Candidate"maven: Candidate: 3.8.7-2nodejs: Candidate: 18.19.1+dfsg-6ubuntu5So install Maven and Node from their projects’ own downloads, each checked against its published checksum:
$ cd /tmp && curl -fsSLO https://archive.apache.org/dist/maven/maven-3/3.9.12/binaries/apache-maven-3.9.12-bin.tar.gz && curl -fsSLO https://archive.apache.org/dist/maven/maven-3/3.9.12/binaries/apache-maven-3.9.12-bin.tar.gz.sha512 && echo "$(cat apache-maven-3.9.12-bin.tar.gz.sha512) apache-maven-3.9.12-bin.tar.gz" | sha512sum -c - && sudo tar xzf apache-maven-3.9.12-bin.tar.gz -C /opt && sudo ln -sf /opt/apache-maven-3.9.12/bin/mvn /usr/local/bin/mvnapache-maven-3.9.12-bin.tar.gz: OK$ cd /tmp && curl -fsSLO https://nodejs.org/dist/v22.22.1/node-v22.22.1-linux-x64.tar.xz && curl -fsSLO https://nodejs.org/dist/v22.22.1/SHASUMS256.txt && grep " node-v22.22.1-linux-x64.tar.xz$" SHASUMS256.txt | sha256sum -c - && sudo tar xJf node-v22.22.1-linux-x64.tar.xz -C /opt && for b in node npm npx; do sudo ln -sf /opt/node-v22.22.1-linux-x64/bin/$b /usr/local/bin/$b; donenode-v22.22.1-linux-x64.tar.xz: OKCheck every version before you build anything:
$ java -version 2>&1 | head -n 1; mvn -version | head -n 1; ant -version; node --version; npm --versionopenjdk version "21.0.13.1" 2026-11-17Apache Maven 3.9.12Apache Ant(TM) version 1.10.15 compiled on January 13 2026v22.22.19.2.0Step 2: PostgreSQL and the database
DSpace 10 supports PostgreSQL 15, 16 and 17. Ubuntu 26.04 ships 18:
$ apt-cache policy postgresql | grep Candidate Candidate: 18+290ubuntu1So on 26.04, install 17 from the PostgreSQL project’s own repository. Ubuntu’s postgresql-common package includes the script that adds it:
$ sudo apt install -y postgresql-common$ sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y[… 16 lines not shown …]You can now start installing packages from apt.postgresql.org. Have a look at https://wiki.postgresql.org/wiki/Apt for more information;most notably the FAQ at https://wiki.postgresql.org/wiki/Apt/FAQ$ sudo apt install -y postgresql-17On Ubuntu 24.04
Ubuntu 24.04’s own PostgreSQL is 16, which DSpace supports, so install it directly:
$ sudo apt install -y postgresql$ pg_lsclustersVer Cluster Port Status Owner Data directory Log file17 main 5432 online postgres /var/lib/postgresql/17/main /var/log/postgresql/postgresql-17-main.logCreate the dspace database user and database with a password of your own. Type it here once, and the commands below use it:
Optional · makes the commands copy-paste ready
Choose a strong password for the dspace database user. The commands in steps 2 and 5 and the local.cfg below then use it.
It is the password you choose in step 2; local.cfg in step 5 uses the same one.
You can skip this: then replace [password] with your own value in each command and file below before you run it. A password typed here is kept only while this page is open, never saved or sent.
$ sudo -u postgres psql -c "CREATE USER dspace WITH PASSWORD '[password]';" && sudo -u postgres createdb --owner=dspace --encoding=UNICODE dspace && sudo -u postgres psql -c '\l dspace'CREATE ROLE List of databases Name | Owner | Encoding | Locale Provider | Collate | Ctype | Locale | ICU Rules | Access privileges--------+--------+----------+-----------------+-------------+-------------+--------+-----------+------------------- dspace | dspace | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | |(1 row)Step 3: The dspace user and /dspace
DSpace runs as its own user. The build steps run as that user too (sudo -iu dspace), so it gets a shell; it has no password, so nobody can log in as it over SSH. /dspace is where DSpace is installed:
$ sudo useradd --system --create-home --home-dir /home/dspace --shell /bin/bash dspace && sudo mkdir /dspace && sudo chown dspace:dspace /dspace && ls -ld /dspace /home/dspacedrwxr-xr-x 2 dspace dspace 4096 Nov 19 23:21 /dspacedrwxr-x--- 2 dspace dspace 4096 Nov 19 23:21 /home/dspaceIf you see “Permission denied” on /home/dspace
$ ls /home/dspacels: cannot open directory '/home/dspace': Permission denied$ grep ^HOME_MODE /etc/login.defs; stat -c "%a %U %n" /home/dspaceHOME_MODE 0750750 dspace /home/dspaceBoth Ubuntu 26.04 and 24.04 make new home folders mode 750, so only dspace may look inside. That is fine: every command that works in /home/dspace below starts with sudo -iu dspace. Do not loosen the mode.
Step 4: Solr 9, on localhost only
Ubuntu does not package Solr. Download Apache’s release and check it against its SHA-512:
$ cd /tmp && curl -fsSLO https://downloads.apache.org/solr/solr/9.11.0/solr-9.11.0.tgz && curl -fsSLO https://downloads.apache.org/solr/solr/9.11.0/solr-9.11.0.tgz.sha512 && sha512sum -c solr-9.11.0.tgz.sha512solr-9.11.0.tgz: OKdownloads.apache.org has only current releases. If that URL answers 404, a newer Solr 9 is out: use its number, or the same path on archive.apache.org, which keeps every release but was very slow in our tests (about 190 KB/s).
Solr ships a script that installs it as a service; -n leaves it stopped so you can set two options first:
$ cd /tmp && tar xzf solr-9.11.0.tgz solr-9.11.0/bin/install_solr_service.sh --strip-components=2 && sudo bash ./install_solr_service.sh solr-9.11.0.tgz -n[… 13 lines not shown …] Service solr installed.Customize Solr startup configuration in /etc/default/solr.in.shNot starting Solr service (option -n given). Start manually with 'service solr start'$ echo 'SOLR_OPTS="$SOLR_OPTS -Dsolr.config.lib.enabled=true"' | sudo tee -a /etc/default/solr.in.sh && echo 'SOLR_JETTY_HOST="127.0.0.1"' | sudo tee -a /etc/default/solr.in.sh && sudo systemctl start solrSOLR_OPTS="$SOLR_OPTS -Dsolr.config.lib.enabled=true"SOLR_JETTY_HOST="127.0.0.1"The first option lets DSpace’s Solr cores load their extra libraries. The second keeps Solr on 127.0.0.1: Solr has no password in this setup, and DSpace cannot use one, so it must never be reachable from outside.
$ sudo ss -ltnp | grep 8983LISTEN 0 50 [::ffff:127.0.0.1]:8983 *:* users:(("java",pid=14436,fd=47))Step 5: The DSpace source and local.cfg
$ sudo -iu dspace bash -c "mkdir -p src && curl -fsSL https://github.com/DSpace/DSpace/archive/refs/tags/dspace-10.1.tar.gz | tar xz -C src && ls src"DSpace-dspace-10.1local.cfg holds your settings. Start from the example and set the database password from step 2 (the command already has it if you typed it above); the defaults already point at this server’s PostgreSQL, Solr, backend and web interface:
$ sudo -iu dspace bash -c "cd src/DSpace-dspace-10.1/dspace/config && cp local.cfg.EXAMPLE local.cfg && sed -i 's/^db.password = .*/db.password = [password]/' local.cfg && grep -E '^(dspace\.(dir|server\.url|ui\.url|name)|solr\.server|db\.(url|username|password))' local.cfg"dspace.dir=/dspacedspace.server.url = http://localhost:8080/serverdspace.ui.url = http://localhost:4000dspace.name = DSpace at My Universitydb.url = jdbc:postgresql://localhost:5432/dspacedb.username = dspacedb.password = [password]Change dspace.name to your repository’s name now or later.
Step 6: Build and install the backend
$ sudo -iu dspace bash -c "cd src/DSpace-dspace-10.1 && time mvn package -B -ntp 2>&1 | tail -n 14"[INFO] DSpace SAML 2 ...................................... SUCCESS [ 12.773 s][INFO] DSpace RDF ......................................... SUCCESS [ 2.107 s][INFO] DSpace SWORD ....................................... SUCCESS [ 4.853 s][INFO] DSpace SWORD v2 .................................... SUCCESS [ 4.247 s][INFO] DSpace Server Webapp ............................... SUCCESS [ 50.603 s][INFO] DSpace Server Webapp:: Tomcat deployable WAR ....... SUCCESS [ 9.955 s][INFO] DSpace Server Webapp:: Executable JAR .............. SUCCESS [ 3.340 s][INFO] DSpace Assembly and Configuration .................. SUCCESS [ 3.617 s][INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESS[INFO] ------------------------------------------------------------------------[INFO] Total time: 03:31 min[INFO] Finished at: 2026-11-19T23:25:27Z[INFO] ------------------------------------------------------------------------ real 3m32.330suser 6m58.285ssys 0m18.446sMaven downloads about 500 MB of libraries the first time. A download that fails halfway (“Could not transfer artifact … transfer failed”) is a network problem: run the same command again, and it carries on from what it already has.
$ sudo -iu dspace bash -c "cd src/DSpace-dspace-10.1/dspace/target/dspace-installer && ant fresh_install 2>&1 | tail -n 12" [echo] [echo] /dspace/bin/dspace create-administrator [echo] [echo] You should then be able to access your DSpace's REST API: [echo] [echo] http://localhost:8080/server [echo] [echo] ==================================================================== [echo] BUILD SUCCESSFULTotal time: 6 secondsCreate the tables, then list them:
$ sudo -iu dspace bash -c "/dspace/bin/dspace database migrate 2>&1 | tail -n 5; /dspace/bin/dspace database info 2>&1 | tail -n 10" Database URL: jdbc:postgresql://localhost:5432/dspaceMigrating database to latest version... (Check dspace logs for details)Done.| Versioned | 8.0.2023.08.07 | qaevent processed | SQL | 2026-11-19 23:25:57 | Success | No || Versioned | 8.0.2024.02.14 | ldn tables | SQL | 2026-11-19 23:25:57 | Success | No || Versioned | 8.4.2026.03.28 | Fix-bundle2bitstream-with-deleted-bitstreams | SQL | 2026-11-19 23:25:57 | Success | No || Versioned | 9.0.2024.11.09 | ldn service external actor | SQL | 2026-11-19 23:25:57 | Success | No || Versioned | 9.0.2025.02.13 | add access colums to requestitem table | SQL | 2026-11-19 23:25:57 | Success | No || Versioned | 9.0.2025.03.12 | registration data | SQL | 2026-11-19 23:25:57 | Success | No || Versioned | 10.0.2026.01.07 | create table items for update | SQL | 2026-11-19 23:25:57 | Success | No || Versioned | 10.0.2026.02.18 | add columns security level metadata value | SQL | 2026-11-19 23:25:57 | Success | No |+-----------+-----------------+------------------------------------------------------------------+----------+---------------------+----------+----------+The installer created DSpace’s Solr cores in /dspace/solr; copy them into Solr and restart it:
$ sudo cp -R /dspace/solr/* /var/solr/data/ && sudo chown -R solr:solr /var/solr/data && sudo systemctl restart solr$ curl -s 'http://localhost:8983/solr/admin/cores?action=STATUS&wt=json' | python3 -c 'import json,sys;print(sorted(json.load(sys.stdin)["status"]))'['audit', 'authority', 'oai', 'qaevent', 'search', 'statistics', 'suggestion']Seven cores. (The official guide says six; DSpace 10.1 installs seven.)
Step 7: Run the backend as a service
Since DSpace 8 the backend is a self-contained jar, so Tomcat is not needed. --server.address=127.0.0.1 keeps it on localhost; -Xmx2g gives it 2 GB of memory; SuccessExitStatus=143 tells systemd that Java’s exit on a normal stop is not a failure:
$ sudo tee /etc/systemd/system/dspace.service > /dev/null <<'EOF'[Unit]Description=DSpace backend (REST API)After=network.target postgresql.service solr.serviceWants=postgresql.service solr.service [Service]User=dspaceWorkingDirectory=/dspaceExecStart=/usr/bin/java -Xmx2g -Dfile.encoding=UTF-8 -jar /dspace/webapps/server-boot.jar --server.address=127.0.0.1SuccessExitStatus=143Restart=on-failure [Install]WantedBy=multi-user.targetEOF$ sudo systemctl daemon-reload && sudo systemctl enable --now dspaceCreated symlink '/etc/systemd/system/multi-user.target.wants/dspace.service' → '/etc/systemd/system/dspace.service'.It takes about half a minute to start. Then the REST API answers, and so does OAI-PMH (which needs the oai Solr core):
$ curl -s http://localhost:8080/server/api | grep -o '"dspaceVersion" *: *"[^"]*"'"dspaceVersion" : "DSpace 10.1"$ curl -s 'http://localhost:8080/server/oai/request?verb=Identify' | grep -o '<repositoryName>[^<]*</repositoryName>\|<protocolVersion>[^<]*</protocolVersion>'<repositoryName>DSpace at My University</repositoryName><protocolVersion>2.0</protocolVersion>Step 8: Create the administrator
Run it in your SSH session, not from a script: it asks its questions on the terminal, and the password is not shown or saved in your shell history.
$ sudo -iu dspace /dspace/bin/dspace create-administratorCreating an initial administrator accountE-mail address: admin@repo.testFirst name: AdaLast name: AdminIs the above data correct? (y or n): yPassword will not display on screen.Password:Again to confirm:Administrator account createdIf you see “Cannot invoke java.io.Console.readLine() because console is null”
$ sudo -iu dspace /dspace/bin/dspace create-administrator < /dev/nullCreating an initial administrator accountE-mail address: Exception: Cannot invoke "java.io.Console.readLine()" because "console" is nulljava.lang.NullPointerException: Cannot invoke "java.io.Console.readLine()" because "console" is null[… 8 lines not shown …]The tool was run without a terminal: from a script, through a pipe, or with ssh server command (no -t). Run it in an interactive session as above.
Step 9: Build the web interface
$ sudo -iu dspace bash -c "curl -fsSL https://github.com/DSpace/dspace-angular/archive/refs/tags/dspace-10.1.tar.gz | tar xz -C src && cd src/dspace-angular-dspace-10.1 && time npm ci 2>&1 | tail -n 14" > dspace-angular@10.1.0 build:lint> rimraf --glob 'lint/dist/**/*.js' 'lint/dist/**/*.js.map' && tsc -b lint/tsconfig.json added 1750 packages, and audited 1751 packages in 1m 397 packages are looking for funding run `npm fund` for details 76 vulnerabilities (2 low, 50 moderate, 19 high, 5 critical) To address issues that do not require attention, run: npm audit fix To address all issues (including breaking changes), run: npm audit fix --force Run `npm audit` for details. real 1m16.995suser 1m23.777ssys 0m14.403sThe audit warnings are about build tools and come with every DSpace release; they do not stop the install. Now the build. With Node’s default memory limit it fails:
If you see “JavaScript heap out of memory”
$ sudo -iu dspace bash -o pipefail -c "cd src/dspace-angular-dspace-10.1 && npm run build:prod 2>&1 | grep -m 1 -E 'heap out of memory|FATAL ERROR'"FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memoryNode stops at about 2 GB unless told otherwise; the build needs more. Give it 4 GB with NODE_OPTIONS. On an 8 GB server with the backend and Solr running, that is still not enough:
If the build just says “Killed”
$ sudo -iu dspace bash -o pipefail -c "cd src/dspace-angular-dspace-10.1 && time NODE_OPTIONS=--max-old-space-size=4096 npm run build:prod 2>&1 | tail -n 8"Warning: /home/dspace/src/dspace-angular-dspace-10.1/src/themes/custom/lazy-listable-components.ts is part of the TypeScript compilation but it's unused.Add only entry points to the 'files' or 'include' properties in your tsconfig. Warning: bundle initial exceeded maximum budget. Budget 3.00 MB was not met by 466.47 kB with a total of 3.47 MB. - Generating server application bundles (phase: setup)...Killed real 7m12.171suser 12m51.264ssys 0m33.634s$ sudo dmesg | grep -iE 'out of memory|oom-kill' | cut -c1-160 | tail -n 2[ 1384.501927] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-53.scope,ta[ 1384.501994] Out of memory: Killed process 17986 (ng run dspace-a) total-vm:50442368kB, anon-rss:5009840kB, file-rss:2972kB, shmem-rss:0kB, UID:999 pgtables:1The kernel ran out of memory and killed the build (ng run) after about 7 minutes, at about 5 GB. Add a 4 GB swap file for the build (how swap files work):
$ sudo fallocate -l 4G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile && swapon --showSetting up swapspace version 1, size = 4 GiB (4294963200 bytes)no label, UUID=d85e97be-2d28-4a23-934e-e042d0f5f1c5NAME TYPE SIZE USED PRIO/swapfile file 4G 0B -1$ sudo -iu dspace bash -o pipefail -c "cd src/dspace-angular-dspace-10.1 && time NODE_OPTIONS=--max-old-space-size=4096 npm run build:prod 2>&1 | tail -n 8" Warning: /home/dspace/src/dspace-angular-dspace-10.1/src/themes/custom/eager-theme-components.ts is part of the TypeScript compilation but it's unused.Add only entry points to the 'files' or 'include' properties in your tsconfig. Warning: /home/dspace/src/dspace-angular-dspace-10.1/src/themes/custom/lazy-listable-components.ts is part of the TypeScript compilation but it's unused.Add only entry points to the 'files' or 'include' properties in your tsconfig. real 4m4.113suser 7m15.807ssys 0m18.570sIt finishes in about 4 minutes; only the two warnings, no error. The swap is only for the build, so remove it again:
$ sudo swapoff /swapfile && sudo rm /swapfile && free -m total used free shared buff/cache availableMem: 7740 2433 4807 398 1163 5306Swap: 0 0 0Step 10: Run the web interface as a service
Copy the built files to ~/ui and give them their settings. The web interface listens on 127.0.0.1:4000 and finds the backend at localhost:8080:
$ sudo -iu dspace bash -c "mkdir -p ui/config && cp -r src/dspace-angular-dspace-10.1/dist ui/ && cat > ui/config/config.prod.yml" <<'EOF'ui: ssl: false host: 127.0.0.1 port: 4000 baseUrl: http://localhost:4000 nameSpace: /rest: ssl: false host: localhost port: 8080 nameSpace: /serverEOFDSpace has a test for exactly these settings:
$ sudo -iu dspace bash -c "cd src/dspace-angular-dspace-10.1 && cp ~/ui/config/config.prod.yml config/ && npm run test:rest 2>&1 | tail -n 12"Overriding app config with /home/dspace/src/dspace-angular-dspace-10.1/config/config.ymlOverriding app config with /home/dspace/src/dspace-angular-dspace-10.1/config/config.prod.yml...Testing connection to REST API at http://localhost:8080/server/api... RESPONSE: 200 Checking JSON returned for validity... "dspaceVersion" = DSpace 10.1 "dspaceUI" = http://localhost:4000 "dspaceServer" = http://localhost:8080/server "dspaceServer" property matches UI's "rest" config? true Does "/api" endpoint have HAL links ("_links" section)? true$ sudo tee /etc/systemd/system/dspace-ui.service > /dev/null <<'EOF'[Unit]Description=DSpace web interfaceAfter=network.target dspace.serviceWants=dspace.service [Service]User=dspaceWorkingDirectory=/home/dspace/uiEnvironment=NODE_ENV=productionExecStart=/usr/bin/node dist/server/main.jsRestart=on-failure [Install]WantedBy=multi-user.targetEOFOn Ubuntu 24.04
On 24.04 Node is the one from step 1 in /usr/local/bin, so the unit’s ExecStart= starts with /usr/local/bin/node:
$ sudo tee /etc/systemd/system/dspace-ui.service > /dev/null <<'EOF'[Unit]Description=DSpace web interfaceAfter=network.target dspace.serviceWants=dspace.service [Service]User=dspaceWorkingDirectory=/home/dspace/uiEnvironment=NODE_ENV=productionExecStart=/usr/local/bin/node dist/server/main.jsRestart=on-failure [Install]WantedBy=multi-user.targetEOF$ sudo systemctl daemon-reload && sudo systemctl enable --now dspace-uiCreated symlink '/etc/systemd/system/multi-user.target.wants/dspace-ui.service' → '/etc/systemd/system/dspace-ui.service'.$ curl -s http://localhost:4000/ | grep -o '<title>[^<]*</title>'<title>DSpace Repository :: Home</title>Step 11: Check it after a reboot
After sudo reboot and a minute or two, all four services are back by themselves:
$ systemctl is-active postgresql solr dspace dspace-uiactiveactiveactiveactive$ sudo ss -ltnp | awk 'NR==1 || /:(22|4000|8080|8983|5432) /{print $4, $6}'Local Peer127.0.0.1:4000 users:(("node",pid=1635,fd=21))127.0.0.1:5432 users:(("postgres",pid=1150,fd=7))0.0.0.0:22 users:(("sshd",pid=1089,fd=3),("systemd",pid=1,fd=111))[::1]:5432 users:(("postgres",pid=1150,fd=6))[::ffff:127.0.0.1]:8080 users:(("java",pid=1634,fd=13))[::]:22 users:(("sshd",pid=1089,fd=4),("systemd",pid=1,fd=112))[::ffff:127.0.0.1]:8983 users:(("java",pid=1264,fd=47))Only SSH listens on the public address. PostgreSQL, Solr, the backend and the web interface are all on localhost. How much memory it all uses once running:
$ free -m && ps -eo rss,args --sort=-rss | head -n 4 | cut -c1-90 total used free shared buff/cache availableMem: 7740 2160 5321 22 518 5579Swap: 0 0 0 RSS COMMAND811384 /usr/bin/java -Xmx2g -Dfile.encoding=UTF-8 -jar /dspace/webapps/server-boot.jar --s750752 java -server -Xms512m -Xmx512m -XX:+UseG1GC -XX:+PerfDisableSharedMem -XX:+Parallel203276 /usr/bin/node dist/server/main.jsAbout 2 GB in use: the backend and Solr take about 750 MB each, the web interface about 200 MB. 8 GB is plenty to run it; it was the build that needed more.
Step 12: Open it in your browser
Everything is on localhost, so reach it through an SSH tunnel from your own computer. Forward both ports: the page loads from 4000, and your browser then calls the REST API on 8080 itself. With 4000 alone, the page shows “Service unavailable”.
On your computer: ssh -L 4000:localhost:4000 -L 8080:localhost:8080 you@your-server, then open http://localhost:4000. Accept or decline the cookie notice, then click Log In (1):

Enter the administrator’s email (1) and password (2) from step 8. On the first sign-in DSpace opens its End User Agreement page; the admin menu appears on the left.


The configuration files, ready to copy
Every file this guide writes, as it was on the test server after the reboot with all four services running. Put your own password where it says [password].
[Unit]Description=DSpace backend (REST API)After=network.target postgresql.service solr.serviceWants=postgresql.service solr.service [Service]User=dspaceWorkingDirectory=/dspaceExecStart=/usr/bin/java -Xmx2g -Dfile.encoding=UTF-8 -jar /dspace/webapps/server-boot.jar --server.address=127.0.0.1SuccessExitStatus=143Restart=on-failure [Install]WantedBy=multi-user.targetRead back from the test server (Ubuntu 26.04) on 2026-11-19, after the steps had worked. Placeholders such as [password]: type your own value in the box above the file to fill them in, or replace them yourself.
[Unit]Description=DSpace web interfaceAfter=network.target dspace.serviceWants=dspace.service [Service]User=dspaceWorkingDirectory=/home/dspace/uiEnvironment=NODE_ENV=productionExecStart=/usr/bin/node dist/server/main.jsRestart=on-failure [Install]WantedBy=multi-user.targetRead back from the test server (Ubuntu 26.04) on 2026-11-19, after the steps had worked. Placeholders such as [password]: type your own value in the box above the file to fill them in, or replace them yourself.
ui: ssl: false host: 127.0.0.1 port: 4000 baseUrl: http://localhost:4000 nameSpace: /rest: ssl: false host: localhost port: 8080 nameSpace: /serverRead back from the test server (Ubuntu 26.04) on 2026-11-19, after the steps had worked. Placeholders such as [password]: type your own value in the box above the file to fill them in, or replace them yourself.
Optional · fill in your own values to copy this file as it is
It is the password you choose in step 2; local.cfg in step 5 uses the same one.
You can skip this: then replace [password] with your own value in each command and file below before you run it. A password typed here is kept only while this page is open, never saved or sent.
dspace.dir=/dspacedspace.server.url = http://localhost:8080/serverdspace.server.ssr.url = ${dspace.server.url}dspace.ui.url = http://localhost:4000dspace.name = DSpace at My Universitydb.url = jdbc:postgresql://localhost:5432/dspacedb.username = dspacedb.password = [password]ldn.enabled = trueRead back from the test server (Ubuntu 26.04) on 2026-11-19, after the steps had worked; only the active lines; the file also holds many commented examples. Placeholders such as [password]: type your own value in the box above the file to fill them in, or replace them yourself.
SOLR_OPTS="$SOLR_OPTS -Dsolr.config.lib.enabled=true"SOLR_JETTY_HOST="127.0.0.1"Read back from the test server (Ubuntu 26.04) on 2026-11-19, after the steps had worked; only the two lines this guide adds. Placeholders such as [password]: type your own value in the box above the file to fill them in, or replace them yourself.
Troubleshooting
Permission deniedon /home/dspace: run the command as dspace (sudo -iu dspace). Details.Cannot invoke "java.io.Console.readLine()" because "console" is null: runcreate-administratorin an interactive SSH session. Details.JavaScript heap out of memoryduringnpm run build:prod:NODE_OPTIONS=--max-old-space-size=4096. Details.- The build ends with
Killed: the kernel ran out of memory; add a 4 GB swap file for the build. Details. - The page says “Service unavailable” through a tunnel: forward port 8080 as well as 4000. Details.
Could not transfer artifact … transfer failedinmvn package: a download failed; run it again. Details.
What these steps changed on the server
Both runs recorded the server before the first step and after the last (see the Tested on box below): Java, Ant, PostgreSQL and the build tools (from apt on 26.04; Maven and Node from their own downloads on 24.04), Solr in /opt, DSpace in /dspace, the dspace and solr users, and four services enabled at boot, all listening on localhost. One surprise in the package list: step 1 on 26.04 installed 648 packages, among them desktop ones such as the alacritty terminal, pulled in as dependencies of Ubuntu’s Maven and Node packages; on 24.04 the same step installed 27.
Ubuntu 26.04 vs 24.04
The same check ran on a fresh 26.04 server and on a fresh 24.04 server, each with its own run log.
| What | Ubuntu 26.04 | Ubuntu 24.04 |
|---|---|---|
| System | Ubuntu 26.04.1 LTS7.0.0-43-generic | Ubuntu 24.04.5 LTS6.8.0-149-generic |
| openjdk-21-jdk-headless | 21.0.13.1+2-1~26.04.1 | 21.0.13.1+2-1~24.04.1 |
| maven | 3.9.12-1 | 3.9.12 |
| ant | 1.10.15-1build1 | 1.10.14-1 |
| nodejs | 22.22.1+dfsg+~cs22.19.15-1ubuntu1 | 22.22.1 |
| npm | 9.2.0~ds3-1 | not installed |
| postgresql-17 | 17.12-1.pgdg26.04+1 | not installed |
| dspace | 10.1 | 10.1 |
| solr | 9.11.0 | 9.11.0 |
| postgresql-16 | not installed | 16.15-0ubuntu0.24.04.1 |
| PostgreSQL | Ubuntu ships 18 (not supported by DSpace 10): 17 from the PostgreSQL project’s repository | Ubuntu’s own 16, straight from apt |
| Maven and Node | from apt: Maven 3.9.12, Node 22.22.1, npm 9.2.0 | apt offers Maven 3.8.7 and Node 18.19.1 (too old): Maven 3.9.12 and Node 22.22.1 (npm 10.9.4) from their own downloads |
| Packages installed in step 1 | 648, desktop ones such as alacritty among them | 27 |
ExecStart= of the web interface service | /usr/bin/node | /usr/local/bin/node |
The heap error in npm run build:prod | Ineffective mark-compacts near heap limit … JavaScript heap out of memory | Reached heap limit … JavaScript heap out of memory |
| Memory in use after the reboot | 2160 MB | 1975 MB |
| Proof | Run log, 57 checks passed | Run log, 57 checks passed |
