Skip to content

Commit 2187c08

Browse files
authored
Merge pull request #14145 from nextcloud/jtr/update-installation-wizard
docs(admin): update installation wizard to match current implementation
2 parents b0358a0 + eb238c1 commit 2187c08

6 files changed

Lines changed: 131 additions & 57 deletions

File tree

-122 KB
Binary file not shown.
-75.6 KB
Binary file not shown.
62.2 KB
Loading
706 KB
Loading
113 KB
Loading

admin_manual/installation/installation_wizard.rst

Lines changed: 131 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,28 @@ Installation wizard
55
Quick start
66
-----------
77

8-
When Nextcloud prerequisites are fulfilled and all Nextcloud files are installed,
9-
the last step to completing the installation is running the Installation
10-
Wizard.
8+
When Nextcloud prerequisites are fulfilled and all Nextcloud files are installed,
9+
the last step to completing the installation is running the Installation
10+
Wizard.
1111
This is just three steps:
1212

1313
#. Point your Web browser to ``http://localhost/nextcloud``
14-
#. Enter your desired administrator's username and password.
15-
#. Click **Finish Setup**.
14+
#. Enter your desired administration account name and password.
15+
#. Click **Install**.
1616

17-
.. figure:: images/install-wizard-a.png
17+
.. figure:: images/install-wizard-initial.png
1818
:scale: 75%
19-
:alt: screenshot of the installation wizard
20-
21-
You're finished and can start using your new Nextcloud server.
19+
:alt: screenshot of the installation wizard
2220

23-
Of course, there is much more that you can do to set up your Nextcloud server for
24-
best performance and security. In the following sections we will cover important
21+
You're finished and can start using your new Nextcloud server.
22+
23+
.. note::
24+
The wizard includes a real-time password strength indicator that rates your
25+
chosen password from "too weak" to "extremely strong". For security, choose
26+
a password rated at least "strong".
27+
28+
Of course, there is much more that you can do to set up your Nextcloud server for
29+
best performance and security. In the following sections we will cover important
2530
installation and post-installation steps.
2631

2732
* :ref:`Data Directory Location <data_directory_location_label>`
@@ -33,85 +38,154 @@ installation and post-installation steps.
3338
Data directory location
3439
-----------------------
3540

36-
Click **Storage and Database** to expose additional installation configuration
37-
options for your Nextcloud data directory and database.
41+
Expand the **Storage & database** section to expose additional installation
42+
configuration options for your Nextcloud data directory and database.
3843

39-
.. figure:: images/install-wizard-a1.png
40-
:scale: 75%
41-
:alt: installation wizard with all options exposed
42-
43-
You should locate your Nextcloud data directory outside of your Web root if you
44-
are using an HTTP server other than Apache, or you may wish to store your
45-
Nextcloud data in a different location for other reasons (e.g. on a storage
46-
server). It is best to configure your data directory location at installation,
47-
as it is difficult to move after installation. You may put it anywhere; in this
48-
example is it located in ``/opt/nextcloud/``. This directory must already exist,
44+
You should locate your Nextcloud data directory outside of your Web root if you
45+
are using an HTTP server other than Apache, or you may wish to store your
46+
Nextcloud data in a different location for other reasons (e.g. on a storage
47+
server). It is best to configure your data directory location at installation,
48+
as it is difficult to move after installation. You may put it anywhere; in this
49+
example it is located in ``/opt/nextcloud/``. This directory must already exist,
4950
and must be owned by your HTTP user.
5051

52+
.. note::
53+
If the wizard detects that your ``.htaccess`` file is not working (for
54+
example, because you are using Nginx or another non-Apache web server), it
55+
will display a **Security warning** indicating that your data directory and
56+
files may be accessible from the internet. Refer to the
57+
:doc:`../installation/harden_server` documentation for guidance on
58+
securing your data directory.
59+
5160
.. _database_choice_label:
5261

