Applying a Pico CMS theme. ANY theme!

I’ve been struggling all day to get ANY Pico CMS theme to work with Nextcloud 13. Pico app itself is working at least well enough to create a post with the default theme (required an upgrade to PHP7.2 - unspecified in docs). I have a page working properly via MOD_PROXY (/etc/apache2/sites-available/<mydomain>.conf).

I’ve tried a number of the themes here - with no success. I clone the theme repos to /var/ncdata/appdata_.../cms_pico/themes as directed in app settings. The app detects them, and I can install them, and then apply to individual Pico sites. They all break in various ways, ranging from rendering html but no css, to reporting Webpage cannot be rendered, to rendering in ways that bear no resemblance to the header and markdown.

Has ANYONE managed to apply a theme? I feel I’m missing something fundamental. The situation is not helped by the fact there are (as far as I can tell) no actual examples of a full implementation to be found anywhere.


Thi seems to be an issue tor others. See Pico CMS nextcloud app issue here.


Thanks for the links.

To check if the issue was theme folder path I tried copying (duplicating) Pico’s themes folder contents to /var/www/nextcloud/themes, but find the exact same failures for each theme as without.

I played a little with it yesterday, and there were two things I had to to make all themes work.

I first changed the content security policy for the subdomain. So in Apache you can do ‘header unset content-security-policy’ . Just becareful that users or themes don’t load crazy things. The CSP tells the browser what resources it is allowed to load from where.

The other problem I found was that the {{theme_url }} is actually pointing to the app location installed within nextcloud, whereas the theme files are read from some temporary app location on my data drive. So for example
The themes look for js and css files in /path/to/nextcloud/apps/cms_pico/Pico/themes/…

But Picocms interprets the theme files from

The second location was the location that Picocms had told me to install themes to.

It almost seems as if the installing theme button is supposed to copy the theme files to the nextcloud installation but it doesn’t work. Hence none of the JavaScript and stylesheeting is loaded and the fancy looking themes don’t work.

1 Like

Thanks a lot for digging deeper into this and providing these details.
I hope the app can be modified in a way, that the issue you discovered will be solved, especially with the CSP. Disabling CSP is a security flaw in my opinion and we shouldn’t do it.

@jospoortvliet @LukasReschke Do you see some options here, without lowering the security of our Nextcloud servers?
Will there be some improvements/ further developement for this app?

The CSP doesn’t have to be unset, just set it to the current theme if needed. For example I am current using the " clean-blog" theme with the following CSP setting:

Header set Content-Security-Policy “script-src ‘self’ ‘unsafe-inline’ ‘unsafe-eval’; style-src ‘self’ ‘unsafe-inline’; img-src *; font-src *”

Where the unsafe-inline and unsafe-eval are needed by Nextcloud itself.

Today I installed Pico CMS app within my Nextcloud instance and tried to, as you all before, change the theme for my site/blog.

I git cloned my favorite theme in the folder mentioned in the administration section of the settings menu/Pico CMS. After that I added the new theme and was able to select the new theme when setting up a new site.


I can confirm this issue.

My fix was to create a symbolic link between /path/to/nextcloud/apps/cms_pico/Pico/themes and /path/to/data/appdata_idcode/cms_pico/themes/.