• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Steps to Install NextCloud on Cloud Server (Nginx, Redis Cache)

By Abhishek Ghosh January 11, 2017 10:49 pm Updated on January 11, 2017

Steps to Install NextCloud on Cloud Server (Nginx, Redis Cache)

Advertisement

NextCloud is like your own Dropbox. Possibly you know about OwnCloud. That OwnCloud’s founder have quit to start up a new fork and a new company called NextCloud. OwnCloud had 2 types of softwares – free and paid. NextCloud is different than OwnCloud at some points, has no paid software but paid hosting. Here Are the Steps to Install NextCloud on Cloud Server With Nginx Server, Redis Cache, 2 FA, HTTPS.

 

NextCloud Official Resources

 

You’ll not need the resources at all, yet we are giving the appropriate resources for advance configuration, optimisation, bug reporting etc :

Vim
1
2
https://github.com/nextcloud/server
https://docs.nextcloud.com/server/11/admin_manual/installation/index.html

 

Steps to Install NextCloud on Cloud Server

 

We are using Ubuntu 16.04 LTS as server OS. Follow this guide up to step 2.3 on the table of contents to create a LEMP server. If you are using CentOS, simply use CentMinMod script to create LEMP server. Also create a database, database user following that guide.

Advertisement

---

So we are starting with Nginx, MySQL installed on server. First install Redis :

Vim
1
2
apt install redis-server php7.0-redis
nano /etc/redis/redis.conf

Change the maximum memory size. Run these commands :

Vim
1
2
3
4
service redis-server restart
service nginx restart
service php7.0-fpm restart
redis-cli monitor

We need to add binlog-format = mixed on my.cnf :

Vim
1
2
3
4
nano /etc/mysql/my.cnf
# in the [mysqld] block add
# binlog-format = mixed
service mysql restart

Our default config file i.e. /etc/nginx/sites-enabled/default should look like this :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
server {
listen 80;
server_name example.com;
return 301 https://example.com$request_uri;
location '/.well-known/acme-challenge' {
root /var/www/html/example.com;
allow all;
try_files $uri /$1;}
}
server {
listen 443 ssl http2;
server_name example.com;
root /var/www/html/example.com;
index index.php index.html index.htm;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ecdh_curve secp384r1;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-CHACHA20-POLY1305-D:ECDHE-RSA-CHACHA20-POLY1305-D:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA384';
ssl_prefer_server_ciphers on;
ssl_certificate /etc/nginx/ssl/example.com/privatekey.key;
ssl_certificate_key /etc/nginx/ssl/example.com/chain.pem;
ssl_trusted_certificate /etc/nginx/ssl/example.com/chain.pem;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.4.4 8.8.8.8 valid=300s;
resolver_timeout 5s;
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload";
add_header Content-Security-Policy "default-src https: data: 'unsafe-inline' 'unsafe-eval'" always;
add_header X-Content-Type-Options nosniff always;
add_header X-Xss-Protection "1; mode=block" always;
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location = /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
client_max_body_size 512M;
gzip off;
error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;
location / {
rewrite ^ /index.php$uri;
}
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
#Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}
location ~ ^/(?:updater|ocs-provider)(?:$|/) {
try_files $uri/ =404;
index index.php;
}
location ~* \.(?:css|js)$ {
try_files $uri /index.php$uri$is_args$args;
add_header Cache-Control "public, max-age=7200";
access_log off;
}
location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
try_files $uri /index.php$uri$is_args$args;
access_log off;
}
location '/.well-known/acme-challenge' {
root /var/www/html/example.com;
allow all;
try_files $uri /$1;}
}

How to install Let’s Encrypt SSL certificate that is written here. Follow those steps and comeback here after finishing!

Vim
1
2
3
4
5
6
cd /var/www/html/
mkdir -p /var/www/html/example.com
wget https://download.nextcloud.com/server/releases/nextcloud-11.0.0.zip
unzip nextcloud-11.0.0.zip
mv nextcloud example.com
sudo chown -R www-data:www-data /var/www/html/example.com

Now after restarting Nginx, open your domain/subdomain on browser which is example.com here, there will be a web GUI based wizard.

Steps to Install NextCloud on Cloud Server (Nginx, Redis Cache)

We will now configure Redis as the cache server for Nextcloud :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
nano /var/www/html/example.com/config/config.php
# populate with this data. Add the following lines above the last line with `);` :
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.local' => '\OC\Memcache\Redis',
'filelocking.enabled' => 'true',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
     'host' => 'localhost',
     'timeout' => 0,
     'dbindex' => 0,
     'port' => 6379,
     ),

Nextcloud will give you option on Web GUI to encrypt the data and Two Factor Authentication.

Tagged With nextcloud redis , configure redis ubuntu nextcloud , paperuri:(09808239be5b39163a577db353dadd35) , install nextcloud server on windows , nextcloud , ngix redis nextcloud , nextcloud nginx redis , nextcloud 404 error nginx after install , nextcloud 11 debian php7 https nginx , x-robots-tag none

This Article Has Been Shared 710 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Steps to Install NextCloud on Cloud Server (Nginx, Redis Cache)

  • How to Upload Backup to Dropbox from Cloud Server

    Here is How to Upload Backup to Dropbox from Cloud Server in Case You Want To Keep Your Backup of Files and Database on a Free Cloud Storage.

  • Steps To Install Nginx Plus on Ubuntu Server (HP Cloud)

    Here Are the Steps To Install Nginx Plus on Ubuntu Server Running on HP Cloud. Nginx Plus is the Paid Version of Nginx with Extra Features.

  • WordPress XML-RPC Attack & Fake PHP5-FPM Error

    WordPress XML-RPC Attack Can Bring DDoS Resulting in Random 502 PHP5-FPM Errors on Nginx Server or Can Make the Database Down. Here is Fix.

  • Install Nginx HTTP/2 With ALPN on Ubuntu 14.04 From ondrej/nginx PPA

    In our previous guide, we have shown how to easily upgrade Nginx on Ubuntu 14.04 for HTTP/2 support. The required changes in the /etc/nginx/sites-enabled/default file, /etc/nginx/nginx.conf file and limitations of that way of installation has been discussed on this article. In this guide, we will show how to install Nginx HTTP/2 with ALPN on Ubuntu […]

  • Top Reasons Why Cloud Server Sucks Your Bucks

    Public Cloud is Deceptive From Sysadmin’s Point of View When Usage of RAM is More. Here Are Top Reasons Why Cloud Server Sucks Your Bucks.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • What is Configuration Management February 5, 2023
  • What is ChatGPT? February 3, 2023
  • Zebronics Pixaplay 16 : Entry Level Movie Projector Review February 2, 2023
  • What is Voice User Interface (VUI) January 31, 2023
  • Proxy Server: Design Pattern in Programming January 30, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Steps to Install NextCloud on Cloud Server (Nginx, Redis Cache)," in The Customize Windows, January 11, 2017, February 6, 2023, https://thecustomizewindows.com/2017/01/steps-install-nextcloud-cloud-server-nginx-redis-cache/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT