Repository navigation
add nextcloud setup how to #410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
henmohr
wants to merge
2
commits into
main
Choose a base branch
from
chore/add-nextcloud-setup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,143 @@ | ||
| --- | ||
| extends: _layouts.post | ||
| title: "Nextcloud: Setup em 5 passos" | ||
| author: Henrique Mohr | ||
| date: "2026-11-16" | ||
| description: "Guia rápido para instalar o Nextcloud com Docker Compose, Nginx Proxy, PostgreSQL e Redis." | ||
|
|
||
| --- | ||
|
|
||
| Nextcloud é uma ferramenta incrível. Descubra como fazer o setup facilmente. | ||
|
|
||
| Precisa de ajuda com seu Nextcloud? Entre em contato conosco. | ||
|
|
||
| # Como subir o Nextcloud em 5 passos | ||
|
|
||
| O Nextcloud permite criar uma nuvem própria para armazenar, sincronizar e compartilhar arquivos. Neste guia, você vai subir uma instalação com HTTPS automático usando os projetos da LibreCode: [nginx-proxy](https://github.com/LibreCodeCoop/nginx-proxy), [postgres-docker](https://github.com/LibreCodeCoop/postgres-docker) e [nextcloud-docker](https://github.com/LibreCodeCoop/nextcloud-docker), além do Redis. | ||
|
|
||
| ## 1. Prepare o servidor e as redes | ||
|
|
||
| Você precisa de um servidor com Docker e Docker Compose e de um domínio apontando para o IP dele. | ||
|
|
||
| Crie as redes externas que conectam os serviços: | ||
|
|
||
| ```bash | ||
| docker network create reverse-proxy | ||
| docker network create postgres | ||
| docker network create redis | ||
| ``` | ||
|
|
||
| ## 2. Suba o proxy reverso | ||
|
|
||
| O proxy cuida do HTTPS com Let's Encrypt: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/LibreCodeCoop/nginx-proxy ~/projects/nginx-proxy | ||
| cd ~/projects/nginx-proxy | ||
| docker compose up -d | ||
| ``` | ||
|
|
||
| ## 3. Suba o PostgreSQL e o Redis | ||
|
|
||
| Clone o projeto do PostgreSQL, configure o `.env` e suba o serviço: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/LibreCodeCoop/postgres-docker ~/projects/postgres | ||
| cd ~/projects/postgres | ||
| cp .env.example .env | ||
| nano .env | ||
| docker compose up -d | ||
| ``` | ||
|
|
||
| Agora o Redis. Crie o diretório e o arquivo `docker-compose.yml`: | ||
|
|
||
| ```bash | ||
| mkdir -p ~/projects/redis | ||
| cd ~/projects/redis | ||
| nano docker-compose.yml | ||
| ``` | ||
|
|
||
| ```yaml | ||
| networks: | ||
| redis: | ||
| external: true | ||
| name: redis | ||
|
|
||
| services: | ||
| redis: | ||
| image: redis:alpine | ||
| restart: unless-stopped | ||
| volumes: | ||
| - ./volumes/redis/data:/data | ||
| - /etc/timezone:/etc/timezone:ro | ||
| - /etc/localtime:/etc/localtime:ro | ||
| networks: | ||
| - redis | ||
| environment: | ||
| - TZ=America/Sao_Paulo | ||
| ``` | ||
|
|
||
| ```bash | ||
| docker compose up -d | ||
| ``` | ||
|
|
||
| ## 4. Baixe e configure o Nextcloud | ||
|
|
||
| ```bash | ||
| git clone https://github.com/LibreCodeCoop/nextcloud-docker ~/projects/nextcloud | ||
| cd ~/projects/nextcloud | ||
| cp .env.example .env | ||
| nano .env | ||
| ``` | ||
|
|
||
| Preencha pelo menos: | ||
|
|
||
| ```bash | ||
| VIRTUAL_HOST=cloud.seudominio.com.br | ||
| LETSENCRYPT_HOST=cloud.seudominio.com.br | ||
| LETSENCRYPT_EMAIL=voce@seudominio.com.br | ||
| NEXTCLOUD_TRUSTED_DOMAINS=cloud.seudominio.com.br,web | ||
| NEXTCLOUD_ADMIN_USER=admin | ||
| NEXTCLOUD_ADMIN_PASSWORD=troque-por-uma-senha-forte | ||
| NEXTCLOUD_ADMIN_EMAIL=voce@seudominio.com.br | ||
| POSTGRES_PASSWORD=mesma-senha-do-postgres | ||
| TZ=America/Sao_Paulo | ||
| ``` | ||
|
|
||
| Para o Nextcloud enxergar o Redis, crie o arquivo `docker-compose.override.yml`: | ||
|
|
||
| ```yaml | ||
| networks: | ||
| redis: | ||
| external: true | ||
| name: redis | ||
|
|
||
| services: | ||
| app: | ||
| networks: | ||
| - redis | ||
| ``` | ||
|
|
||
| ## 5. Suba e valide o Nextcloud | ||
|
|
||
| ```bash | ||
| docker compose up -d | ||
| docker compose logs -f app | ||
| ``` | ||
|
|
||
| Aguarde a inicialização e acesse `https://cloud.seudominio.com.br`. Para conferir a instalação: | ||
|
|
||
| ```bash | ||
| docker compose ps | ||
| docker compose exec -u www-data app ./occ status | ||
| ``` | ||
|
|
||
| Depois, revise os avisos em `https://cloud.seudominio.com.br/settings/admin/overview`. Se aparecer algo sobre índices, rode: | ||
|
|
||
| ```bash | ||
| docker compose exec -u www-data app ./occ db:add-missing-indices | ||
| ``` | ||
|
|
||
| Pronto: seu Nextcloud já está no ar. | ||
|
|
||
| Para configurações de produção, backup automatizado, integrações e solução de problemas, entre em contato conosco! | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.