Display external websites directly in your Nextcloud dashboard with this customizable widget

In this example, I added my Glance Dashboard as an iFrame
- ๐ Embed any website in your Nextcloud dashboard
- ๐ค Customizable widget title
- ๐จ Support for custom icons using Simple Icons with the
si:
prefix - ๐ญ Custom icon coloring
- ๐ Adjustable iframe height
- ๐ฅ๏ธ Extra-wide display option (2 columns)
- ๐ฏ Clean, responsive design that integrates with Nextcloud themes
- ๐ค Separate Personal and Public iFrame Widgets
- ๐ Multi-language support with translations
- ๐ 3-Column Size
- ๐ Refresh Button (or Refresh Timer Option)
- ๐ฅ Widget per Group allocation
The iFrame Widget provides both admin/public and personal configuration options, allowing administrators to set up shared widgets for all users while enabling individual users to create their own personalized widgets.
Access the administrator settings from:
- Settings โ Administration โ iFrame Widget
- Configure the following options:
- ๐ค Widget Title: Set a custom title (or leave empty to hide the header)
- ๐จ Widget Icon: Enter an icon name with
si:
prefix (e.g.,si:github
) - ๐ญ Icon Color: Choose a custom color for the icon
- ๐ URL to Display: The website URL to embed
- ๐ iFrame Height: Set a fixed height or use 100% (default)
- ๐ฅ๏ธ Extra Wide: Toggle to span two dashboard columns
These settings apply to the public widget that appears on all users' dashboards.
Each user can configure their own personal iFrame widget:
- Settings โ Personal โ iFrame Widget
- Configure the following options:
- ๐ค Widget Title: Set a custom title for your personal widget
- ๐จ Widget Icon: Choose your preferred icon with
si:
prefix - ๐ญ Icon Color: Set a custom color for your widget icon
- ๐ URL to Display: Add your personal website URL to embed
- ๐ iFrame Height: Adjust the height to fit your needs
- ๐ฅ๏ธ Extra Wide: Enable for a wider widget view
Personal widgets are visible only to the user who configured them and don't affect other users.
This widget uses Simple Icons for custom icons:
si:iconname
For example:
Browse available icons at SimpleIcons.org.
- ๐ฆ Nextcloud 30+
- ๐ Website to be embedded must allow iframe embedding (not all sites do)
- ๐ Content Security Policy (CSP) configuration to allow external domains in iframes
iFrame Widget supports multiple languages and can be translated. Currently, the following languages are available:
- ๐ฌ๐ง English (en)
- ๐ฉ๐ช German (de)
- ๐ซ๐ท French (fr)
- ๐ช๐ธ Spanish (es)
- ๐ฎ๐น Italian (it)
- ๐ณ๐ฑ Dutch (nl)
- ๐ท๐บ Russian (ru)
- ๐ต๐ฑ Polish (pl)
- ๐ต๐น Portuguese (pt)
- ๐ง๐ท Brazilian Portuguese (pt_BR)
- ๐จ๐ณ Chinese (Simplified) (zh_CN)
- ๐ฏ๐ต Japanese (ja)
- ๐จ๐ฟ Czech (cs)
- ๐ธ๐ช Swedish (sv)
- ๐ณ๐ด Norwegian Bokmรฅl (nb)
If you'd like to contribute translations, please see the translation guide.
By default, Nextcloud restricts which websites can be embedded in iframes for security reasons. To embed external websites in your dashboard widget, you'll need to add them to your server's Content Security Policy configuration:
Add the following to your Apache configuration or .htaccess file:
# Allow specific domain in iframes
Header set Content-Security-Policy "frame-src 'self' https://example.com;"
# If you need to allow multiple domains
Header set Content-Security-Policy "frame-src 'self' https://example.com https://another-site.org;"
Add the following to your Nginx server block:
# Allow specific domain in iframes
add_header Content-Security-Policy "frame-src 'self' https://example.com;";
# If you need to allow multiple domains
add_header Content-Security-Policy "frame-src 'self' https://example.com https://another-site.org;";
Some websites explicitly block being embedded in iframes using their own CSP headers (X-Frame-Options: DENY
or frame-ancestors: 'none'
). These sites cannot be embedded even if you configure your server correctly. In these cases, consider using the External Sites app with the redirect option instead.
- ๐ก๏ธ Websites embedded through iframes operate within their own security context
- ๐ซ Some websites block embedding using X-Frame-Options headers
- โ Use trusted sources for embedded content
If you experience issues with saving personal widget settings after upgrading to v0.7.0, try the following solutions:
-
๐๏ธ Clear the Nextcloud cache:
php occ maintenance:mode --on php occ memcache:clear php occ maintenance:mode --off
-
๐ Restart your web server: For Apache:
sudo systemctl restart apache2
For Nginx:
sudo systemctl restart nginx sudo systemctl restart php-fpm
-
โป๏ธ Disable and re-enable the app:
php occ app:disable iframewidget php occ app:enable iframewidget
-
๐ Check your browser console for JavaScript errors: If you see CSRF token errors, clearing your browser cache might help.
If the widget doesn't appear on your dashboard after installation:
- Make sure you've added it from the dashboard customization screen (+ button)
- Verify that there are no JavaScript errors in your browser console
- Check that the app is properly enabled:
php occ app:list | grep iframe
- Admin/Public Widget: Configured by administrators and appears on all users' dashboards with the same content
- Personal Widget: Each user can configure their own widget that's visible only to them
- You can use both simultaneously - users can have the admin-configured widget and their own personal widget
Both widgets need to be added to your dashboard using the "+" button in dashboard customization.
If you find this app useful, consider supporting this and future developments, which heavily relies on coffee:
This project is licensed under the AGPL-3.0-or-later license.
- Simple Icons - Used for widget icons