← Back to Guides
Profile image for Tom Snelling

By Tom Snelling

Published 20th April 2022

Deploy Nextcloud on Northflank

Nextcloud is a free, open source, self-hostable file storage solution. In their own words:

A safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms.

This guide will walk you through deploying the Nextcloud Docker image on Northflank.

  1. Create a secret group. Pick a suitable name, and leave the variables empty for now. Any variables in this secret group will be automatically inherited by the service we create later.

  2. Create a database. Nextcloud supports MySQL and PostgreSQL databases, both of which Northflank provides. Create a new addon with the following configuration:

    1. Select either MySQL or PostgreSQL.

    2. Untick the Deploy with TLS option.

    3. Under Linked secret groups, find the secret group you just created and click Configure. This allows the connection details for our addon to be added to our existing secret group.

    4. Depending on whether you are using MySQL or PostgreSQL, link the following variables and add their aliases:

      MySQL:

      VariableAlias
      DATABASEMYSQL_DATABASE
      USERNAMEMYSQL_USER
      PASSWORDMYSQL_PASSWORD
      HOSTMYSQL_HOST

      PostgreSQL:

      VariableAlias
      DATABASEPOSTGRES_DB
      USERNAMEPOSTGRES_USER
      PASSWORDPOSTGRES_PASSWORD
      HOSTPOSTGRES_HOST

      Screenshot 2022-04-19 at 17.05.09.png

  3. Create a deployment service with the following configuration:

    1. External image using nextcloud:production.
    2. Public HTTP port 80 (this will be configured automatically).
    3. A resource plan of nf-compute-50 or higher is recommended.

    Screenshot 2022-04-19 at 16.58.01.png

  4. After your deployment service is created, navigate to the Volumes page, and add a new volume with the mount path /var/www/html. Select an appropriately sized disk for your requirements, the size can always be increased at a later date.

    Screenshot 2022-04-19 at 16.59.10.png

  5. Once your volume has been created and your deployment service has restarted, navigate to your public code.run domain shown in the top right corner of your service dashboard. You will be prompted with a Nextcloud setup screen: create a username & password, click 'Install' and wait for Nextcloud to perform its initial set up. This can take a few minutes, but only needs to be done once.

    Screenshot 2022-04-19 at 17.01.46.png

If you encounter any issues while following this guide we're happy to assist you with your Nextcloud deployment at support@northflank.com. At Northflank we also have dedicated support plans for business customers.

Demo video:

How to deploy Nextcloud on Northflank using official Docker image

Northflank allows you to deploy your code within minutes. Sign up for a Northflank account and create a free project to get started.

  • Multiple read and write replicas
  • Observe & monitor with real-time metrics & logs
  • Low latency and high performance
  • Private and optional public load balancing as well as Northflank local proxy
  • Dedicated support plans

Share this article with your network