Skip to content

How to Set Up OpenCloud on a Linux Server – Your Own Cloud for Files and Sync

Set up OpenCloud as a One-Click App or with Docker on your VPS, create accounts, and sync files with the desktop and smartphone apps.

1 December 202611 min read1 Views0 helpful

Introduction

OpenCloud is a self-hosted cloud for files. Upload files in your browser, sync them with the desktop and smartphone apps, and share folders with other people or via a link. Teams can use Spaces, shared project areas with their own members. OpenCloud grew out of ownCloud Infinite Scale, is written in Go, and does not require its own database: files and metadata are stored directly in the file system.

In this guide, we’ll show you two ways to set it up: the easy way as a One-Click App, which gets OpenCloud running with HTTPS and an admin account in just a few minutes, and a manual installation with Docker Compose and an nginx reverse proxy. Then you’ll learn how to connect the desktop and smartphone apps and what OpenCloud can’t do out of the box.

When it makes sense to run OpenCloud on a VPS

Setting up your own OpenCloud is worthwhile if:

  • You want to sync files between multiple devices without storing them with a large cloud provider.
  • You want to share files with family, an association, or a team, using individual accounts, groups, and shared Spaces.
  • You want to share files via a link, optionally with a password and expiration date.
  • You’re looking for a lightweight cloud that runs with little RAM and doesn’t require a database you have to maintain.

OpenCloud is less suitable if you expect an all-in-one solution with a calendar, contacts, office apps in the browser, chat, and lots of apps. OpenCloud doesn’t include these features out of the box; they require additional services. In that case, Nextcloud is often the better choice.

OpenCloud or Nextcloud?

Both are self-hosted file clouds, but they have different priorities:

OpenCloudNextcloud
FocusFiles, synchronization, sharing, SpacesFiles plus groupware and many apps
DatabaseNone; everything is stored in the file systemMariaDB or PostgreSQL required
ComponentsOne containerWeb server, PHP, database, and usually Redis for good performance
Calendar and contactsOnly with an additional serviceAvailable directly as an app
Office apps in the browserOnly with your own Collabora serverWith Nextcloud Office and your own Collabora server
Desktop and smartphone appsOpenCloud appsNextcloud apps

If your main goal is to securely sync and share files, OpenCloud needs fewer components and is quick to set up. For an all-in-one groupware solution, see our separate guide on how to set up Nextcloud on a Linux server. Another lightweight alternative focused on fast file sync is Seafile.

The easy way: OpenCloud as a One-Click App

With your VPS’s One-Click Apps, OpenCloud will be running at its own address with HTTPS in just a few minutes. The app creates the admin account during installation, so an open setup wizard is never accessible.

Requirements

  • A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. For instructions, see VPS: One-Click Apps.
  • At least 1 GB RAM, 1 vCPU core, and 2 GB of storage for the app. 2 GB RAM and 2 vCPU cores are recommended. Allow additional storage for your files; the app itself uses very little.
  • An address for OpenCloud: either a free subdomain on zap.cloud or your own domain.

Install

  1. Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
  2. Search the App catalog for “OpenCloud” and click Install app next to OpenCloud.
  3. Enter a name under App name and leave Use a custom subdomain or zap.cloud enabled. Choose the address where OpenCloud should be available.
  4. You don’t need to enter anything under App configuration. The app generates the admin password itself.
  5. Click Queue installation.

After two to three minutes, the app will show as Online. Click the Access link on the app card to open the OpenCloud login page.

Warning: OpenCloud requires a domain with HTTPS

OpenCloud uses OpenID Connect to log you in and only works at the address entered during installation. For this reason, leave the domain option enabled. You won’t be able to log in without a domain.

First login: Find your credentials

The admin username is always admin. You can find the password in the app’s settings (gear icon), under App environment > Automatically generated values, in the SERVICE_PASSWORD_OPENCLOUD field. Click the eye icon to display it or the copy icon to copy it.

