DEV Community

Cover image for Setup your personal cloud
techtech
techtech

Posted on

1

Setup your personal cloud

This article shows you how to install your own Nextcloud on Ubuntu 23.X or 22.X LTS!

If you like this article, we would be very happy about a like and a comment! ❤️


updating

apt update && apt upgrade -y

Installing apache

apt install apache2

Install PHP 8.2

apt install software-properties-common
add-apt-repository ppa:ondrej/php
apt update

Install PHP & Moduls

apt install apt install libapache2-mod-php php php-zip php-dompdf php-xml php-mbstring php-gd php-curl php-imagick libmagickcore-6.q16-6-extra php-intl php-bcmath php-gmp php-cli php-json php-mysql php-pear unzip nano php-apcu redis-server ufw php-redis php-smbclient php-ldap

If you are asked to confirm something during any installation, you must also do this.

adjust PHP.ini file

nano /etc/php/8.2/apache2/php.ini

memory_limit = 2048M
upload_max_filesize = 20G
post_max_size = 20G
date.timezone = Europe/Berlin
output_buffering = Off
Enter fullscreen mode Exit fullscreen mode

Install Databse Server

apt install mariadb-server

Maria DB Server Konfiguration

mysql_secure_installation

open SQL dialoge

mysql

create database calles nextcloud

CREATE DATABASE nextcloud;

create database user with password

CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'password_here';

grant accesss to databse

GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost';

save changes and exit

FLUSH PRIVILEGES;

EXIT;

Download lastest nextcloud version

cd /tmp && wget https://download.nextcloud.com/server/releases/latest.zip
unzip latest.zip

mv nextcloud /var/www/

adjust apache conf

nano /etc/apache2/sites-available/000-default.conf

-> change /var/www/html to /var/www/nextcloud

Enable the NextCloud and Rewrite Module

a2enmod rewrite
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime

restart apache

service apache2 restart

prepare data folder

mkdir /home/data/
chown -R www-data:www-data /home/data/
chown -R www-data:www-data /var/www/nextcloud/
chmod -R 755 /var/www/nextcloud/

Neon image

Serverless Postgres in 300ms (❗️)

10 free databases with autoscaling, scale-to-zero, and read replicas. Start building without infrastructure headaches. No credit card needed.

Try for Free →

Top comments (0)

Image of Stellar post

🚀 Stellar Dev Diaries Series: Episode 1 is LIVE!

Ever wondered what it takes to build a web3 startup from scratch? In the Stellar Dev Diaries series, we follow the journey of a team of developers building on the Stellar Network as they go from hackathon win to getting funded and launching on mainnet.

Read more

👋 Kindness is contagious

Dive into this insightful write-up, celebrated within the collaborative DEV Community. Developers at any stage are invited to contribute and elevate our shared skills.

A simple "thank you" can boost someone’s spirits—leave your kudos in the comments!

On DEV, exchanging ideas fuels progress and deepens our connections. If this post helped you, a brief note of thanks goes a long way.

Okay