You know Nextcloud inside and out. You’ve set up your instance, you know which apps you couldn’t live without, and at some point you’ve probably thought: “I wish Nextcloud could also do this.”
You can build it yourself, and it doesn’t have to be in PHP. With ExApps, you can write Nextcloud apps in other programming languages like Python and run them as small web services. The ExApp track on Nextcloud Academy walks you through the whole process, from an empty folder to an app that’s ready for the Nextcloud App Store.
You don’t need to be a seasoned Python developer to follow along. If you know your way around the command line and have used Git before, the course takes it from there, one step at a time.
What is an ExApp?
Classic Nextcloud apps are written in PHP and run inside the Nextcloud server itself. ExApps (short for “external apps”) take a different approach: your app is its own small web service, running next to Nextcloud rather than inside it.
The bridge between the two is the Nextcloud AppAPI, which ships with Nextcloud. It forwards requests from Nextcloud to your app, checks that every request is authenticated, and manages your app’s lifecycle, for example what happens when an admin enables or disables it. Since your code runs in its own process, you can use any Python libraries you need without touching Nextcloud’s PHP environment.
In terms of user experience, ExApps feel like regular Nextcloud apps: they get their own entry in the navigation bar, use Nextcloud’s own Vue components, know who’s logged in, and can call back into Nextcloud for files, users, notifications, and more.
ExApps can be written in any language that speaks HTTP, but Python is an especially good fit because of the Nextcloud Python Framework. It handles authentication, the app lifecycle, and Nextcloud API calls out of the box. Add FastAPI for the backend and SQLAlchemy for the database and you’re working with a familiar, well-documented stack.
Building a Python ExApp for Nextcloud
Throughout the ExApp track, you use Python to build Pinboard, a small app for saving links. Each user gets their own private collection of pins, right inside Nextcloud.
The Pinboard example app lets multiple users add links to a collection
Pinboard is simple enough to finish, but real enough to touch every important part of an app: a backend API, a database, a user interface, user identity, and packaging. It’s also the same app the PHP track builds, so if you’re curious later, you can compare both approaches side by side.
The beginner track has eight modules and takes roughly 10–12 hours to complete:
1. Environment Setup: You set up a local Nextcloud development instance, make sure AppAPI is enabled, and register a special development daemon that lets you run your app directly on your machine, without rebuilding the Docker image every time you change something. Then you install the Nextcloud Python Framework and connect your first skeleton app to Nextcloud.
2. ExApp Anatomy and Request Lifecycle: Here you learn how the pieces fit together: the project structure, the info.xml manifest, and the lifecycle calls Nextcloud makes to your app. You also see how AppAPI authenticates every request, and you set up a Makefile so that make run and make register replace long terminal commands.
3. Backend Fundamentals: Pinboard shows up in Nextcloud’s navigation bar for the first time, and you write your first API endpoints with FastAPI. You also learn how to write to Nextcloud’s log and how to test your endpoints through AppAPI.
4. Database Layer: Unlike PHP apps, ExApps own their database entirely. You store pins in SQLite using SQLAlchemy, keep the data in the persistent storage AppAPI provides, and make sure every user only ever sees their own pins.
5. Frontend Toolchain: You set up the build pipeline for a Vue frontend. The twist compared to PHP apps: your Python service serves the compiled files, and the browser loads them through AppAPI. By the end, Pinboard displays its first message inside Nextcloud.
6. Your First Vue Component: Now Pinboard gets a real interface, built in three steps: a list of pins with loading and empty states, a form to add new pins, and success and error notifications. Because you’re using Nextcloud’s own components and theming variables, the app automatically adapts to dark mode and custom branding.
7. Users and Identity: You learn how AppAPI turns a user’s session into an identity your code can trust. Then you add the ability to delete pins, and make sure no one can delete anyone else’s, along with a lesson on why “this isn’t yours” should look exactly like “this doesn’t exist.”
8. Packaging and Deployment: Finally, you turn Pinboard into a release. You complete the app manifest and build a Docker image that runs on both x86 and ARM servers. Then you learn how to publish your app on the Nextcloud App Store, where admins can install it like any other app.
A taste of the code
How much code does it take to get started? Here’s the first endpoint from module 3:
@APP.get("/pins")
async def get_pins(nc: Annotated[NextcloudApp, Depends(nc_app)]):
"""Return all pins for the current user."""
nc.log(LogLvl.DEBUG, f"get_pins called by user: {nc.user}")
return []
That’s an authenticated API endpoint. The decorator defines the route, and Depends(nc_app) hands you a ready-to-use connection to Nextcloud on behalf of whoever made the request. nc.user tells you who that is, and nc.log() writes straight to the Nextcloud log. For now it returns an empty list. In module 4, it starts returning real pins from the database.
And getting your app into Nextcloud’s navigation bar? That’s a single call when your app is enabled:
Nextcloud Academy is currently in beta, with only the beginner tracks available right now. The intermediate track will build on Pinboard with file operations, event listeners, background jobs, OCC commands, and sharing.
Before you start, make sure you have:
Docker (with at least 8 GB of RAM it can use and about 20 GB of free disk space)
Python 3.10 or later
Basic Git skills and a GitHub account
If you spot a mistake or something is unclear along the way, every page has a “Report an error” link that opens an issue on GitHub. Feedback is very welcome.
Ready to build your first Nextcloud app in Python? Head over to Nextcloud Academy and start with module 1. And if PHP is more your thing, the PHP track builds the same app the classic way.
Nextcloud Hub offers several types of integrations for AI, from completely self-hosted options to integrations with external services like Open AI. Here's an overview of what you can use and where, and where it stands on our Ethical AI scale.
How do you modernize digital collaboration in government without losing control over your data?
Austria’s Federal Ministry for Economy, Energy and Tourism (BMWET) faced this challenge in 2024 - and decided to take a clear, pragmatic step toward digital sovereignty.
Nextcloud Hub 25 Autumn makes it easier to get started with powerful collaboration while fully in control of your data. From global design updates to improved usability and performance, discover our latest release in this blog.
Passionate about data privacy and Nextcloud? We invite you speak at the Nextcloud Community Conference to share your experience, knowledge and news with the community!
For the ninth time, Nextcloud has been nominated for the CloudComputing-Insider Readers’ Choice Award in the category of Cloud Content Management. We’d love to reach the top again! And we’re looking for the support of you and everyone else in our amazing community to get there. Nextcloud as the best Cloud Content Management tool? Only […]
In the Nextcloud 2024 wrap-up, we want to take a moment to celebrate this year's achievements. Join us as we continue to reimagine what’s possible - shaping a world where open source, privacy and connection come together and drive progress for the greater good.
Organisations, small and large, need a way to ensure the resiliency and digital sovereignty of their operations – an open-source, privacy-respecting alternative to Teams. And today, we present that solution - Nextcloud Talk.
Nextcloud has been recognized with the World Summit Award Germany that selects and promotes local digital innovation improving society, aiming to contribute to the United Nations' agenda of sustainable development goals.
DIE ZEIT, a prominent German outlet, interviewed Nextcloud’s founder Frank Karlitschek for an article on Microsoft’s anti-competitive behaviour on the European office software market. Read for a recap of the article and the key takeaways.
MagentaCLOUD’s migration to Nextcloud in 2021 resulted in a fully equipped Online Storage with an integrated online office suite that further improves the user experience, flexibility and security for customers.
We bring you a major update to the Nextcloud AI Assistant, plus the news we work with several big hosting providers like IONOS and OVHcloud to bring AI-as-a-Service options to you!
Bechtle and Nextcloud announce today a complete managed collaboration platform for the public sector that requires no tender and can be deployed immediately.
Discover how to make the switch from ownCloud to Nextcloud. Our quick guide provides insights into the migration process, helping you make the transition smoothly.
Today, US-based file sync & share vendor Kiteworks announced their acquisition of ownCloud and Dracoon. Kiteworks points out that their customers now have access to their file-sharing application. It is to be expected they will not maintain 3 similar products, but customers will have to migrate to the US firms’ platform or look for another […]
As part of Schleswig-Holstein's state digitization strategy, the state chancellery has announced they will work with Nextcloud to develop AI for working with government documents. This comes just after we announced the first private AI assistant last weekend with Hub 6. The German state already uses Nextcloud and their AI strategy aligns with our work on ethical, local AI technologies.
Our mission is to help individuals, businesses and organizations achieve digital sovereignty and regain control over their data. Nextcloud Hub 5 marks a massive step forward towards achieving this mission, putting the power of AI into your hands – in a way that keeps you in control. New release, new possibilities Hub 5 builds on […]
One year ago, the European Commission proposed the Digital Omnibus, a package to “simplify” EU digital rules. Its most important part is still being negotiated: a GDPR change that would make it easier for companies to train AI on your personal data, while EU governments want to weaken your right to say no. Here’s where things stand, who’s lobbying, and how to keep your data out of someone else’s AI.
What does the dependency on U.S. Big Tech put at risk and what can Canadian organizations learn from Europe’s digital sovereignty movement? In this article, we try to find the answers.
Jan Vales, System Administrator for the TUcloud at TU Wien, tells us about university's 35,000-user Nextcloud setup, how share links solved TU Wien’s external collaboration problems, and why he thinks open source should win over closed source.
We save some cookies to count visitors and make the site easier to use. This doesn't leave our server and isn't to track you personally!
See our Privacy Policy for more information. Customize
Statistics cookies collect information anonymously and help us understand how our visitors use our website. We use cloud-hosted Matomo
Service:Matomo
Cookies description:
_pk_ses*: Counts the first visit of the user
_pk_id*: Helps not to double count the visits.
mtm_cookie_consent: Remembers that consent for storing and using cookies was given by the user.
Cookies expiry:_pk_ses*: 30 Minuten
_pk_id*: 13 months
mtm_cookie_consent: 30 Dagen