DSpace is a free, open-source repository software platform that enables universities, research institutions, and libraries to capture, preserve, and share their digital scholarly output with the world. First launched in 2002 through a partnership between MIT Libraries and Hewlett-Packard, DSpace has grown into the most widely adopted institutional repository (IR) software globally, powering thousands of repositories across academic, government, and cultural heritage organizations. At its core, DSpace allows institutions to organize digital content including theses, dissertations, research articles, datasets, images, and multimedia, into a structured, searchable system that supports long-term digital preservation while making that content discoverable to researchers, students, and the public.
For universities and research institutions, DSpace serves as the backbone of open access initiatives, helping meet funder mandates, boost institutional visibility, and increase the citation impact of faculty and student research. Beyond simple file storage, DSpace offers metadata management aligned with standards like Dublin Core, customizable submission and approval workflows, OAI-PMH harvesting for integration with services like Google Scholar and OpenAIRE, and robust access control for managing embargoes or restricted content. Whether you’re a small college library digitizing archival collections or a large research university managing thousands of graduate theses, DSpace provides a scalable, community-supported foundation for institutional repository management, making it a natural starting point for any organization looking to implement open access infrastructure.
This guide documents a complete installation of DSpace 9.2. This is what you need:
- PostgreSQL (Database)
- Apache Solr (Search engine)
- Apache Tomcat 10 (Backend REST API)
- Angular SSR UI (Frontend)
- Nginx (Reverse proxy + SSL)
- Let’s Encrypt SSL
1. Install and Configure Apache Solr
Install Solr service
Solr is used for search indexing in DSpace.
After installation, we configured it as a system service:
Bash:
sudo tee /etc/systemd/system/solr.service >/dev/null <<'EOF'
[Unit]
Description=Apache Solr
After=network.target
[Service]
Type=simple
User=solr
Group=solr
Environment=JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
EnvironmentFile=/etc/default/solr.in.sh
ExecStart=/opt/solr/bin/solr start -f
ExecStop=/opt/solr/bin/solr stop
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
Enable and start Solr:
Bash:
sudo systemctl daemon-reload
sudo systemctl enable --now solr
Verify Solr:
curl http://127.0.0.1:8983/solr/admin/cores?wt=json
You should see cores like:
- search
- authority
- statistics
- oai
2. Install Apache Tomcat 10 (Backend Server)
DSpace 9 requires Jakarta EE (Tomcat 10).
Create Tomcat user
sudo useradd -r -d /opt/tomcat -s /usr/sbin/nologin tomcat
Install Tomcat
cd /opt/downloads
sudo curl -O https://dlcdn.apache.org/tomcat/tomcat-10/v10.x.x/bin/apache-tomcat-10.x.x.tar.gz
sudo tar xzf apache-tomcat-10.x.x.tar.gz -C /opt/
sudo ln -sfn /opt/apache-tomcat-10.x.x /opt/tomcat
sudo chown -R tomcat:tomcat /opt/apache-tomcat-10.x.x
Configure the Tomcat service
sudo tee /etc/systemd/system/tomcat.service >/dev/null <<'EOF'
[Unit]
Description=Apache Tomcat 10.1 for DSpace
After=network.target postgresql.service solr.service
[Service]
Type=forking
User=tomcat
Group=tomcat
Environment=JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
Enable Tomcat:
sudo systemctl daemon-reload
sudo systemctl enable tomcat
3. Install DSpace Backend Source
Clone DSpace 9.2
sudo git clone --depth 1 --branch dspace-9.2 https://github.com/DSpace/DSpace.git /opt/dspace-src
Configure DSpace settings
Edit local.cfg:
sudo tee /opt/dspace-src/dspace/config/local.cfg >/dev/null <<EOF
dspace.dir=/opt/dspace
dspace.server.url=https://Your domain/server
dspace.ui.url=https://Your domain
solr.server=http://127.0.0.1:8983/solr
db.url=jdbc:postgresql://localhost:5432/dspace
db.username=dspace
db.password=password
rest.cors.allowed-origins=https://Your domain
EOF
4. Build DSpace Backend (Maven)
Compile DSpace:
sudo -u dspace bash -c '
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 \
MAVEN_OPTS="-Xmx2048m" \
mvn -B -DskipTests package
'
This generates the install package in: /opt/dspace-src/dspace/target/dspace-installer
5. Install DSpace into the Production Directory
Copy Solr configuration:
sudo cp -r /opt/dspace/solr/* /var/solr/data/
sudo chown -R solr:solr /var/solr/data
sudo systemctl restart solr
7. Initialize Database
Run migration:
sudo -u dspace /opt/dspace/bin/dspace database migrate
This creates all required tables and schema.
8. Install Node.js and PM2
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install nodejs
sudo npm install -g pm2
9. Install Angular UI (Frontend)
sudo git clone --depth 1 --branch dspace-9.2 https://github.com/DSpace/dspace-angular.git /opt/dspace-ui
cd /opt/dspace-ui
sudo -u dspace npm ci
10. Configure Angular UI
sudo tee /opt/dspace-ui/config/config.prod.yml >/dev/null <<EOF
ui:
ssl: false
host: 0.0.0.0
port: 4000
rest:
ssl: true
host: Your domain
port: 443
nameSpace: /server
EOF
11. Build Angular UI
cd /opt/dspace-ui
sudo -u dspace bash -c '
NODE_ENV=production \
NODE_OPTIONS=--max_old_space_size=8192 \
npm run build:prod
'
12. Run UI with PM2
Create ecosystem file:
sudo tee /opt/dspace-ui/ecosystem.config.cjs >/dev/null <<EOF
module.exports = {
apps: [{
name: "dspace-ui",
cwd: "/opt/dspace-ui",
script: "dist/server/main.js",
env: {
NODE_ENV: "production",
DSPACE_REST_NAMESPACE: "/server"
}
}]
}
EOF
Start PM2:
sudo -iu dspace pm2 start /opt/dspace-ui/ecosystem.config.cjs
sudo -iu dspace pm2 save
sudo -iu dspace pm2 startup
13. Install and Configure Nginx + SSL
Install SSL using Certbot:
sudo certbot --nginx -d Your domain
Nginx configuration
sudo nano /etc/nginx/sites-available/[YOUR DOMAIN]
server {
server_name Your domain;
location / {
proxy_pass http://127.0.0.1:4000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /server/ {
proxy_pass http://127.0.0.1:8080/server/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/Your domain/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/Your domain/privkey.pem;
}
Final Verification
#ui:
curl -Ik https://Your domain
#REST API:
curl -Ik https://Your domain
And there is Koha
