• 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
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)

  • Nginx WordPress Configuration Sample File

    Here is Ready to Use Nginx Wordpress Configuration Sample File Which Can Used With Either Community Edition of Nginx or Nginx Plus & PHP5-FPM.

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud

    Here is a Step by Step Guide on Setting Up WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud with All Commands and the Configuration.

  • SSL Grade Optimization Tweak For Rackspace Cloud Server

    Here are the tweaks for SSL Grade Optimization for Rackspace Cloud Server for a typical Nginx web server. We have also explained the terms.

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

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
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