How to Install OpenCloud using Nginx on Debian 11
OpenCloud is a self-hosted cloud platform similar to Nextcloud, offering file storage, collaboration apps, office editing, and more, all on your own server.
Prerequisites
Ensure your server is up-to-date.
apt update && apt upgrade -y
Install required packages:
apt install curl ca-certificates gnupg lsb-release -y
Install Docker
Install Docker using the official script:
curl -fsSL https://get.docker.com | sh
Enable and start Docker:
systemctl enable --now docker
Verify Docker is running:
docker --version
Output:
Docker version 29.0.0, build 3d4129b
Install Docker Compose
Docker Compose is needed to manage multi-container applications:
apt install docker-compose-plugin -y
Check version:
docker compose version
Output:
Docker Compose version v2.40.3
Download OpenCloud Compose Files
git clone https://github.com/opencloud-eu/opencloud-compose.git
Output:
root@vps:~# git clone https://github.com/opencloud-eu/opencloud-compose.git
Cloning into 'opencloud-compose'...
remote: Enumerating objects: 630, done.
remote: Counting objects: 100% (268/268), done.
remote: Compressing objects: 100% (161/161), done.
remote: Total 630 (delta 207), reused 116 (delta 102), pack-reused 362 (from 2)
Receiving objects: 100% (630/630), 435.27 KiB | 5.80 MiB/s, done.
Resolving deltas: 100% (287/287), done.
Go into the directory:
cd opencloud-compose
Copy the example environment file:
cp .env.example .env
Edit Environment Configuration
Open .env:
nano .env
Update the following:
OC_DOMAIN=wiki2.domainhere.info
INITIAL_ADMIN_PASSWORD=YourSecurePasswordHere
Note: Replace
wiki2.domainhere.infowith your actual domain and password with a strong password.
Save & exit: CTRL + X, then Y, then ENTER.
(Optional) Edit docker-compose.yml to expose port:
nano docker-compose.yml
Add under the image section:
ports:
- "9200:9200"
Save & exit.
Start OpenCloud
Run containers in the background:
docker compose up -d
Check running containers:
docker ps
Output:
root@vps:~/opencloud-compose# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a8d5a22698f4 opencloudeu/opencloud-rolling:latest "/bin/sh -c 'openclo…" 3 seconds ago Up 2 seconds 0.0.0.0:9200->9200/tcp, [::]:9200->9200/tcp opencloud-compose-opencloud-1
You should see opencloud-compose-opencloud-1 up and running on port 9200.
Install Nginx
apt install nginx -y
Create Nginx host configuration:
nano /etc/nginx/sites-available/wiki2.domainhere.info
Note: Replace
wiki2.domainhere.infowith your actual domain.
Paste:
server {
listen 80;
server_name wiki2.domainhere.info;
location / {
proxy_pass http://127.0.0.1:9200;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Enable the site and restart Nginx:
ln -s /etc/nginx/sites-available/wiki2.domainhere.info /etc/nginx/sites-enabled/
systemctl restart nginx
Enable HTTPS (Let's Encrypt)
apt install snapd -y
snap install core; snap refresh core
apt remove certbot -y
snap install --classic certbot
export PATH=$PATH:/snap/bin
certbot --version
echo 'export PATH=$PATH:/snap/bin' >> ~/.bashrc
source ~/.bashrc
certbot --nginx -d wiki2.domainhere.info
Configure Firewall (UFW)
Allow necessary ports if UFW is enabled:
apt update
apt install ufw -y
ufw allow OpenSSH
ufw allow 'Nginx Full'
ufw allow 9200/tcp
ufw status
Output:
Creating config file /etc/ufw/after6.rules with new version
Created symlink /etc/systemd/system/multi-user.target.wants/ufw.service → /lib/systemd/system/ufw.service.
Processing triggers for rsyslog (8.2102.0-2+deb11u1) ...
Processing triggers for man-db (2.9.4-2) ...
Rules updated
Rules updated (v6)
Rules updated
Rules updated (v6)
Rules updated
Rules updated (v6)
Status: inactive
You should see Nginx, OpenSSH, and port 9200 allowed.
Access Dashboard
Open in browser:
https://wiki2.domainhere.info
Login using admin and the password set in .env.


Conclusion
OpenCloud is now installed on Debian 11 using Docker and Nginx. You can:
- Access files, apps, and office tools
- Manage users and permissions
- Configure storage backends
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS