Nextcloud meets Pico CMS (NGINX)

NO LONGER MAINTAINED


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.

On Nextcloud ≥ 15 you have to modify pico’s info.xml properly

<nextcloud min-version="12" max-version="16"/>

Install Pico CMS from git:

sudo -s
apt install git -y
cd /var/www && git clone https://github.com/picocms/Pico.git
cd /usr/local/bin/ && curl -sS https://getcomposer.org/installer | 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 your.dedyn.io 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;
proxy_pass https://your.dedyn.io/;
}
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  the string  ‘rewrite_url’ => true,

...
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
'timeout' => 0.0,
),
'rewrite_url' => true,
'share_folder' => '/Shares',
'skeletondirectory' => '',
'trashbin_retention_obligation' => 'auto, 7',
);

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

Carsten Rieger

Carsten Rieger is a senior system engineer in full-time and also working as an IT freelancer. He is working with linux environments for more than 15 years, an Open Source enthusiast and highly motivated on linux installation and troubleshooting. Mostly working with Debian/Ubuntu Linux, Nginx and Apache web server, MariaDB/MySQL/PostgreSQL, PHP, Cloud infrastructure (e.g. Nextcloud) and other open source projects (e.g. Roundcube) and in voluntary work for the Dr. Michael & Angela Jacobi Stiftung for more than 7 years.