Skip to main content

Nextcloud Installation | Part 1

nextcloud.png

What is Nextcloud?

Nextcloud is a free, open-source file hosting and collaboration platform that can be installed on a web server. It allows users to store, share and sync files and data across multiple devices and platforms. It also includes collaboration features such as calendar and contact syncing, online document editing, and real-time chat. Nextcloud is a self-hosted alternative to services like Dropbox, Google Workspace and Microsoft 365.

Why Nextcloud?

There are several reasons why someone might choose to run their own Nextcloud instance.

  1. Control over data: By running your own Nextcloud, you have full control over where your data is stored and who has access to it.
  2. Privacy: With Nextcloud, you can ensure that your data is not being analyzed or used for advertising purposes.
  3. Customization: Nextcloud can be easily customized to suit your specific needs and requirements.
  4. Cost: Nextcloud is free and open-source software, so there are no ongoing subscription costs.
  5. Security: By running your own Nextcloud, you can implement your own security measures and protocols, which can be more secure than relying on a third-party service.
  6. Scalability: Nextcloud can scale to handle large numbers of users and large amounts of data.
  7. Integration: Nextcloud can integrate with other services, such as calendars and contacts, making it easy to manage all your data in one place.

Requirements

Please check Portainer & NPM & Vaultwarden Deployment | Part 3

At least 2GB system memory, but I recommend at least 4GB system memory available.

Get 20€ in cloud credits to get started with Hetzner on this link.

Installation

Before you proceed, you need to make sure that your server is properly secured and your firewall rules are in place!

Before you proceed, make sure you have secured docker daemon.
You can also refer to the securing Docker daemon.

Webnestify is here to help you with installation if needed. We will install your desired applications, in case of being stuck securing your docker or server.
For more information, please visit our custom deployment service page.

Follow video instructions and copy docker compose file into Portainer Stack section.

Video Walkthrough

Docker Compose file

version: "3.8"

volumes:
  nextcloud_aio_mastercontainer:
    name: nextcloud_aio_mastercontainer
services:    
  nextcloud:
    image: nextcloud/all-in-one:latest
    restart: unless-stopped
    container_name: nextcloud-aio-mastercontainer
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 8083:8080
    environment:
      - APACHE_PORT=11000
      - SKIP_DOMAIN_VALIDATION=false
      - APACHE_DISABLE_REWRITE_IP=1
      - NEXTCLOUD_TRUSTED_DOMAINS=YOUR-DOMAIN YOUR-IP # Your domain name + proxy host IP
      - TRUSTED_PROXIES=YOUR-IP # proxy host IP

Firewall Ports

Make sure to open following ports:

  1. Nextcloud Talk 3478/tcp and 3478/udp to Any IPv4
  2. AIO Admin Page 8083/tcp to YOUR DEDICATED IP

If you change port 8083 in compose file, make sure to update your firewall port also.

Nextcloud Configuration

Let's dive into configuration.

Video Walkthrough

Cyberpanel Fix

  1. Edit dovecot config file:
nano /etc/dovecot/dovecot.conf
  1. Add following at the end of dovecot.conf
local_name mail.domain.com {
  ssl_cert = </etc/letsencrypt/live/mail.domain.com/fullchain.pem
  ssl_key = </etc/letsencrypt/live/mail.domain.com/privkey.pem
}

Make sure to replace mail.domain.com to your values!

  1. Save file and exit
  2. Restart dovecot service:
systemctl restart dovecot

About Webnestify

Imagine a world where you can focus on your business and less time maintaining your cloud infrastrucure. With Webnestify cloud based solutions, we provide customized solutions for all types of companies to meet their needs; no matter how big or small they may be!

Read our reviews on Trustpilot!

Subscribe to our YouTube channel!

If you need to setup your own Docker instances or need help with security, visit our custom deployment service page.