Log in with admin and this password. You’ll then arrive in your personal Personal folder.

Info: Change your password

To set your own password in OpenCloud, go to your profile picture in the top right > Preferences > Change password. The value in the app environment will remain unchanged, but it will no longer work. Save your new password in your password manager.

Create accounts and Spaces

OpenCloud doesn’t have self-registration. As an admin, you create new accounts:

  1. Open the app switcher in the top right (the nine-dot icon) and select Admin Settings.
  2. Go to Users on the left and click New in the top left.
  3. Enter a username, name, email address, and initial password, then save.
  4. Give the person your OpenCloud address, username, and password.

Use Groups to organize accounts into groups. Under Spaces, you can create shared project areas and decide who can read or write to them. Change an account’s role (for example, Admin or User) using the pencil icon in the list.

What the One-Click App includes and what it doesn’t

  • One container, no database: The app starts OpenCloud with its built-in user directory. Files, accounts, and settings are stored in two volumes on your VPS.
  • Accessible only over HTTPS: The internal port 9200 isn’t exposed externally. You can only access OpenCloud through the app’s domain.
  • No email notifications: Email delivery isn’t configured out of the box. OpenCloud only shows notifications about new shares in the web interface, via the bell in the top right.
  • No office apps in the browser: You can edit notes and Markdown files directly in the browser. Download Word, Excel, and PowerPoint files or edit them in the desktop app on your computer.
  • No calendar or contacts: The Calendar entry in the app switcher indicates that the calendar hasn’t been set up. OpenCloud would need an additional service for this, which the app doesn’t include.
  • No password policy: The app disables minimum password requirements. Make sure you use long passwords for all accounts and link shares.

Updates and backups

  • Updates: Open the app settings (gear icon) > App update and click Check for updates. If a new version is available, install it with Apply update. The app uses the Production edition of OpenCloud (currently version 9.1.1), which the vendor intends for long-term use. New OpenCloud versions are released with new versions of the app. If OpenCloud shows a notice about a new version at the bottom left, you can’t install it yourself.
  • Backups: A VPS backup from the Backups tab also backs up the opencloud-config (configuration and keys) and opencloud-data (files, accounts, and search index) volumes. You need both: the data can’t be restored without the configuration.
  • Uninstall: Under App actions > Uninstall app, you can also delete the data volumes. All files and accounts will then be permanently deleted.

Manual installation

The rest of this guide covers the manual installation of OpenCloud with Docker Compose, for example on a server without One-Click Apps. You’ll run OpenCloud in a container, expose the port only locally, and make the cloud accessible through nginx with a Let’s Encrypt certificate.

Requirements

MinimumRecommended
CPU1 vCPU core2 vCPU cores
RAM1 GB2 GB; more for many users
Storage2 GB for the softwareAdditional space for all your files

According to the provider, 512 MB RAM is enough for up to 10 people, while 2 cores and 8 GB RAM are recommended for around 1,000 people. You’ll also need:

Prepare the firewall

OpenCloud only needs the web ports to be accessible externally. Open SSH, HTTP, and HTTPS in ufw:

Code
sudo apt install -y ufw
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable

Don’t open port 9200. Docker bypasses ufw rules for published ports, so bind the port to 127.0.0.1 in the Compose file. This means only nginx on the same server can access it. For more information about firewall rules, see VPS: Open ports and manage the firewall on Linux.

Install with Docker Compose

Create a directory and a .env file with your domain and a random admin password:

Code
sudo mkdir -p /opt/opencloud && cd /opt/opencloud
echo "OC_DOMAIN=cloud.example.com" | sudo tee .env
echo "INITIAL_ADMIN_PASSWORD=$(openssl rand -hex 16)" | sudo tee -a .env
sudo chmod 600 .env

Replace cloud.example.com with your domain. The password will then be in .env; display it with sudo cat .env. Next, create the compose.yml file, for example with sudo nano compose.yml:

