Me as an illustration

Hi, I’m Iva.

I build apps for iPhone, iPad and Mac, and work on the Nextcloud desktop client. These are my notes.

February 4, 2026 · 1 min read

Nextcloud Docker Container Commandline

A snippet to quickly open a bash session as www-data in a Nextcloud Docker container.

As a Nextcloud desktop client developer I am working with Nextcloud deployments in form of local Docker containers on a daily basis. Too often I still have to look this up because I just cannot remember it.

Me as an Emoji

I also had this in various places where I scattered my code snippets over time but I thought it might be worth starting that as a public collection on my website. That leaves more freedom and independence than GitHub Gists, for example.

docker exec --interactive --tty --user www-data "$1" /bin/bash

This is the shortest way to interact with Nextcloud server’s commandline interface known as occ.

Note that the $1 is a placeholder to be replaced by a Docker container identifier or left as it is when you save that command in a shell script file which then substitutes it with the first argument provided.

Me as an Emoji