Nextcloud meets Pico CMS (NGINX)

With Pico CMS you can build your own website in Nextcloud! Start a blog – share your resume with the world – create a plan for world domination and only share with the right friends – built a knowledge sharing site – and let the smart ones among your colleagues help out.

Install Pico CMS from git:

sudo -s
cd /var/www && git clone
cd /usr/local/bin/ && curl -sS | php
cd /var/www/Pico && composer.phar install
chown -R www-data:www-data /var/www/Pico

Make ammendments to your nextcloud.conf (vhost):

vi /etc/nginx/conf.d/nextcloud.conf

Paste the red ones as shown and replace with your domain:

location = /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
location = /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
location /sites/ {
rewrite /sites/(.*) /apps/cms_pico/pico/$1 break;
location ~ ^/apps/cms_pico/pico/(\.htaccess|\.git|config|content|content-sample|lib|vendor|CHANGELOG\.md|composer\.(json|lock)) {
return 404;
proxy_redirect off;
client_max_body_size 10240M;
location / {
rewrite ^ /index.php$uri;

Open your Nextcloud config.php

sudo -u www-data vi /var/www/nextcloud/config/config.php

and paste

'rewrite_url' => true,

Then restart your webserver

service nginx restart

and enable the Pico app in Nextclouds Adminpanel.

Switch to your personal settings

and create your first website using Pico CMS:

Pico is a flat file CMS. This means there is no administration backend or database to deal with. You simply create .md files in the content folder and those files become your pages. Enjoy your Nextcloud with Pico CMS embedded.

Carsten Rieger

4 Responses

  1. Magnus Andersson says:

    There is no red “ ” to paste in your example.
    Did you forget to paste these two lines?
    “proxy_redirect off;

    It does not work without them for me.
    In your example one “}” is missing.

    Thank you for a nice guide as always.
    1. The rewrite in Nginx only works to visit the site “/sites/my_testsite” and when I use the tabs for sub page index it show the full path “index.php/apps/cms_pico/pico/my_testsite/sub/index”. Is it the same for you?
    2. Did you try PicoCMS 2.0? It was released yesterday.


    • First: thank you very much…i restored the wrong version. The guide was already updated.
      According to the index.php: same to me and Pico 2.0 will be verified within the next week(s)…

  2. Frank says:

    Sounds really interesting, will give Pico CM/S a try tonight.
    Thank you for sharing this information.

Leave a Reply

Your email address will not be published. Required fields are marked *