Code
services:
  opencloud:
    image: opencloudeu/opencloud:9.1.1
    restart: unless-stopped
    entrypoint: ["/bin/sh"]
    command: ["-c", "opencloud init --insecure false --admin-password \"$$IDM_ADMIN_PASSWORD\" || true; opencloud server"]
    environment:
      OC_URL: https://${OC_DOMAIN}
      OC_INSECURE: "false"
      PROXY_TLS: "false"
      PROXY_HTTP_ADDR: 0.0.0.0:9200
      IDM_ADMIN_PASSWORD: ${INITIAL_ADMIN_PASSWORD}
    ports:
      - "127.0.0.1:9200:9200"
    volumes:
      - opencloud-config:/etc/opencloud
      - opencloud-data:/var/lib/opencloud

volumes:
  opencloud-config:
  opencloud-data:

Here are the key lines:

  • image uses the production version of OpenCloud. There’s also opencloudeu/opencloud-rolling, which gets new features every few weeks and, according to the provider, isn’t intended for production use. Find the latest version number on the OpenCloud release page.
  • command creates the configuration with the admin password on the first start, then starts the server. On each subsequent start, opencloud init reports that the configuration already exists, and the server starts anyway.
  • OC_URL is the public address. You can only log in at this exact address.
  • PROXY_TLS: "false" lets OpenCloud use HTTP internally; nginx handles HTTPS.
  • 127.0.0.1:9200:9200 exposes the port only on the server itself.

Start OpenCloud:

Code
sudo docker compose up -d
sudo docker compose logs -f opencloud

OpenCloud will be ready in about a minute. Press Ctrl + C to exit the log view. Check the service locally:

Code
curl -s http://127.0.0.1:9200/status.php

The response contains "productname": "OpenCloud" and the running version.

Warning: The admin password in .env only works once

INITIAL_ADMIN_PASSWORD sets the password only on the very first start. Changing it in .env later won’t have any effect. To set a new password, go to Preferences > Change password in OpenCloud.

Access via HTTPS through a reverse proxy

Install nginx and Certbot:

Code
sudo apt install -y nginx certbot python3-certbot-nginx

Create the /etc/nginx/sites-available/opencloud file:

