Confluence
What is Confluence?
Confluence is Atlassian's team wiki and documentation platform. Laradock runs it via the official atlassian/confluence-server image, backed by the postgres container.
Confluence is a licensed Atlassian product. You'll need an evaluation or paid license from Atlassian to get past initial setup.
Start Confluence
Confluence depends on postgres (its compose.yml declares it), so start both together:
- Laradock CLI
- Docker Compose
./laradock start postgres confluence
docker compose up -d postgres confluence
Stop Confluence
Stopping just pauses the container; your data is safe:
- Laradock CLI
- Docker Compose
./laradock stop confluence
docker compose stop confluence
To delete the container entirely (the data on disk is still untouched, it lives under DATA_PATH_HOST/Confluence):
- Laradock CLI
- Docker Compose
./laradock remove confluence
docker compose rm -sf confluence
Configuration
Settings live in confluence/defaults.env and can be overridden in your own .env:
| Variable | Default | What it does |
|---|---|---|
CONFLUENCE_VERSION | 6.13-ubuntu-18.04-adoptopenjdk8 | Image tag from the atlassian/confluence-server Docker Hub page. Pin this to control which Confluence version you run. |
CONFLUENCE_HOST_HTTP_PORT | 8090 | Host port Confluence is published on (container always listens on 8090 internally). |
Confluence's database name, user, and password (CONFLUENCE_POSTGRES_DB, CONFLUENCE_POSTGRES_USER, CONFLUENCE_POSTGRES_PASSWORD) live in postgres/defaults.env (default laradock_confluence for all three), which also sets CONFLUENCE_POSTGRES_INIT=true so the database and role are created automatically the first time postgres initializes its data folder. Application data (attachments, indexes, config) persists under DATA_PATH_HOST/Confluence.
First-time setup
Start Confluence and postgres together (see Start Confluence above), then open http://localhost:8090 and walk through Confluence's own setup wizard: license entry, database connection (point it at the postgres container using the CONFLUENCE_POSTGRES_* credentials above), and initial admin account.
Serve it through NGINX with SSL
- Copy
nginx/sites/confluence.conf.exampleto a new file in the same folder and replace the sample domain with yours. - Configure SSL keys for your domain (see the NGINX guide for certificate setup).
Confluence stays reachable directly on 8090 regardless, NGINX just adds a proper domain and TLS in front of it.
Backup and restore
Confluence's state is split across two places: application data (attachments, indexes, config) on disk, and content/permissions in its postgres database. Back up both.
Back up the application data to a .tar.gz on your host:
tar -czf confluence-data-backup.tar.gz -C "${DATA_PATH_HOST:-~/.laradock/data}/Confluence" .
Back up the database:
- Laradock CLI
- Docker Compose
./laradock exec -T postgres pg_dump -U laradock_confluence laradock_confluence > confluence-db-backup.sql
docker compose exec -T postgres pg_dump -U laradock_confluence laradock_confluence > confluence-db-backup.sql
Replace the database/user names if you changed CONFLUENCE_POSTGRES_DB/CONFLUENCE_POSTGRES_USER. The -T disables the container's pseudo-terminal so the dump isn't corrupted when redirected to a file.
Restore is the reverse: stop Confluence, extract the .tar.gz back into DATA_PATH_HOST/Confluence, restore the database, then start Confluence again:
- Laradock CLI
- Docker Compose
./laradock exec -T postgres psql -U laradock_confluence -d laradock_confluence -f - < confluence-db-backup.sql
docker compose exec -T postgres psql -U laradock_confluence -d laradock_confluence -f - < confluence-db-backup.sql
Start completely fresh (wipe all data)
To throw away everything and re-run Confluence's setup wizard from scratch (⚠️ this permanently deletes all pages, attachments, and the Confluence database, back up first if you need anything):
- Laradock CLI
- Docker Compose
./laradock stop confluence
./laradock remove confluence
rm -rf "${DATA_PATH_HOST:-~/.laradock/data}/Confluence"
docker compose stop confluence
docker compose rm -sf confluence
rm -rf "${DATA_PATH_HOST:-~/.laradock/data}/Confluence"
Wiping the application data folder alone leaves the old content sitting in the postgres database, so the setup wizard will find an existing schema instead of starting fresh. Drop and recreate the database too (using the postgres root credentials, default/secret by default):
- Laradock CLI
- Docker Compose
./laradock enter postgres
docker compose exec postgres bash
dropdb -U default laradock_confluence
createdb -U default -O laradock_confluence laradock_confluence
exit
Then start Confluence again (see Start Confluence) and go through the setup wizard once more.
Change the Confluence version
Set the version in your .env:
CONFLUENCE_VERSION=7.19.24-jdk11
Then recreate the container, which pulls the new image tag automatically:
- Laradock CLI
- Docker Compose
./laradock start confluence
docker compose up -d confluence
Confluence runs its own database migration on first boot after a version bump, so back up both the application data and the database before changing major versions, the same way you would for any upgrade with irreversible schema changes.
Common issues
- Setup wizard asks for a license every restart. That means
DATA_PATH_HOST/Confluenceisn't persisting between restarts, check yourDATA_PATH_HOSTvalue and that the volume actually mounted. - Confluence can't connect to its database. Confirm
postgresis running and thatCONFLUENCE_POSTGRES_INIT=truewas set the first timepostgresinitialized, that flag only creates the database/role on first boot. - Container takes a long time to become reachable. This is normal for Confluence, it's a JVM application with a real startup sequence; check
./laradock logs confluencebefore assuming it's stuck. - Port already in use on your host. Change
CONFLUENCE_HOST_HTTP_PORTin.envand restart:./laradock restart confluence.
Fronting it with a domain and TLS? See the NGINX guide. New to Laradock? Start at Getting Started.