Skip to main content

Updating OpenCloud

This guide covers how to update your OpenCloud installation using Docker. This method is simpler and quicker to implement compared to docker-compose.

Prerequisites

  • Existing OpenCloud installation running in Docker
  • Sudo access to your server
  • Your domain configured for OpenCloud

Update Process

1. Check Current Images

First, list all OpenCloud images to see what versions you have:

sudo docker images

You can delete unused images to free up space:

sudo docker rmi <image_id>

2. Download New Version

Pull the specific version you want to update to:

sudo docker pull opencloudeu/opencloud-rolling:3.3.0

Replace 3.3.0 with your desired version number.

3. Stop Current Container

Stop the running OpenCloud container:

sudo docker stop opencloud

4. List and Remove Old Container

List all containers (running and stopped):

sudo docker ps -a

Remove the old container (required because the name cannot be reused):

sudo docker rm opencloud

5. Create New Container

Create a new container with the updated image:

sudo docker run --name opencloud \
--restart=always \
-d \
-p 9200:9200 \
-v $HOME/opencloud/opencloud-config:/etc/opencloud \
-v $HOME/opencloud/opencloud-data:/var/lib/opencloud \
-e OC_INSECURE=true \
-e PROXY_HTTP_ADDR=0.0.0.0:9200 \
-e OC_URL=https://example.cloud.com \
opencloudeu/opencloud-rolling:3.3.0

Important: Replace the following values:

  • https://example.cloud.com with your actual domain
  • 3.3.0 with the current version you're updating to

Important Notes

  • No init command needed: The init command is only used during initial setup, not for updates
  • Container name reuse: You must remove the old container before creating a new one with the same name
  • Data persistence: Your configuration and data will be preserved through the mounted volumes
  • Downtime: There will be brief downtime during the container stop/start process

Verification

After the update, verify that OpenCloud is running properly:

sudo docker ps

You should see the new container running with the updated image version.

Troubleshooting

If you encounter issues:

  1. Check container logs:

    sudo docker logs opencloud
  2. Verify the container is running:

    sudo docker ps
  3. Ensure your volumes and environment variables are correctly configured

Cleanup

After successful update, you can remove old unused images:

sudo docker images
sudo docker rmi <old_image_id>

This will help free up disk space on your system.