Code
server {
    listen 80;
    server_name cloud.example.com;

    client_max_body_size 10M;
    proxy_buffering off;
    proxy_request_buffering off;
    proxy_read_timeout 3600s;
    proxy_send_timeout 3600s;
    keepalive_requests 100000;
    keepalive_timeout 5m;

    location / {
        proxy_pass http://127.0.0.1:9200;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

These settings follow OpenCloud’s recommendation: uploads are sent in chunks using the TUS protocol, so 10 MB per request is enough. Without buffering disabled and long timeouts, large syncs and live updates will fail. Enable the site and get the certificate:

Code
sudo ln -s /etc/nginx/sites-available/opencloud /etc/nginx/sites-enabled/opencloud
sudo nginx -t && sudo systemctl reload nginx
sudo certbot --nginx -d cloud.example.com

Certbot adds the HTTPS block and redirects HTTP to HTTPS. For more information about the basics, see VPS: Set up a reverse proxy with nginx on Linux and VPS: Create an SSL certificate (Let’s Encrypt).

Tip: Check filters in the reverse proxy

When setting it up, the desktop app sends a request to /.well-known/webfinger with an address in the parameter. Security filters that block requests with http:// in the parameter (for example, “Block Common Exploits” in NGINX Proxy Manager) will prevent you from logging in. This doesn’t happen with the configuration above.

First visit

Open https://cloud.example.com in your browser. You’ll be redirected to the login page. Log in with the username admin and the password from .env. Create accounts, groups, and Spaces as described above under “Create accounts and Spaces.”

Back up your data

OpenCloud stores everything in the file system: configuration and keys in the opencloud-config volume, and files, accounts, and the search index in the opencloud-data volume. To ensure a consistent backup, briefly stop OpenCloud and back up both volumes together with compose.yml and .env:

Code
cd /opt/opencloud
sudo docker compose stop
sudo tar -czf /root/opencloud-backup-$(date +%F).tar.gz -C /var/lib/docker/volumes opencloud_opencloud-config opencloud_opencloud-data -C /opt/opencloud compose.yml .env
sudo docker compose start

The volume names start with the directory name, in this case opencloud_. Check them with sudo docker volume ls. Then copy the backup to another computer or storage location. A backup on the same server won’t protect you if the server fails.

Update OpenCloud

Before each update, read the OpenCloud upgrade notes for the target version. When the first version number changes, you often need to adjust the configuration. Then:

  1. Back up your data as described above.
  2. Enter the new version in compose.yml, for example, opencloudeu/opencloud:9.1.2.
  3. Pull the new image and restart:
Code
cd /opt/opencloud
sudo docker compose pull
sudo docker compose up -d

opencloud init --diff shows whether you need to change the configuration with the new version. The upgrade guide for each version describes the exact process.

Connect the desktop and smartphone apps

OpenCloud becomes a sync solution when you use the apps. All apps use the browser for login: enter your OpenCloud address, log in on the familiar login page, and approve access.

Desktop app for Windows, macOS, and Linux

  1. Install OpenCloud Desktop: from the Microsoft Store on Windows, or for macOS (pkg) and Linux (AppImage) from the desktop app release page.
  2. Launch the app and enter your OpenCloud address, for example, https://cloud.example.com.
  3. Click “Open web browser,” log in, and allow access.
  4. Choose whether to sync all Spaces or only selected ones, then choose the local folder.

The app will then sync your files in the background. If there’s a conflict, such as when the same file has been changed on two devices, the app saves it as a separate conflict file instead of overwriting anything.

Smartphone apps for Android and iOS

The OpenCloud app is available in the Google Play Store for Android and the App Store for iPhone and iPad. After launching it, enter your OpenCloud address and log in in the browser. In the app, you can view and upload files, mark them for offline use, and share them.

Limitations

  • OpenCloud apps only: The Nextcloud apps don’t work with OpenCloud because OpenCloud uses a different login method. Use the OpenCloud apps instead.
  • Only at the fixed address: Apps and browsers always log in at the address from OC_URL or the One-Click App domain. Accessing the server via its IP address won’t work.

Conclusion

You’ve set up OpenCloud on your VPS, used the admin account, created accounts and Spaces, and connected the desktop and smartphone apps. You now have your own lightweight cloud for files, which doesn’t require a database and runs with little RAM.

Prefer not to handle Docker yourself? Then choose the easy way as a One-Click App, as described above under “The easy way: OpenCloud as a One-Click App.”

Free tools

Related tools for servers and developers

View all

FAQ

Frequently asked questions

For most people, the One-Click App is the quickest option: OpenCloud runs at your address over HTTPS in just a few minutes, the admin account is created, and you can install updates in the ZapX dashboard. Manual installation with Docker Compose is a good choice if you want to choose the version yourself, set up email notifications, or combine OpenCloud with your own services, such as Collabora or Keycloak.
The username is admin. For the One-Click App, find the password in the app settings under App environment > Automatically generated values, in the SERVICE_PASSWORD_OPENCLOUD field. For a manual installation, it’s listed as INITIAL_ADMIN_PASSWORD in the .env file. Both passwords are only valid until you change the password in OpenCloud.
Stop OpenCloud and run the idm resetpassword command once via SSH on the server, using both volumes. For example: docker run -it --rm -v <data-volume>:/var/lib/opencloud -v <config-volume>:/etc/opencloud <image> idm resetpassword. Find the volume names with docker volume ls and the image name with docker ps. Then start OpenCloud again and log in with the new password.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.