Deployment guide

Migrate from Google Workspace to Nextcloud on a VPS

Deploy on a VPS Cloud →

Migrate from Google Workspace to Nextcloud on a VPS

Comparison13 min read10 steps

In 2025, Google raised Google Workspace prices in several regions: Business Starter now costs around $7/user/month, an increase of roughly 30% compared to the previous rate (source: workspace.google.com/pricing). For a 10-person team, that is several hundred dollars more every year. If you primarily use Drive, Gmail and Calendar, self-hosting on a VPS with Nextcloud is a concrete option worth evaluating. This guide focuses on what is specific to this migration: Google Takeout export, IMAP resynchronization of Gmail inboxes, DNS MX reconfiguration, and data import into Nextcloud. The Nextcloud setup itself is covered in our dedicated guide — here we go straight to the Google-specific steps.

Contents· Google Workspace — why re-evaluate in 2025-20261/11
  1. 01Google Workspace — why re-evaluate in 2025-2026
  2. 02What Nextcloud covers as a full Google Workspace replacement
  3. 03Functional map: Google Workspace → Nextcloud
  4. 04Technical prerequisites before you start
  5. 05Installing Nextcloud on the VPS via Docker Compose or AIO
  6. 06Exporting your data from Google (Google Takeout)
  7. 07Importing data into Nextcloud
  8. 08DNS MX reconfiguration
  9. 09Checklist before cutting over from Google Workspace
  10. 10Troubleshooting: common errors during migration
  11. 11Deploy Nextcloud and start the migration

Google Workspace — why re-evaluate in 2025-2026

The Google Workspace price increase announced in 2025 changed the economic equation for many small teams. Business Starter, the entry-level plan, now runs around $7/user/month in several markets, up from roughly $5.40 previously — an increase of about 30% (source: workspace.google.com/pricing). Business Standard is approaching $14/user/month. For a 10-user team, the annual Business Starter bill exceeds $840. For 5 users, it reaches around $420. These figures do not account for future increases: Google has already made two significant pricing revisions since 2022. Data sovereignty adds to the equation: data stored on Google servers is subject to US law (CLOUD Act), which is a concern for organizations handling sensitive data outside the United States. Nextcloud deployed on your own VPS addresses both concerns — a fixed cost independent of user count, with data hosted in the jurisdiction of your choice.

What Nextcloud covers as a full Google Workspace replacement

  • Google Drive → Nextcloud Files: storage, link sharing, version history, desktop and mobile sync via the official Nextcloud client
  • Gmail → Nextcloud Mail: IMAP/SMTP client built into Nextcloud, or a full mail server (Mailcow, Stalwart) on the same or a dedicated VPS
  • Google Calendar → Nextcloud Calendar: native CalDAV, compatible with Thunderbird, Apple Calendar, Android and iOS apps, and any standard calendar client
  • Google Contacts → Nextcloud Contacts: native CardDAV, synced with the same clients as Calendar
  • Google Meet → Nextcloud Talk: integrated WebRTC video conferencing, instant messaging, screen sharing, up to several dozen participants depending on VPS resources
  • Google Docs / Sheets / Slides → Collabora Office in Nextcloud AIO: LibreOffice-based online editor, real-time co-editing, OOXML formats (.docx, .xlsx, .pptx) preserved
  • Google Sites / internal pages → Nextcloud Notes or Wiki apps: collaborative markdown editing, internal documentation directly in Nextcloud.
  • Google Forms → Nextcloud Forms: form and survey builder integrated in the Nextcloud interface

Functional map: Google Workspace → Nextcloud

Scroll the table

