Need help with CalDav + Roundcube (via Calendar Plus plugin)
-
Hello everyone,
I'm currently trying to set up the Roundcube Calendar Plus (xcalendar) plugin to use its built-in CalDAV server on my Cloudron instance. However, I've run into a roadblock that I could use some assistance with. I've (tried to) follow the setup process outlined here: https://helpdesk.roundcubeplus.com/knowledgebase.php?article=30
I'm attempting to install and configure the Roundcube Calendar Plus (xcalendar) plugin on a Roundcube instance hosted on Cloudron. Part of the process involves setting up a built-in CalDAV server that comes with the plugin. This server needs a particular Nginx configuration to function correctly.
The instructions provided with the plugin, among other things, states the following:
- A wildcard subdomain (for example, *.caldav.mydomain.com) should be directed to the Roundcube plugins/xcalendar/caldav directory.
- All requests to this subdomain should be rewritten and served by the index.php file in that directory.
- This functionality is to be achieved by adding specific rewrite rules to the Nginx configuration.
Here's the Nginx configuration recommended by the plugin's instructions:
server { listen 443 ssl; server_name <your-caldav-domain>; root <your-roundcube-directory>/plugins/xcalendar/caldav; index index.php; location / { rewrite ^/\.well-known/caldav.*$ /index.php/ redirect; if (!-e $request_filename){ rewrite ^(.*)$ /index.php/$1 break; } fastcgi_pass unix:/var/run/php/php-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param REQUEST_URI $request_uri; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } location ~ /\.ht { deny all; } }
Due to the nature of Cloudron, I'm finding it challenging to apply these settings. I'm aware that Cloudron automatically configures Nginx for installed apps, but in this case, I need a custom configuration for the plugin to work correctly.
Can anyone assist me with implementing these Nginx rewrite rules within Cloudron? Or is there an alternate way I can make this plugin work with its built-in CalDAV server?
Your expertise and guidance are greatly appreciated! Please let me know if there is any additional information I could provide to better assist you in assiting me!
Best regards,
Xandrrix -
Roundcube Plus is not Roundcube (on Cloudron) - therefore setup instructions for the former don't work for the latter... And I don't believe you can just take the "Calendar Plus" plugin from roundcubeplus.com and install it in a "vanilla" Roundcube install.
Or are you trying to package a new "Roundcube Plus" app?
-
Thank you for your input. I understand where you're coming from, but I'd like to clarify a few things about Roundcube, its plugin ecosystem, and the role of Nginx in this context.
Roundcube, as a webmail client, has been (and still is) designed with extensibility in mind. It has a robust plugin architecture that allows developers to create plugins to extend its functionality. This is a key feature of Roundcube and is one of the reasons for its popularity.
The Roundcube Plus "suite" (of plugins), or xcalendar/"Calendar Plus for Roundcube" is a collection of plugins that are indeed compatible with the standard Roundcube installation. These plugins (and all others, for that matter,) are not separate entities or entity. They are not at all a different version of Roundcube; they are, in actuality, entirely intentionally supported add-ons that enhance the base functionality of Roundcube. The Calendar Plus plugin, which I'm trying to install, is one of these add-ons.
The installation of most Roundcube plugins (be it on Cloudron (#FanBoi #ItRocksBTW) or elsewhere), including those from "Roundcube Plus" (a third party plugin provider), typically involves unpacking the plugin files into the plugin directory of the Roundcube installation and configuring the plugin according to its documentation. This is the standard process and works for the majority of plugins.
However, the challenge I'm facing with the Calendar Plus plugin is not with the plugin installation per se, but with the configuration of its built-in CalDAV server. The CalDAV server requires specific settings in the Nginx configuration to function correctly.
Nginx is a powerful web server software that can also be used as a reverse proxy, load balancer, and HTTP cache. In the context of Roundcube and the Calendar Plus plugin, Nginx serves as the web server that handles HTTP requests and serves the Roundcube webmail client to users. The Calendar Plus plugin requires specific Nginx settings to correctly route requests to its built-in CalDAV server.
This is where I'm encountering difficulties due to the way Cloudron manages Nginx configurations. Cloudron is a platform for running apps on your server with automatic handling of server tasks like Nginx configuration, security updates, backups, and more. While this makes managing apps on a server much easier, it also means that customizing the Nginx configuration for a specific app or plugin, like in this case, can be challenging.
To be clear, I'm not trying to package a new "Roundcube Plus" app. I'm simply trying to get the Calendar Plus plugin to work with my existing Roundcube installation on Cloudron. The issue is not with the plugin compatibility but with the Nginx configuration required by the plugin's CalDAV server.
I hope this clarifies the situation and the role of Nginx in it. I appreciate your engagement in this discussion and look forward to any further insights you might have.
Best regards,
Xandrrix -
Hello Girish! Thank you for your response and for your questions. Allow me to clarify...
Roundcube Plus, also known as xcalendar (which goes pretty far back if you trace its origins), is a plugin for Roundcube. These plugins are indeed compatible with the standard Roundcube installation! Many users, including myself, find these plugins to be a valuable addition to Roundcube's base functionality. Much like you have a humble cost for ya'lls services, so too do they; thus, they've kept their plugins up to date with the latest releases of
CloudronRoundcube for many years now (likely initially having forked xcalendar (not sure though)).Currently, I'm honestly a fan of Cloudron. Pairing Cloudron with RoundCube is great. Pairing it with Calendar Plus plugin and now we're really talkin' This Calendar Plus plugin is the specific plugin I have installed (and almost completely working with little to no hiccups, just like any other!).
The challenge I'm currently facing involves the configuration of the built-in CalDAV server that comes with the Calendar Plus plugin. This feature is not required for the rest of the plugin to function. But in my case, I have 30+ employees and many of them need the ability to read & write to the calendar via CalDav.
According to the plugin's documentation (referenced in my first post), certain settings in the Nginx configuration need to be adjusted for the CalDAV "server" to function correctly. Specifically, these adjustments involve setting up a (optionally wildcard to handle for email clients that mishandle passwords (see docs)) subdomain and configuring Nginx to serve requests to this subdomain using a specific index.php file located in the Roundcube plugins/xcalendar/caldav directory, literally. Nothing too major.
Correct me if I'm wrong, but from what I can tell, I think Cloudron typically handles Nginx configurations automatically for each installed app. However, in this specific case, I am very much hoping for assistance in implementing custom Nginx settings to accommodate the requirements of the Calendar Plus plugin. In my opinion, there could be some synergies between your business and Roundcube Plus with regards to "cross traffic" so to speak. But, I'm not affiliated or otherwise too terribly concerned with that. Rather, I just thought it could be a reason to consider my ask here.
To summarize, here's what I'm trying to accomplish:
Direct a (wildcard) subdomain (for example, *.caldav.mydomain.com) to the Roundcube plugins/xcalendar/caldav directory.
Ensure all requests to this subdomain are rewritten and served by the index.php file in that directory.
Implement this functionality by adding specific rewrite rules to the Nginx configuration.
I'm not attempting to package a new "Roundcube Plus" app. My goal is simply to get the Calendar Plus plugin to work with my existing Roundcube installation on Cloudron. I understand that Cloudron has built-in functionality for managing apps, but in this case, the standard app setup doesn't cover the requirements of the plugin. But if this is what I must do, I'm open to it as long as I don't lose the ability to update all the same as I have been. (Keep up the good work!)I hope this clarifies my situation! I would greatly appreciate any guidance or assistance you could provide on how to navigate this.
Thank you for your time and consideration.
Cheers Brother,
Xandrrix -
@xandrrix thanks for the detailed clarification! I understand your situation now.
The plugin basically needs a "wildcard" domain of it's own. This is quite a custom setup and hard for us to manage in the roundcube package itself.
A workaround is to manage roundcube yourself by installing it in the LAMP app. The LAMP app has the
multiDomain
feature flag. What this means is that once you have roundcube working, you can add*.caldav.mydomain.com
in the Location section of the app. You also have complete control of how the app processes requests since you control the apache config - https://docs.cloudron.io/apps/lamp/#apache-settings . Would something like that work? -
Sorry for the delay in response. Yes, this functioned as needed! Thank you, Sir @girish. Admittedly it took quite some time for me to get the time needed to sit down and "from scratch" it, so to speak. In the end, I'm likely going to make use of NextCloud's Email Client since internally we took a vote. NextCloud's email combined with that Calendar won out (despite my personal feelings regarding the added maintenance (black box-ish-ness) complexity and the "speed" (or lack there of) of their client).
Girish, thank you. In the end, your advice was solid. Entirely worked as needed. And it was only then that we, as a company, could make a final call to go a different direction for an email client.
Keep up the good work brother. Appreciate what you do!
Cheers,
Xand