Skip to main content

⚙️ Initial Nextcloud Settings After Deploy

After installing Nextcloud via the Saveincloud marketplace, it is essential to perform some initial settings to ensure the security, organizational structure, and access control of your cloud environment.


🌐 Adjusting the config.php File and Trusted Domains

Nextcloud uses the config.php file to store the system's fundamental configurations, such as database, security, and allowed access domains.

📂 The file can be found at the following path:

/var/www/webroot/ROOT/config/config.php

configuração do php config.php

🔍 Example with explanation of each item

<?php
$CONFIG = array (
'instanceid' => 'ocficticio1234', // ID único da instância Nextcloud (não deve ser alterado)
'passwordsalt' => 'XyZf1ct1c1oSalt', // Salt usado para criptografar senhas (não modificar, configurado automaticamente)
'secret' => 'f1ct1c10S3cr3tHash', // Chave secreta do sistema (não modificar, configurado automaticamente)
'trusted_domains' =>
array (
0 => 'cloud.saveincloud.com.br', // Domínio padrão da plataforma (já configurado automaticamente)
1 => 'meudominio.com.br', // Domínios adicionais podem ser inseridos aqui
2 => '192.168.0.10', // IPs locais também são aceitos
),
'datadirectory' => '/var/www/webroot/ROOT/data', // Diretório onde os dados dos usuários são armazenados
'dbtype' => 'mysql',
'version' => '31.0.6.2',
'overwrite.cli.url' => 'https://cloud.saveincloud.com.br', // URL usada em comandos CLI
'dbname' => 'nextcloud',
'dbhost' => '10.19.0.10', // IP interno do container MySQL (Preenchido automaticamente pela plataforma)
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'root', // Preenchido automaticamente pela plataforma
'dbpassword' => 'senha-do-banco', // Preenchido automaticamente pela plataforma
'installed' => true,
);

⚠️ Attention:

  • Never edit the fields passwordsalt and secret. This will cause password loss and database corruption.
  • The field trusted_domains is safe to edit, allowing access via your own domains or internal IPs.
  • Whenever you change this file, check the accesses and restart Apache if necessary.

👥 Creating Users and Groups

Organizing users by groups with specific permissions is a good practice in the Zero Trust model, especially in collaborative cloud environments like Nextcloud.

👤 Creating a new user

  1. With the administrator account, go to the top right menu.
  2. Click on Accounts. imagem
  3. On the new screen, click New Account. imagem

Fill in the fields as needed:

  • Account Name (required)
  • Display Name
  • Email
  • Password (or leave it for the system to generate one)
  • Group the user will belong to
  • Group administrator (optional)
  • Disk Quota
  • Account Manager

Painel de criação de novo usuário

🧱 Creating a new group

It is recommended to create groups before adding users.

  1. On the accounts screen, click the “+” symbol next to Groups.
  2. Enter the desired group name and click Create. criação de grupos de usuarios

📌 Groups can be used to control folder permissions, apps, and administrative functions.


🔒 Enabling Two-Factor Authentication (2FA)

Adding 2FA via TOTP is one of the best ways to protect Nextcloud accounts.

🚀 How to enable the TOTP app

  1. Access your administrative account.
  2. In the top right corner, open the user menu and click Apps. Aplicativos no Dashboard Principal
  3. Go to the Disabled Apps section.
  4. Find the Two-Factor TOTP Provider app. Ativação do TOTP Provider
  5. Click Enable and enter your administrator password to confirm.

Once enabled, each user can activate 2FA at:

Menu do usuário → Configurações pessoais → Segurança

Ativação do TOTP passo 1 Ativação do TOTP passo 2 Ativação do TOTP passo 3

🔧 Forcing 2FA and configuring policies

  1. Go to Administrative SettingsSecurity.

  2. Enable the option to force two-factor authentication for all users. Configuração para forçar a autenticação de dois fatores para todos os usuários

  3. In the same menu, define password policies, such as:

    • Minimum length
    • Use of special characters
    • Password expiration or rotation Politica de senhas nas configurações de segurança

🌍 Changing Nextcloud Language

📌 By default, Nextcloud may be set to English after installation. Changing the language to Brazilian Portuguese helps usability and understanding of all platform features.

📝 Steps to change the language:

  1. In the top right corner of the screen, click the user menu (icon or name).

  2. Go to Personal Settings. Configurações Pessoais

  3. In the Personal Information section, locate the Language field. Localização e Idiomas nas configurações

  4. Select Brazilian Portuguese from the list of available languages.

🌎 You can also adjust the region/locale according to your preference.

📸 [Add here image showing the path to the language setting]

✅ The change is applied immediately and will be maintained in the user's future sessions.


✅ Finalizing

With these initial settings, your Nextcloud environment will be:

  • More secure
  • Better structured
  • Ready to scale as your team grows