You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are multiple ways of installing Nextcloud depending on your preferences, requirements and goals.
6
6
7
+
If you prefer installing from the source tarball, you can deploy Nextcloud
8
+
from scratch using a classic LAMP (Linux, Apache, MySQL/MariaDB, PHP) stack.
9
+
10
+
The :ref:`manual_installation_label` section provides a complete walk-through
11
+
for installing Nextcloud for use with Apache and MariaDB, using `the Nextcloud
12
+
.tar archive <https://nextcloud.com/install/>`_. Usage with other web servers
13
+
(e.g. Nginx) and database backends are also covered.
14
+
7
15
If you prefer an automated installation, you have the option to:
8
16
9
17
* use the `official Nextcloud installation method <https://github.com/nextcloud/all-in-one#nextcloud-all-in-one>`_. Nextcloud AIO provides easy deployment and maintenance with most features included in this one Nextcloud instance. It includes Office, a turnkey Backup solution, Imaginary (for previews of heic, heif, illustrator, pdf, svg, tiff and webp) and more.
@@ -16,74 +24,54 @@ If you prefer an automated installation, you have the option to:
16
24
17
25
.. tip:: For an enterprise-ready and scalable installation based on Helm Charts (also available for Podman), please `contact Nextcloud GmbH <https://nextcloud.com/enterprise/>`_.
18
26
19
-
In case you prefer installing from the source tarball, you can setup Nextcloud
20
-
from scratch using a classic LAMP stack (Linux, Apache, MySQL/MariaDB, PHP).
21
-
This document provides a complete walk-through for installing Nextcloud on
22
-
Ubuntu 24.04 LTS Server with Apache and MariaDB, using `the Nextcloud .tar
23
-
archive <https://nextcloud.com/install/>`_. This method is recommended to install Nextcloud.
24
-
25
-
This installation guide is giving a general overview of required dependencies and their configuration. For a distribution specific setup guide have a look at the :doc:`./example_ubuntu` and :doc:`./example_centos`.
27
+
.. _manual_installation_label:
26
28
27
-
.. _prerequisites_label:
29
+
Manual Installation
30
+
===================
28
31
32
+
This installation guide is giving a general overview of required dependencies
33
+
and their configuration. For distribution specific setup guide have a look at
34
+
the :doc:`./example_ubuntu`, :doc:`./example_centos`, etc.
29
35
30
-
.. note:: Admins of SELinux-enabled distributions such as CentOS, Fedora, and
31
-
Red Hat Enterprise Linux may need to set new rules to enable installing
32
-
Nextcloud. See :ref:`selinux_tips_label` for a suggested configuration.
36
+
.. _prerequisites_label:
33
37
34
-
Prerequisites for manual installation
35
-
-------------------------------------
38
+
Prerequisites
39
+
-------------
36
40
37
41
The Nextcloud .tar archive contains all of the required PHP modules.
38
42
Your Linux distribution should have packages for all required modules.
39
43
See :doc:`php_configuration` for a list of required and suggested modules.
40
44
41
-
You don’t need the WebDAV module for your Web server (i.e. Apache’s
42
-
``mod_webdav``), as Nextcloud has a built-in WebDAV server of its own,
43
-
SabreDAV.
44
-
If ``mod_webdav`` is enabled you must disable it for Nextcloud. (See
45
-
:ref:`apache_configuration_label` for an example configuration.)
45
+
.. note:: If your web server includes a WebDAV module of its own, make sure
46
+
to disable it so that it does not interfere with Nextcloud's own WebDAV
47
+
server.
48
+
49
+
.. note:: Admins of SELinux-enabled distributions such as CentOS, Fedora, and
50
+
Red Hat Enterprise Linux may need to set new rules to enable installing
51
+
Nextcloud. See :ref:`selinux_tips_label` for a suggested configuration.
46
52
47
53
.. _apache_configuration_label:
48
54
49
55
Apache Web server configuration
50
56
-------------------------------
51
57
52
-
Configuring Apache requires the creation of a single configuration
53
-
file. On Debian, Ubuntu, and their derivatives, this file will be
54
-
:file:`/etc/apache2/sites-available/nextcloud.conf`. On Fedora,
55
-
CentOS, RHEL, and similar systems, the configuration file will be
56
-
:file:`/etc/httpd/conf.d/nextcloud.conf`.
57
-
58
-
You can choose to install Nextcloud in a directory on an existing
59
-
webserver, for example `https://www.example.com/nextcloud/`, or in a
60
-
virtual host if you want Nextcloud to be accessible from its own
61
-
subdomain such as `https://cloud.example.com/`.
62
-
63
-
To use the directory-based installation, put the following in your
64
-
:file:`nextcloud.conf` replacing the **Directory** and **Alias** filepaths
65
-
with the filepaths appropriate for your system::
66
-
67
-
Alias /nextcloud "/var/www/nextcloud/"
58
+
For Apache-based deployments, we recommend serving Nextcloud from its own
59
+
virtual host, for example ``https://cloud.example.com/``. Installing
60
+
Nextcloud in a subdirectory of an existing site, for example
61
+
``https://www.example.com/nextcloud/``, is also supported.
68
62
69
-
<Directory /var/www/nextcloud/>
70
-
Require all granted
71
-
AllowOverride All
72
-
Options FollowSymLinks MultiViews
73
-
74
-
<IfModule mod_dav.c>
75
-
Dav off
76
-
</IfModule>
77
-
</Directory>
63
+
Nextcloud ships with a ``.htaccess`` file containing Apache-specific
64
+
rules. In most cases, it is sufficient to configure the virtual host and
65
+
allow overrides so Apache can apply the rules from Nextcloud's
66
+
``.htaccess`` file.
78
67
79
-
To use the virtual host installation, put the following in your
80
-
:file:`nextcloud.conf` replacing **ServerName**, as well as the
81
-
**DocumentRoot** and **Directory** filepaths with values appropriate
82
-
for your system::
68
+
The following example shows a minimal Apache virtual host
69
+
configuration. Replace ``ServerName``, ``DocumentRoot``, and
70
+
``Directory`` with values appropriate for your system::
83
71
84
72
<VirtualHost *:80>
85
73
DocumentRoot /var/www/nextcloud/
86
-
ServerName your.server.com
74
+
ServerName cloud.example.com
87
75
88
76
<Directory /var/www/nextcloud/>
89
77
Require all granted
@@ -96,81 +84,81 @@ for your system::
96
84
</Directory>
97
85
</VirtualHost>
98
86
87
+
When using SSL/TLS, make sure that the Apache ``ServerName`` matches
88
+
the hostname clients use to reach Nextcloud and that your certificate
89
+
is valid for that hostname.
99
90
100
-
On Debian, Ubuntu, and their derivatives, you should run the following
101
-
command to enable the configuration::
91
+
On Debian, Ubuntu, and their derivatives, save this configuration as
92
+
:file:`/etc/apache2/sites-available/nextcloud.conf` and enable it with::
102
93
103
94
a2ensite nextcloud.conf
104
95
96
+
On Fedora, CentOS, RHEL, and similar systems, save the configuration as
97
+
:file:`/etc/httpd/conf.d/nextcloud.conf`.
105
98
106
-
Additional Apache configurations
107
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
99
+
If you prefer to install Nextcloud in a subdirectory of an existing
100
+
site, use an ``Alias``-based configuration such as the following,
101
+
adjusting the paths for your system::
108
102
109
-
**Required modules:**
103
+
Alias /nextcloud "/var/www/html/nextcloud/"
110
104
111
-
* For Nextcloud to work correctly, we need the module ``mod_rewrite``. Enable
112
-
it by running::
105
+
<Directory /var/www/html/nextcloud/>
106
+
Require all granted
107
+
AllowOverride All
108
+
Options FollowSymLinks MultiViews
113
109
114
-
a2enmod rewrite
110
+
<IfModule mod_dav.c>
111
+
Dav off
112
+
</IfModule>
113
+
</Directory>
115
114
116
-
* If you're using ``mod_fcgi`` or ``php-fpm`` (PHP FastCGI Process Manager),
117
-
you must enable the proxy modules::
115
+
If you have configured authentication for a parent directory, disable it
116
+
for the Nextcloud location. Following the examples above, add the
117
+
following line to the ``<Directory>`` section::
118
118
119
-
a2enmod proxy
120
-
a2enmod proxy_fcgi
119
+
Satisfy Any
121
120
122
-
**Recommended modules** are ``mod_headers``, ``mod_env``, ``mod_dir`` and ``mod_mime``::
121
+
For more information about Apache virtual host layouts and other
122
+
general Apache configuration patterns, see the Apache HTTP Server
123
+
documentation.
124
+
125
+
Additional Apache configurations
126
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127
+
128
+
Enable the following required module::
129
+
130
+
a2enmod rewrite
131
+
132
+
Recommended modules are ``mod_headers``, ``mod_env``, ``mod_dir``, and
133
+
``mod_mime``::
123
134
124
135
a2enmod headers
125
136
a2enmod env
126
137
a2enmod dir
127
138
a2enmod mime
128
139
129
-
If you're running ``mod_fcgi`` instead of the standard ``mod_php`` also enable::
140
+
After making your changes, restart Apache::
130
141
131
-
a2enmod setenvif
142
+
service apache2 restart
132
143
133
-
and apply the following modifications to the configuration::
144
+
If Nextcloud is installed in a subdirectory and you want to use CalDAV
If you see matching output for the modules you've enabled, they are active.
148
158
If any required module is missing, troubleshoot your OS package manager to
149
159
ensure the Apache modules are installed (package names may vary by distribution;
150
160
for example, on Debian/Ubuntu look for ``libapache2-mod-fcgid`` or similar).
151
161
152
-
* You must disable any server-configured authentication for Nextcloud, as it
153
-
uses Basic authentication internally for DAV services. If you have turned on
154
-
authentication on a parent folder (via e.g. an ``AuthType Basic``
155
-
directive), you can turn off the authentication specifically for the
156
-
Nextcloud entry. Following the above example configuration file, add the
157
-
following line in the ``<Directory>`` section::
158
-
159
-
Satisfy Any
160
-
161
-
* When using SSL, take special note of the ServerName. You should specify one
162
-
in the server configuration, as well as in the CommonName field of the
163
-
certificate. If you want your Nextcloud to be reachable via the internet,
164
-
then set both of these to the domain you want to reach your Nextcloud server.
165
-
166
-
* Now restart Apache::
167
-
168
-
service apache2 restart
169
-
170
-
* If you're running Nextcloud in a subdirectory and want to use CalDAV or
171
-
CardDAV clients make sure you have configured the correct
172
-
:ref:`service-discovery-label` URLs.
173
-
174
162
.. _pretty_urls_label:
175
163
176
164
Pretty URLs
@@ -181,7 +169,9 @@ in sharing links like ``https://example.org/nextcloud/index.php/s/Sv1b7krAUqmF8Q
181
169
making URLs shorter and thus prettier.
182
170
183
171
``mod_env`` and ``mod_rewrite`` must be installed on your webserver and the :file:`.htaccess`
184
-
must be writable by the HTTP user. To enable ``mod_env`` and ``mod_rewrite``, run ``sudo a2enmod env`` and ``sudo a2enmod rewrite``. Then you can set in the :file:`config.php` two variables::
172
+
must be writable by the HTTP user. To enable ``mod_env`` and ``mod_rewrite``, run
173
+
``sudo a2enmod env`` and ``sudo a2enmod rewrite``. Then you can set in the :file:`config.php`
0 commit comments