FeatureGoogle WorkspaceNextcloud
File storageGoogle Drive (15 GB shared on free, 30 GB/user on Business Starter)Nextcloud Files — limited only by VPS disk size, no per-user quota
EmailGmail (IMAP/SMTP exposed, web interface)Nextcloud Mail (IMAP client) + standalone mail server (Mailcow, Stalwart) for hosting inboxes
CalendarGoogle Calendar (CalDAV available)Nextcloud Calendar (native CalDAV, calendar sharing, invitations)
ContactsGoogle Contacts (CardDAV available)Nextcloud Contacts (native CardDAV, groups, vCard import)
Video conferencingGoogle Meet (up to 100 participants on Business Starter)Nextcloud Talk (WebRTC, depends on server resources)
Collaborative documentsGoogle Docs / Sheets / Slides (proprietary formats)Collabora Office (OOXML formats, compatible with Microsoft Office)
Cost for 5 usersAround $35/month (around $7/user/month, 2025 pricing)99 DH/month (fixed VPS, independent of user count)
Cost for 10 usersAround $70/month (around $7/user/month, 2025 pricing)99 DH/month (same VPS — cost does not grow with users)

Technical prerequisites before you start

Before starting the migration, verify three things. First, the VPS: Nextcloud All-in-One (AIO) requires at minimum 4 GB RAM for use without Collabora Office, 8 GB if you enable document co-editing. Storage must be SSD — spinning disks significantly degrade PostgreSQL performance. Plan for your current Google Drive volume plus a 30% growth margin. Second, the domain: you will need a domain name pointing to the VPS for the Nextcloud Let's Encrypt TLS certificate, and a subdomain or dedicated domain for the mail server if you are also hosting email. Third, PHP is not required separately if you use Nextcloud AIO (Docker): everything is encapsulated in containers. However, Docker Engine must be installed on the VPS — the ServOrbit template pre-configures this. You will also need SSH access to the VPS for migration steps and a workstation with Python or Perl for imapsync.

Installing Nextcloud on the VPS via Docker Compose or AIO

  1. Provision the VPS from the ServOrbit marketplace

    From the ServOrbit client area, select the Nextcloud template in the collaboration category. The VPS is delivered with Docker Engine installed, the bridge network configured, and basic firewall rules (ports 80 and 443 open, port 8080 restricted). Note the public IP address of the VPS.

  2. Launch the Nextcloud AIO master container

    Connect via SSH and launch the AIO container with: docker run --sig-proxy=false --name nextcloud-aio-mastercontainer --restart always --publish 80:80 --publish 8080:8080 --publish 443:443/tcp --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config --volume /var/run/docker.sock:/var/run/docker.sock:ro nextcloud/all-in-one:latest. This command comes from the official Nextcloud AIO documentation (github.com/nextcloud/all-in-one).

  3. Configure the domain and TLS certificate

    Access the AIO interface at https://YOUR_IP:8080. Enter your domain (e.g. nextcloud.your-domain.com). AIO automatically provisions a Let's Encrypt certificate via ACME — the domain must already point to the VPS via a DNS A record. Validate the initial configuration with the AIO password displayed on first launch.

  4. Enable optional containers

    In the AIO interface, enable Collabora Online (document co-editing), Nextcloud Talk (video conferencing), and Nextcloud Fulltextsearch (file-content search). For a migration from Google Workspace, also enable ClamAV if you are handling sensitive data. Start all selected containers.

  5. Create user accounts

    In the Nextcloud admin interface (Settings > Users), create an account for each team member before importing data. Set storage quotas based on each user's Drive volume. Nextcloud supports LDAP authentication if your organization already has an Active Directory or LDAP directory.

Exporting your data from Google (Google Takeout)

Google Takeout (takeout.google.com) is the official Google data export tool. It lets you export Drive, Gmail, Contacts and Calendar in one operation or separately. Here are the exact steps. Sign in with the Google Workspace account to export. Go to takeout.google.com. By default, all services are selected: deselect all (click 'Deselect all'), then check only the services relevant to the migration: Google Drive, Gmail, Google Contacts, Google Calendar. For Google Drive, leave the default format (Google Docs stay as .gdoc, other files keep their original format) or choose 'Convert to compatible Office formats' if you prefer .docx/.xlsx directly. For Gmail, the export format is MBOX — one file per label. For Google Contacts, the export is vCard (.vcf). For Google Calendar, the export is iCal (.ics). Click 'Next step', choose frequency (one-time), delivery method (download link by email), and maximum archive size (2 GB recommended for easier downloading). Click 'Create export'. The delay varies by volume: from a few minutes for a small account to several hours for a Drive with tens of gigabytes. Google sends you an email with download links once the archive is ready. Links expire after 7 days.