5362
Database choice
5463
---------------
5564

56-
SQLite is the default database for Nextcloud Server and it is good only for
57-
testing and lightweight single-user setups without client synchronization.
65+
SQLite is the default database for Nextcloud Server. When SQLite is selected,
66+
the wizard displays a **Performance warning**:
67+
68+
*SQLite should only be used for minimal and development instances. For
69+
production we recommend a different database backend. If you use clients for
70+
file syncing, the use of SQLite is highly discouraged.*
71+
5872
Supported databases are MySQL, MariaDB, Oracle, and PostgreSQL, and we
5973
recommend :doc:`MySQL/MariaDB <system_requirements>`. Your database and PHP
6074
connectors must be installed before you run the Installation Wizard. When
6175
you install Nextcloud from packages all the necessary dependencies will be
6276
satisfied (see :doc:`source_installation` for a detailed listing of required
63-
and optional PHP modules). You will need the root database login, or any
64-
administrator login , and then enter any name you want for your Nextcloud database.
65-
Be careful your administrator login needs to have the permissions to create
66-
and modify databases and they needs to have the permissions to grant permissions
67-
to other users.
68-
69-
After you enter your root or administrator login for your database, the
70-
installer creates a special database user with privileges limited to the
71-
Nextcloud database. Then Nextcloud needs only the special Nextcloud database
72-
user, and drops the root dB login. This user is named for your Nextcloud admin
73-
user, with an ``oc_`` prefix, and then given a random password. The Nextcloud
74-
database user and password are written into ``config.php``::
77+
and optional PHP modules). If only one database driver is available, the wizard
78+
will show a notice and a link to the documentation on how to install additional
79+
PHP modules.
80+
81+
When you select a database other than SQLite, the wizard exposes additional
82+
fields:
83+
84+
* **Database user**: The username to connect to the database server. If this
85+
user has sufficient privileges (e.g. the ability to query ``mysql.user`` for
86+
MySQL, or the ``CREATEROLE`` privilege for PostgreSQL), the wizard will
87+
attempt to create a dedicated Nextcloud database user with limited privileges
88+
(see below). If the user lacks those privileges, the wizard gracefully falls
89+
back to using the provided credentials directly.
90+
* **Database password**: The password for the database user above.
91+
* **Database name**: The name you want for your Nextcloud database. The wizard
92+
will create it if it does not already exist and the user has
93+
``CREATE DATABASE`` privileges.
94+
* **Database host**: The hostname (and optionally port) of your database
95+
server, e.g. ``localhost`` or ``db.example.com:3306``. The default is
96+
``localhost``. You can also specify a Unix socket path here. The wizard
97+
shows a helper hint: *"Please specify the port number along with the host
98+
name (e.g., localhost:5432)."*
99+
* **Database tablespace** *(Oracle only)*: Shown only when Oracle is selected.
100+
101+
Automatic database user creation
102+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103+
104+
When the provided database user has administrative privileges, the installer
105+
attempts to create a dedicated database user with privileges limited to the
106+
Nextcloud database. This avoids storing your administrative database credentials
107+
in ``config.php``.
108+
109+
If privileges are sufficient, the install creates a user named ``oc_admin``.
110+
If that user already exists, a numeric suffix is appended (``oc_admin1``,
111+
``oc_admin2``, etc.) until an available username is found.
112+
113+
A random password is generated for the new user. The resulting credentials are
114+
written into ``config.php``::
115+
116+
'dbuser' => 'oc_admin',
117+
'dbpassword' => 'pX65Ty5DrHQkYPE5HRsDvyFHlZZHcm',
118+
119+
If the provided user lacks the privileges to create new database users, the
120+
installer falls back to using the provided credentials directly.
121+
122+
.. tip::
123+
You can also explicitly prevent automatic user creation by setting the following
124+
in your ``config.php`` before running the wizard (or via an autoconfig file)::
125+
126+
'setup_create_db_user' => false,
127+
128+
This is useful when your database administrator has already created a dedicated
129+
user for Nextcloud. In that case the wizard will use the database credentials
130+
you provide directly, without attempting to create a new user or query
131+
administrative privileges.
132+
133+
Autoconfig
134+
^^^^^^^^^^
135+
136+
If an autoconfig file is detected, the wizard displays a success notice:
137+
*"Autoconfig file detected — The setup form below is pre-filled with the
138+
values from the config file."* The **Storage & database** section is
139+
automatically collapsed when the autoconfig provides valid values. For
140+
details on autoconfig files, see :doc:`../configuration_server/automatic_configuration`.
141+
142+
.. figure:: images/install-wizard-autoconfig.png
143+
:scale: 75%
144+
:alt: Nextcloud wizard screen when an autoconfig file is detected
75145

