How to Install OpenCloud using Nginx on Ubuntu 22.04
OpenCloud is a self-hosted cloud platform similar to Nextcloud, offering file storage, collaboration apps, office editing, and more, all in your own server environment.
Prerequisites
Update System Packages
We update the server packages to ensure everything is current and compatible.
apt update && sudo apt upgrade -y
We install curl and CA certificates used during installation.
apt install curl ca-certificates -y
Install Docker
We need Docker to run OpenCloud in containers.
curl -fsSL https://get.docker.com | sh
Enable and start Docker:
systemctl enable --now docker
Install Docker Compose
Docker Compose manages multi-container applications.
apt install docker-compose-plugin -y
Download OpenCloud Compose Files
This downloads the OpenCloud deployment 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: 536, done.
remote: Counting objects: 100% (225/225), done.
remote: Compressing objects: 100% (140/140), done.
remote: Total 536 (delta 179), reused 89 (delta 85), pack-reused 311 (from 2)
Receiving objects: 100% (536/536), 278.30 KiB | 2.90 MiB/s, done.
Resolving deltas: 100% (245/245), done.
root@vps:~#
Go into the directory:
cd opencloud-compose
Copy the example environment file,
cp .env.example .env
Edit Environment Configuration
Set your domain in the .env file.
nano .env
Find and update:
OC_DOMAIN=dev.domainhere.info
INITIAL_ADMIN_PASSWORD=YourSecurePasswordHere
Note: Replace the dev.domainhere.info with actual domain name and password with strong password
Save & Exit: CTRL + X, press Y, then ENTER.
Edit your docker-compose.yml,
nano docker-compose.yml
Add Ports section below the image part.
ports:
- "9200:9200"
Save and exit.
Start OpenCloud
Run containers in background,
docker compose up -d
Check if running:
docker ps
Output:
root@vps:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
17ece7b22921 opencloudeu/opencloud-rolling:latest "/bin/sh -c 'openclo…" About an hour ago Up About an hour 0.0.0.0:9200->9200/tcp, [::]:9200->9200/tcp opencloud-compose-opencloud-1
root@vps:~#
Install Nginx
Install Nginx to forward the domain to OpenCloud container.
apt install nginx -y
Create Nginx Host File,
nano /etc/nginx/sites-available/dev.domainhere.info
Note: Replace dev.domainhere.info with actual domain name
Paste this:
server {
listen 80;
server_name dev.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:
ln -s /etc/nginx/sites-available/dev.domainhere.info /etc/nginx/sites-enabled/
systemctl restart nginx
Now open in browser,
http://dev.domainhere.info
Note: Replace dev.domainhere.info with actual domain name
Enable HTTPS
Use Let’s Encrypt for free SSL,
snap install core; snap refresh core
apt remove certbot -y
snap install --classic certbot
certbot --nginx -d dev.domainhere.info
Done ✅
Configure Firewall (UFW)
If the firewall (UFW) is enabled, allow Nginx and OpenCloud ports. Enable and configure firewall,
ufw allow OpenSSH
ufw allow 'Nginx Full'
ufw allow 9200/tcp
ufw enable
Verify:
ufw status
Output:
root@vps:~/opencloud-compose# ufw status
Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
9200/tcp ALLOW Anywhere
Nginx Full ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
9200/tcp (v6) ALLOW Anywhere (v6)
Nginx Full (v6) ALLOW Anywhere (v6)
root@vps:~/opencloud-compose#
Access Dashboard
After setup completes, open,
Login using admin name and the password you've set
https://dev.domainhere.info
Note: Replace dev.domainhere.info with actual domain name

Initial Setup Screen
– Create admin account – Configure storage if needed

Dashboard
– You’ll see your main workspace and apps

Conclusion
You have successfully installed OpenCloud on your server using Docker and Nginx. From here you can:
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