Use this guide as an implementation reference. Validate commands, policies and version-specific behaviour in a lab before applying changes to production systems.
1. Understand the DSpace architecture
DSpace 7 and later are split into two applications: a Java/Spring Boot REST backend and an Angular frontend. The backend stores repository metadata and files, while PostgreSQL stores structured data and Solr provides search and discovery indexing. The frontend communicates with the backend API. This guide describes a single-server learning or small institutional deployment; larger repositories should separate database, search, asset storage and application tiers.
Version note: DSpace releases have different Java, Solr, PostgreSQL and frontend requirements. Select one supported DSpace release and follow its matching official installation manual. Do not mix commands or dependencies from DSpace 7, 8, 9 and 10.
2. Prepare Ubuntu and DNS
Use a clean Ubuntu 24.04 LTS server, a sudo user, a stable hostname such as repository.example.edu, working DNS and adequate storage. For a production repository, plan CPU, RAM and disk based on expected submissions and file sizes; 8 GB RAM is a practical starting point for a small test deployment, not a universal production sizing rule.
sudo apt update\nsudo apt full-upgrade -y\nsudo apt install -y curl wget git unzip zip build-essential ufw\nhostnamectl\nlsb_release -a\nfree -h\ndf -hAllow SSH before enabling UFW, then allow only the public web ports. Keep PostgreSQL, Solr and Tomcat private to localhost or a protected application network.
sudo ufw allow OpenSSH\nsudo ufw allow 80/tcp\nsudo ufw allow 443/tcp\nsudo ufw enable\nsudo ufw status verbose3. Install backend build dependencies
Install the Java Development Kit, Maven and Ant versions required by the selected DSpace release. The DSpace 8 documentation, for example, specifies Java 17 and compatible Maven/Ant tooling; later major releases may require newer Java. Confirm with the release-specific matrix before proceeding.
sudo apt install -y openjdk-17-jdk maven ant\njava -version\nmvn -version\nant -versionCreate a dedicated service account and repository directories. Do not run the application as root.
sudo adduser --system --group --home /opt/dspace dspace\nsudo mkdir -p /opt/dspace /var/lib/dspace/assetstore\nsudo chown -R dspace:dspace /opt/dspace /var/lib/dspace4. Install and secure PostgreSQL
Install the PostgreSQL major version supported by your chosen DSpace release. DSpace requires PostgreSQL with the required extensions, including pgcrypto in the documented configurations.
sudo apt install -y postgresql postgresql-contrib\nsudo systemctl enable --now postgresql\nsudo -u postgres psqlAt the PostgreSQL prompt, create a dedicated database and role. Replace the example password with a strong secret and keep it out of shell history and source control.
CREATE USER dspace WITH PASSWORD 'REPLACE_WITH_LONG_RANDOM_PASSWORD';\nCREATE DATABASE dspace OWNER dspace ENCODING 'UTF8';\n\\c dspace\nCREATE EXTENSION IF NOT EXISTS pgcrypto;\n\\qRestrict database listening and pg_hba.conf to the application host. Do not expose port 5432 publicly.
5. Install Solr and Tomcat
Install the Solr version and servlet container supported by the selected DSpace release. DSpace 8 documentation describes Solr 8.x and Tomcat 10.1.x as compatible options; later releases may use different versions. Download Solr only from the Apache distribution site, verify its checksum/signature, and configure the DSpace-specific cores using the configuration supplied with the matching DSpace source release.
Install Tomcat using the version recommended by that DSpace release. Configure the backend application to run under a dedicated account and bind its HTTP connector to localhost. Do not publish Solr or the Tomcat management interface directly to the internet.
sudo systemctl enable --now postgresql\n# After installing the release-matched Solr and Tomcat packages:\nsudo systemctl status postgresql\nsudo systemctl status tomcatPackage names differ between Tomcat versions and Ubuntu releases; use the exact service name installed on your host.
6. Download, configure and build DSpace
Download the source archive for the chosen stable DSpace release from the official DSpace release page. Extract it, then configure the backend settings in the release template, including database credentials, DSpace installation directory, assetstore path, public server URL and REST API URL. Keep local configuration separate from tracked source files.
# Example layout; replace VERSION with the selected release tag\ncd /usr/local/src\nsudo wget https://github.com/DSpace/DSpace/archive/refs/tags/dspace-8.2.tar.gz\nsudo tar -xzf dspace-8.2.tar.gz\nsudo chown -R dspace:dspace DSpace-dspace-8.2Build as the dedicated DSpace account using the release's documented Maven/Ant build procedure. The exact profile and command may change between major versions; use the release manual rather than assuming a command from another release.
sudo -iu dspace\ncd /usr/local/src/DSpace-dspace-8.2\n# Follow the matching release manual to set local.cfg and run its Maven build.\n# Deploy the generated install package into /opt/dspace using the documented ant target.Set ownership so the DSpace service account can write its configuration, logs and assetstore. Do not make the whole application tree world-writable.
7. Configure the Angular frontend and reverse proxy
Install the Node.js version supported by the DSpace frontend release, then check out the matching dspace-angular release. Configure the frontend environment with the backend REST API URL, public UI URL and production settings. Build and run it using the official frontend deployment instructions (commonly a Node process managed by PM2 or systemd).
Configure Nginx as the public entry point. Proxy the frontend and backend API according to the route layout in the matching DSpace manual. Preserve required headers such as Host, X-Forwarded-For and X-Forwarded-Proto. Keep backend and Solr ports private.
sudo apt install -y nginx\nsudo nginx -t\nsudo systemctl enable --now nginxDo not copy a generic Angular or proxy configuration blindly: DSpace frontend routing and API paths are release-specific.
8. Create the administrator and validate services
Use the DSpace command-line utility shipped with your installation to create the initial administrator, following the release-specific CLI syntax. Then verify the backend health endpoint, frontend page, database connectivity, Solr cores, file upload and search indexing. Submit a test item and confirm that the original file is present in the assetstore.
sudo systemctl --failed\nsudo journalctl -u postgresql -n 50 --no-pager\nsudo journalctl -u nginx -n 50 --no-pager\ncurl -I http://127.0.0.1/Use the DSpace CLI's create-administrator command as documented for your release; never leave a default or shared administrator password in place.
9. HTTPS, backups and operations
Point DNS to the server, configure Nginx for the domain and issue a trusted TLS certificate with Certbot. Redirect HTTP to HTTPS and ensure the frontend and backend public URLs use the HTTPS hostname. Back up PostgreSQL, the DSpace assetstore, configuration, Solr configuration and any local customisations together. Test restoration regularly; a database-only backup is not a complete repository backup.
Monitor disk space, database health, Solr indexing, Tomcat/Node process health, certificate expiry and failed background tasks. Document the exact DSpace release and dependency versions so future upgrades can be planned against the official migration notes.
Official references
Conclusion
A reliable DSpace deployment depends on matching the backend, frontend and supporting services to one release family. Pin versions, keep internal services private, protect the assetstore and test a full restore before treating the repository as production-ready.