76-
'dbuser' => 'oc_molly',
77-
'dbpassword' => 'pX65Ty5DrHQkYPE5HRsDvyFHlZZHcm',
146+
Completing Installation
147+
^^^^^^^^^^^^^^^^^^^^^^^
78148

79-
Click Finish Setup, and start using your new Nextcloud server.
149+
Click **Install**, and start using your new Nextcloud server.
80150

81-
.. figure:: images/install-wizard-a2.png
151+
.. figure:: images/install-wizard-firstrunwizard.png
82152
:scale: 75%
83153
:alt: Nextcloud welcome screen after a successful installation
84154

85155
Now we will look at some important post-installation steps.
86156

87-
.. _trusted_domains_label:
157+
.. _trusted_domains_label:
88158

89159
Trusted domains
90160
---------------
91161

92-
All URLs used to access your Nextcloud server must be whitelisted in your
93-
``config.php`` file, under the ``trusted_domains`` setting. Users
94-
are allowed to log into Nextcloud only when they point their browsers to a
95-
URL that is listed in the ``trusted_domains`` setting. This is not a
96-
list of allowed client-side domains or IP addresses.
97-
You may use IP addresses and domain names.
162+
All URLs used to access your Nextcloud server must be whitelisted in your
163+
``config.php`` file, under the ``trusted_domains`` setting. Users
164+
are allowed to log into Nextcloud only when they point their browsers to a
165+
URL that is listed in the ``trusted_domains`` setting. This is not a
166+
list of allowed client-side domains or IP addresses.
167+
You may use IP addresses and domain names. Wildcard patterns using ``*`` are
168+
also supported (e.g. ``*.example.com``).
98169
A typical configuration looks like this::
99170

100-
'trusted_domains' =>
171+
'trusted_domains' =>
101172
array (
102-
0 => 'localhost',
103-
1 => 'server1.example.com',
173+
0 => 'localhost',
174+
1 => 'server1.example.com',
104175
2 => '192.168.1.50',
105176
3 => '[fe80::1:50]',
106177
),
107178

108-
Note:
179+
.. note::
180+
181+
The loopback addresses ``localhost``, ``127.0.0.1``, and ``[::1]`` are
182+
always treated as trusted regardless of the ``trusted_domains``
183+
configuration. This means that as long as you have access to the physical
184+
server you can always log in. In the event that a load balancer or reverse
185+
proxy is in place there will be no issues as long as it sends the correct
186+
``X-Forwarded-Host`` header.
109187

110-
The loopback address, ``127.0.0.1``, is automatically whitelisted, so as long
111-
as you have access to the physical server you can always log in. In the event
112-
that a load balancer is in place there will be no issues as long as it sends
113-
the correct X-Forwarded-Host header. When a user tries a URL that
114-
is not whitelisted the following error appears:
188+
When a user tries a URL that is not whitelisted the following error appears:
115189

116190
.. figure:: images/install-wizard-a4.png
117191
:scale: 75%

0 commit comments

Comments
 (0)