Skip to Content

Self-host Nextcloud on redu

Nextcloud is a self-hosted file sync, sharing, and collaboration suite, a private alternative to Google Drive and Office where your files, calendars, and documents live on infrastructure you control. People self-host it to keep their data out of third-party clouds. On redu, your AI agent runs Nextcloud for you on a real VM in the EU, so you set up no servers, no TLS, and no DNS by hand.

License: Nextcloud is licensed under AGPL-3.0. AGPL, GPL, and permissive licenses all allow self-hosting freely, and in this guide you are the operator running Nextcloud on your own redu infrastructure.

Deploy it with your agent

Connect the redu MCP:

claude mcp add --transport http redu-cloud https://mcp.redu.cloud/mcp

Point your agent (Claude Code is the example here, but any MCP client works) at Nextcloud’s official Docker setup and tell it:

Deploy Nextcloud on redu using its official docker-compose, and expose the web UI.

Your agent uses deploy_compose to run the whole stack on one EU VM with podman-compose up -d --build, then exposes the Nextcloud web UI at https://<name>.redu.cloud. redu never rewrites your compose file, so the stack you defined is the stack that runs.

Database

Nextcloud uses SQLite by default and also supports PostgreSQL and MySQL/MariaDB, configured through environment variables. You have two clean options:

  • Keep the db service from the compose file. Most Nextcloud compose setups ship a Postgres or MariaDB service alongside the app. Deploy as-is and Nextcloud talks to that container. This is the default (database: "compose") and needs nothing extra.

  • Use a redu managed Postgres. Have the agent provision a separate managed Postgres VM and point Nextcloud at it:

    Deploy Nextcloud on redu with a managed Postgres database, and expose the web UI.

    The connection env is appended to the compose project’s .env, and DATABASE_* aliases are injected alongside the standard PG* variables so the app connects without manual mapping.

If you prefer the simplest possible footprint, Nextcloud can also run on its bundled SQLite store with no external database, though a real database is recommended for anything beyond a quick trial.

Access it

Once the deploy finishes, Nextcloud is live at https://<name>.redu.cloud with TLS already handled by a wildcard cert, no per-app certificate setup. Open that URL in your browser and complete Nextcloud’s first-run setup, where you create the initial admin account and confirm the database connection before signing in.

Keep it running

Deploys are self-healing: redu recreates and retries the stack until Nextcloud actually runs, and get_deployment returns the build log if you want to see what happened. Day two, your agent can SSH into the VM (via get_ssh_command and a keypair) to update Nextcloud, adjust configuration, or fix it in place, and commit any fixes back to your repo with a GitHub token. It is a real EU-hosted machine, billed by the hour, so you can operate it like any server you own.

What’s next

Stuck? support@redu.cloud

Last updated on