Importing data into Nextcloud

  1. Import Google Drive → Nextcloud Files (via SFTP or WebDAV)

    Extract the Google Takeout archive on your workstation. The Drive folder contains your complete file tree. Transfer files to the VPS via SFTP: sftp user@VPS_IP then put -r /local/path/Drive/* /var/nextcloud/data/USERNAME/files/Drive-import/. After the transfer, force reindexing from the VPS: docker exec -it nextcloud-aio-nextcloud php occ files:scan --all. Files then appear in the Nextcloud interface. Alternative: configure an rclone gdrive remote pointing to Google Drive and a WebDAV remote to Nextcloud, then run rclone sync gdrive: nextcloud:/Drive-import/ --progress --transfers 4. rclone resumes automatically on interruption.

  2. Import Gmail → Nextcloud Mail (imapsync)

    imapsync is the reference tool for IMAP migration. Install it on the VPS or your workstation (apt install imapsync or via Docker: docker run gilleslamiral/imapsync). The basic command to sync a Gmail inbox to a target IMAP server is: imapsync --host1 imap.gmail.com --ssl1 --user1 [email protected] --password1 'GOOGLE_APP_PASSWORD' --host2 TARGET_IMAP_SERVER --ssl2 --user2 [email protected] --password2 'TARGET_PASSWORD'. For Gmail, the password must be a Google App Password (account.google.com > Security > App passwords) — Gmail blocks IMAP connections with the main password when two-step verification is enabled. Add --exclude 'All Mail' --exclude 'Spam' --exclude 'Trash' to avoid duplicating all messages (Gmail places every message in 'All Mail' in addition to its label). The --syncinternaldates option preserves original email dates.

  3. Import Google Contacts → Nextcloud Contacts (vCard)

    The Google Takeout archive includes a Contacts.vcf file (or multiple .vcf files per contact group). In Nextcloud, open the Contacts app. Click the three dots in the top right, then 'Import contacts'. Select the .vcf file. Nextcloud imports all contacts in one pass. For large contact bases (>1000 entries), import in batches of 500 to avoid timeouts. After import, verify that profile photos and custom fields were preserved — they depend on the vCard 3.0 format used by Google.

  4. Import Google Calendar → Nextcloud Calendar (iCal)

    The Google Takeout archive contains a Calendar folder with one .ics file per calendar. In Nextcloud Calendar, click the three dots next to the target calendar (or create a new one), then 'Import calendar'. Select the corresponding .ics file. For shared calendars (team, resources), first create the calendar in Nextcloud with the correct sharing permissions, then import the events. Recurring events, invitations and time zones are preserved by the iCal format.

  5. Reconfigure desktop and mobile clients

    After the import, reconfigure each workstation: install the Nextcloud client (nextcloud.com/install) for file synchronization. For calendars and contacts, add the CalDAV/CardDAV account in Thunderbird, Apple Mail/Calendar, or the Android/iOS calendar app — the base URL is https://nextcloud.your-domain.com/remote.php/dav/. Nextcloud users can find these URLs in Settings > Mobile & Desktop.

DNS MX reconfiguration

MX reconfiguration is the step that determines where new emails arrive after the cutover. As long as MX records point to Google's servers (aspmx.l.google.com and its variants), new messages continue to arrive in Gmail even if you have already synchronized the history via imapsync. The recommended procedure is as follows. Step 1 — Prepare the target mail server (Mailcow, Stalwart, or any SMTP/IMAP server) on your VPS or a dedicated VPS. Verify the server responds correctly on ports 25 (inbound SMTP), 587 (submission SMTP) and 993 (IMAP SSL) before touching DNS. Step 2 — Create the necessary DNS records in your domain zone: the MX record pointing to your mail server (e.g. mail.your-domain.com, priority 10), the A or CNAME record for mail.your-domain.com pointing to the server IP, the SPF record (e.g. v=spf1 ip4:YOUR_SERVER_IP ~all), the DKIM key generated by your mail server, and the DMARC record (e.g. v=DMARC1; p=none; rua=mailto:[email protected]). Step 3 — Reduce the TTL of the existing MX record to 300 seconds (5 minutes) at least 24 hours before the cutover — high TTL values (3600s, 86400s) mean external DNS servers take a long time to propagate the change. Step 4 — Perform the cutover by replacing the Google MX records with your MX record. Monitor your mail server logs for the first 30 minutes to confirm that the first messages arrive correctly. Step 5 — Wait 24 to 48 hours for full DNS propagation before deleting the Google Workspace configuration.

Checklist before cutting over from Google Workspace

Before canceling Google Workspace, verify these points: complete Google Takeout export downloaded and extracted locally (do not rely on export links that expire after 7 days); imapsync synchronization complete and validated by sample (open 10-20 messages in Nextcloud Mail and check attachments); contacts and calendars imported and visible in Nextcloud from at least one mobile client; new emails arriving on the target mail server for at least 48 hours (TTL propagated); desktop clients reconfigured for all team members; Nextcloud passwords communicated to all users and access tested; SPF, DKIM and DMARC records validated with an online tool (mxtoolbox.com or mail-tester.com) — a misconfigured server ends up in spam. Keep Google Workspace active for at least 2 weeks after the cutover: emails in transit may still arrive in Gmail for several days.

Troubleshooting: common errors during migration

Four situations come up regularly. First, imapsync stuck on 'Too many connections': Gmail limits the number of simultaneous IMAP connections. Add the --gmail1 option to the imapsync command (activates Gmail-specific parameters: throttling management, automatic exclusion of All Mail) and reduce parallelism with --maxprocs 1. If the block persists, wait 15 minutes and relaunch — imapsync resumes from where it left off. Second, Google Docs files (.gdoc, .gsheet, .gslide) do not appear in Nextcloud after import: these files are JSON shortcuts of a few bytes, not real documents. To convert them, you have two options: download them directly from Google Drive in Office format before Takeout export (File > Download > .docx), or use the Takeout export with 'Include Office files (if applicable)' checked, which converts Google formats to OOXML. Third, imported emails show today's date instead of the original date: add --syncinternaldates to the imapsync command to preserve internal IMAP dates. Without this flag, mail clients sort by server arrival date, not original send date. Fourth, the MX change does not propagate or emails still arrive in Gmail: verify that the TTL was lowered before the cutover and wait the time corresponding to the previous TTL. Use the command dig MX your-domain.com @8.8.8.8 to query Google DNS and check which MX value they are currently serving.

Deploy Nextcloud and start the migration

Migrating from Google Workspace to Nextcloud is a one-day project for a small well-prepared team. The Google Takeout export, imapsync synchronization, and contacts and calendar import all run in parallel once Nextcloud is operational. The MX cutover itself is the shortest step — a few minutes in the DNS interface — and the most visible: it marks the end of dependence on Google's servers. The economic gain is immediate: for a 10-person team, a ServOrbit VPS with Nextcloud AIO costs a fixed amount per month versus around $70 at Google (around $7/user/month, 2025 pricing), for a return on investment within a few months. For 5 users, the break-even is reached even faster. Nextcloud is available in the ServOrbit marketplace with a pre-configured template: Docker Engine, bridge network, firewall, and persistent volumes are ready. You just need to enter your domain, enable the optional containers, and start the import.

Déployer Nextcloud sur mon VPS

Le template Nextcloud ServOrbit préconfigure Docker, le réseau et le pare-feu. Renseignez votre domaine, activez Collabora Office et Nextcloud Talk, puis lancez la migration depuis Google Workspace en suivant ce guide.

Need help?

Browse our help center and FAQ, or reach our team — callback, WhatsApp or email. Support in French, English and Arabic.

Message us on WhatsAppopens in a new tab