Install NextCloud On Ubuntu 22.04 | Complete Setup | APACHE, PHP-FPM, OPCACHE, APCU, REDIS, SSL, H2
HTML-код
- Опубликовано: 4 июл 2024
- In this tutorial, I have demonstrated How to Install NextCloud On Ubuntu 22.04 LTS. This is a Complete Nextcloud Setup. For Nextcloud Performance and Security, I have installed and configured php-fpm, opcache, apcu, redis, ssl, and enabled http2.
Nextcloud is a file hosting system that allows us to store our personal content like documents, pictures, videos, etc, and share it with others. Here we will see How to Install NextCloud On Ubuntu 22.04 LTS this will be a complete guide. Instead of relying on external service providers for our personal and business documents, Nextcloud gives us the freedom to store them on our own servers or in trusted data centers. it's a self-managed centralized document and file management system. It is Open-Source hence enabling us to use and adapt the application as we need. We have full control over the application. So we can provide our own security measures to secure our contents.
With NextCloud we have installed php-fpm for faster php processing, php-fpm is faster than Apache's default mpm-prefork module. We have enabled the Opcache for byte code caching with the PHP, we have included apcu for local data caching and redis is used for distributed file locking, which is also a memory caching component, we have installed Nextcloud SSL and enabled http2 for Nextcloud security and loading performance improvement, http2 loads components from the server synchronously.
👉 Blog Post URL: mailserverguru.com/install-ne...
Chapters:
00:00 - Intro
00:42 - Nextcloud Installation Detail List
01:15 - Vultr VPS Setup
02:25 - Cloudflare DNS Configuration
03:10 - Install Nextcloud on Ubuntu 22.04
07:00 - Install Nextcloud from the Command Line
09:20 - Install and Configure PHP-FPM with Apache
12:42 - PHP-FPM Pool Configurations
15:30 - Enable Opcache for PHP Bytecode Caching
17:08 - Install and Configure APCU for Nextcloud Data Caching
18:39 - Install and Configure Redis for Nextcloud File Locking
23:20 - Install LetsEncrypt SSL on Nextcloud
24:54 - Enable HTTP2 for Nextcloud Loading Performance
27:11 - Enable http Strict-Transport-Security on Apache.
28:38 - Nextcloud Pretty URLS's Configurations.
#nextcloud #nextcloudsetup #nextcloudinstall
🔔 If you want to learn more, Please visit the WEBSITE:
👉 www.mailserverguru.com
🔔 Please SUBSCRIBE to my Channel, to get my latest videos:
👉 ruclips.net/user/mailservergur...
★☆★ CONNECT ON SOCIAL MEDIA ★☆★
👉 𝗟𝗶𝗻𝗸𝗲𝗱𝗜𝗻: / munnavai
👉 𝗙𝗮𝗰𝗲𝗯𝗼𝗼𝗸: / mailserverguru
👉 𝗧𝘄𝗶𝘁𝘁𝗲𝗿: / mailserverguru
𝗔𝘂𝘁𝗵𝗼𝗿: 𝗠.𝗠.𝗥𝗮𝗵𝗺𝗮𝗻 𝗠𝘂𝗻𝗻𝗮
𝗘𝗺𝗮𝗶𝗹: 𝗺𝘂𝗻𝗻𝗮𝘃𝗮𝗶@𝗴𝗺𝗮𝗶𝗹.𝗰𝗼𝗺 || 𝗪𝗵𝗮𝘁𝘀𝗔𝗽𝗽: +𝟴𝟴𝟬𝟭𝟵𝟭𝟮𝟬𝟲𝟰𝟰𝟴𝟯 || 𝗦𝗸𝘆𝗽𝗲: 𝗺𝘂𝗻𝗻𝗮.𝘀𝘆𝘀𝗮𝗱𝗺𝗶𝗻
In this tutorial, I have demonstrated How to Install NextCloud On Ubuntu 22.04 LTS. This is a Complete Setup with Improving Performance and Security.
Thanks Man!!! I have been trying for almost 2 weeks now, I always end up having some type of error when following someone's tutorial. You just nailed it. Thanks
You are most Welcome !!
I don't ever comment on videos, but this has immensely helped me out with my struggle in figuring out nextcloud on ubuntu. Thank you so much!
You are most Welcome !!
Wow, what a concise tutorial. I like that you explained why you were doing what you were doing. A lot of tutorials just say 'do this' without explaining why. This has helped me learn a lot. Thanks.
Glad it Helped !! 🙂
This is by far the best tutorial on the internet. Great job Sir!! like the poster below, I got it working after many days of trying.
Great to hear it helped !! you are most welcome !!
Brill - all worked as described - Thanks😁👍
You are most Welcome !!
Bravo! Perfect tutorial, now I got working cloud after 15 days of trying. Thanks bro.
You are Most Welcome !!
Great Tutorial!! Thanks!!
You are Most Welcome !!
This has saved me so much time, such a clear and concise tutorial! Thank you so much, you are a great teacher!
You are most Welcome !!
Good job! You best serverguru!
You are most Welcome !!
Good job, my man!!! Thanks
You are most Welcome !!
very very thanks bhai, helpful video
You are Welcome !!
Thanks for this lesson.
You are Welcome !!
Working! 100%
You are most Welcome !!
what were you doing exactly in Vultr ? and what did you do at 2:30 onwards in the dns - you pasted in an IP address - where did you get it from ?
Good job. You've installed the Nextcloud on the apache default site, how about if you install it on the apache with also a wordpress site, will there be any conflits ?
Thanks.
Hello,
Thank you for the quality of your content.
As I'm not a computer expert, I installed nextcloud via the logithéque.
It works fine locally.
My question is:
Is it possible to follow your advice in the same order even if I've already installed nextcloud?
Or is there another way?
Thank you in advance.
how to chage data directory to external drive ??
could you please make a tutorial for advance private email server installation,. for example exim email for mta, spamfilter, nginx, letsentrctipy, opcache , phpfpm, runcube for receiving and others? i want to install everything with my hands but i m not sure what software mta i need to use it.
Sure, i will, Thanks
hi can you help me please how to fix this ? i dont have any Domain like yours . can i put only my Gmail ? how to fix this help me please ....
Hello, can you add a section on how to make SSL on IP because I don't have a domain, I have a cloud in the local network? you can get a free domain, you will show you how to upload it
best regards
Hello please i have this message at step : 1. Run the CLI Command
i follow all what you do
Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'nextcloud'@'localhost' (using password: YES)
hi, if i had two instances of nextcloud on the same server, i would set them exactly the same? stupdi question: are they not going to get mixed up in the redis cache ... ^^ ????
In that case, i guess you have to see how multiple site can use the same redis server, it is very possible, because it is a regular practice for the wordpress hosting to use redis as object cache in front of MySQL Server. Thanks
please, how do you fix cron problem with your config?
this worked for me:
# nano /etc/php/8.1/mods-available/apcu.ini
add:
apc.enable_cli=1
save and close
# service apache2 restart
you're not talking about CRON? have you in another video of yours?
indeed, seems like my cron job wouldn't achieve..
according to this guy, there might be a conflict with apcu:
ruclips.net/video/8JVhRtArovg/видео.html
I won't change a thing, I don't want to mess up with your indications
I'll wait for your reply
thanks
in my situation, phpinfo shows acpu up and running
but when i try (as in the linked video) sudo -u www-data php occ files:scan --all
I get:
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
with php -m, apcu is not listed, neither memcache ..
well, that's where i'm at now, without a cron working anymore .. :/
@@phenoumene please install a fresh ubuntu 22.04 then follow my videos or blog, don't mess up, the setup is just easy, i have tried the same several times. thanks
Add this line to php.ini: /etc/php/8.1/cli/php.ini
apc.enable_cli = 1
@@alexal4 Thanks !!
hi, is it a must to use the root account to do all this? (#)
Executing all these with sudo and being a root are same, you can go through a sudo user, thats not a big deal. Thanks
you're using php 8.1 when nextcloud recommends 8.0 (or 7.4) can you explain this choice?
@@phenoumene it works just fine, you can go with the 8 for production. Thanks
@@mailserverguru thank you too Rahman, you offer a very good and useful work here
Sorry, your link url error 🙏
Sorry, It is Fixed, just after few minutes. Please try Now. Thanks
@@mailserverguru ok thank you very much
@@mailserverguru I have a question, if I don't have a domain, can I use DNS in bind9 for https ssl?
@@reksadhena3778 You are Welcome !!
@@reksadhena3778 HTTPS, SSL are for Websites, not for DNS, How do you want to perform that without DNS ? you need to provide the domains web server detail on DNS to run your site. Thanks
after pasting into config.php the redis lines server giving me this:
Internal Server Error
The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log.
After installed the latest 8.1.13 php and re sett anything was ok... but still crying about imagick svg and
The PHP modules "gmp" and/or "bcmath" are not enabled. If you use WebAuthn passwordless authentication, these modules are required.
However php8.1-gmp and php8.1-bcmath is installed and php.ini added exetension=gmp... O.o
in config.php, i had to change the .sock and add '-server' - thats the file i've found in /var/run/redis
'redis' => [
'host' => '/var/run/redis/redis-server.sock',
my browser inspector still says h3, and not h2, as in your video
@@phenoumene Good, h3 is the latest http protocol,
NextCloud configuration directive may change, but i have tested with the latest one, you should be ok, if you follow the video. thanks
i think you're confusing with redis-server.pid
in the video @mailserverguru does a "systemctl restart redis" which is not in the blog
this restart creates redis.sock
@@mailserverguru no, it's not so easy because i've installed hestia as you recommended it in another video of yours 👍 it's sometimes quite different ..
for me : # find -name "redis.sock" => ./run/redis/redis.sock
changed in /etc/redis/redis.conf "sounixsocket /run/redis/redis.sock" no /var