#
tokens: 38691/50000 4/1033 files (page 24/25)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 24 of 25. Use http://codebase.md/id/docs/get_started/create/basic_markup.html?lines=true&page={x} to view the full context.

# Directory Structure

```
├── .ci
│   ├── check-markdownfmt.sh
│   ├── check-metadata.sh
│   ├── check-pr-no-readme.sh
│   ├── check-required-files.sh
│   ├── check-short.sh
│   ├── check-ymlfmt.sh
│   └── get-markdownfmt.sh
├── .common-templates
│   ├── maintainer-community.md
│   ├── maintainer-docker.md
│   ├── maintainer-hashicorp.md
│   └── maintainer-influxdata.md
├── .dockerignore
├── .github
│   └── workflows
│       └── ci.yml
├── .template-helpers
│   ├── arches.sh
│   ├── autogenerated-warning.md
│   ├── compose.md
│   ├── generate-dockerfile-links-partial.sh
│   ├── generate-dockerfile-links-partial.tmpl
│   ├── get-help.md
│   ├── issues.md
│   ├── license-common.md
│   ├── template.md
│   ├── variant-alpine.md
│   ├── variant-default-buildpack-deps.md
│   ├── variant-default-debian.md
│   ├── variant-default-ubuntu.md
│   ├── variant-onbuild.md
│   ├── variant-slim.md
│   ├── variant-windowsservercore.md
│   ├── variant.md
│   └── variant.sh
├── adminer
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── aerospike
│   ├── content.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── almalinux
│   ├── content.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── alpine
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── alt
│   ├── content.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── amazoncorretto
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── amazonlinux
│   ├── content.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── api-firewall
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── arangodb
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── archlinux
│   ├── content.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── backdrop
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── bash
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── bonita
│   ├── compose.yaml
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── buildpack-deps
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── busybox
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   ├── variant-glibc.md
│   ├── variant-musl.md
│   ├── variant-uclibc.md
│   └── variant.md
├── caddy
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo-120.png
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── cassandra
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── chronograf
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── cirros
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── clearlinux
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── clefos
│   ├── content.md
│   ├── deprecated.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── clickhouse
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── clojure
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── composer
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── convertigo
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── couchbase
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── couchdb
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── crate
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── dart
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── debian
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   ├── variant-slim.md
│   └── variant.md
├── docker
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   ├── variant-rootless.md
│   └── variant-windowsservercore.md
├── Dockerfile
├── drupal
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   └── variant-fpm.md
├── eclipse-mosquitto
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── eclipse-temurin
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── eggdrop
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── elasticsearch
│   ├── compose.yaml
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   └── variant-alpine.md
├── elixir
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── emqx
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── erlang
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── fedora
│   ├── content.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── flink
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── fluentd
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── friendica
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── gazebo
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── gcc
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── generate-repo-stub-readme.sh
├── geonetwork
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   ├── variant-postgres.md
│   └── variant.md
├── get-categories.sh
├── ghost
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── golang
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   ├── variant-alpine.md
│   └── variant-tip.md
├── gradle
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── groovy
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── haproxy
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── haskell
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   └── variant-slim.md
├── haxe
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── hello-world
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   └── update.sh
├── hitch
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── httpd
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── hylang
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── ibm-semeru-runtimes
│   ├── content.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── ibmjava
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── influxdb
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   ├── variant-data.md
│   └── variant-meta.md
├── irssi
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── jetty
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── joomla
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── jruby
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── julia
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── kapacitor
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── kibana
│   ├── compose.yaml
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── kong
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── krakend
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo-120.png
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── LICENSE
├── lightstreamer
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── liquibase
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── logstash
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   └── variant-alpine.md
├── mageia
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── mariadb
│   ├── compose.yaml
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── markdownfmt.sh
├── matomo
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── maven
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── mediawiki
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── memcached
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── metadata.json
├── metadata.sh
├── mongo
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── mongo-express
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── monica
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── mono
│   ├── content.md
│   ├── deprecated.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── mysql
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── nats
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── neo4j
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── neurodebian
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── nextcloud
│   ├── content.md
│   ├── deprecated.md
│   ├── github-repo
│   ├── license.md
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── nginx
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   └── variant-perl.md
├── node
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── notary
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── odoo
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── open-liberty
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── openjdk
│   ├── content.md
│   ├── deprecated.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   ├── variant-alpine.md
│   ├── variant-oracle.md
│   └── variant-slim.md
├── oraclelinux
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   └── variant-slim.md
├── orientdb
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── parallel-update.sh
├── percona
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── perl
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── photon
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── php
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   ├── variant-apache.md
│   ├── variant-cli.md
│   ├── variant-fpm.md
│   └── variant.md
├── php-zendserver
│   ├── content.md
│   ├── deprecated.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── phpmyadmin
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── plone
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── postfixadmin
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   ├── variant-apache.md
│   ├── variant-fpm-alpine.md
│   └── variant-fpm.md
├── postgres
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── push.pl
├── push.sh
├── pypy
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── python
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   └── variant-slim.md
├── r-base
│   ├── content.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── rabbitmq
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── rakudo-star
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── README.md
├── redis
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── redmine
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── registry
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── rethinkdb
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── rocket.chat
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── rockylinux
│   ├── content.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── ros
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── ruby
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── rust
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── sapmachine
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── satosa
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── scratch
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── silverpeas
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── solr
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── sonarqube
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── spark
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── spiped
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── storm
│   ├── compose.yaml
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── swift
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── swipl
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── teamspeak
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── telegraf
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── tomcat
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── tomee
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── traefik
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   └── variant-alpine.md
├── ubuntu
│   ├── content.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── unit
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── update.sh
├── varnish
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── websphere-liberty
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── wordpress
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   ├── variant-cli.md
│   └── variant-fpm.md
├── xwiki
│   ├── content.md
│   ├── get-help.md
│   ├── github-repo
│   ├── issues.md
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   └── README.md
├── ymlfmt.sh
├── yourls
│   ├── compose.yaml
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.svg
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   └── variant-fpm.md
├── znc
│   ├── content.md
│   ├── github-repo
│   ├── license.md
│   ├── logo.png
│   ├── maintainer.md
│   ├── metadata.json
│   ├── README-short.txt
│   ├── README.md
│   └── variant-slim.md
└── zookeeper
    ├── compose.yaml
    ├── content.md
    ├── github-repo
    ├── license.md
    ├── logo.png
    ├── maintainer.md
    ├── metadata.json
    ├── README-short.txt
    └── README.md
```

# Files

--------------------------------------------------------------------------------
/friendica/content.md:
--------------------------------------------------------------------------------

```markdown
  1 | # What is Friendica?
  2 | 
  3 | Friendica is a decentralised communications platform that integrates social communication. Our platform links to independent social projects and corporate services.
  4 | 
  5 | %%LOGO%%
  6 | 
  7 | # How to use this image
  8 | 
  9 | The images are designed to be used in a micro-service environment. There are two types of the image you can choose from.
 10 | 
 11 | The `apache` tag contains a full Friendica installation including an apache web server. It is designed to be easy to use and gets you running pretty fast. This is also the default for the `latest` tag and version tags that are not further specified.
 12 | 
 13 | The second option is a `fpm` container. It is based on the [php-fpm](https://hub.docker.com/_/php/) image and runs a fastCGI-Process that serves your Friendica server. To use this image it must be combined with any Webserver that can proxy the http requests to the FastCGI-port of the container.
 14 | 
 15 | ## Using the apache image
 16 | 
 17 | You need at least one other mariadb/mysql-container to link it to Friendica.
 18 | 
 19 | The apache image contains a webserver and exposes port 80. To start the container type:
 20 | 
 21 | ```console
 22 | $ docker run -d -p 8080:80 --network some-network %%IMAGE%%
 23 | ```
 24 | 
 25 | Now you can access the Friendica installation wizard at http://localhost:8080/ from your host system.
 26 | 
 27 | ## Using the fpm image
 28 | 
 29 | To use the fpm image you need an additional web server that can proxy http-request to the fpm-port of the container. For fpm connection this container exposes port 9000. In most cases you might want use another container or your host as proxy. If you use your host you can address your Friendica container directly on port 9000. If you use another container, make sure that you add them to the same docker network (via `docker run --network <NAME> ...` or a `compose.yaml` file). In both cases you don't want to map the fpm port to you host.
 30 | 
 31 | ```console
 32 | $ docker run -d %%IMAGE%%:fpm
 33 | ```
 34 | 
 35 | As the fastCGI-Process is not capable of serving static files (style sheets, images, ...) the webserver needs access to these files. This can be achieved with the `volumes-from` option. You can find more information in the Docker Compose section.
 36 | 
 37 | ## Background tasks
 38 | 
 39 | Friendica requires background tasks to fetch and send all kind of messages and maintain the complete instance. This setup is crucial for the Friendica node. There are two options to enable background tasks for Friendica:
 40 | 
 41 | -	Using the default Image and manually setup background tasks (see Friendica [Install](https://github.com/friendica/friendica/blob/2021.03-rc/doc/Install.md#required-background-tasks))
 42 | -	Using the default image (apache, fpm, fpm-alpine) and starting a dedicated `cron` instance and use `cron.sh` as startup command (like this [Example](https://github.com/friendica/docker/blob/stable/.examples/docker-compose/insecure/mariadb-cron-redis/apache/docker-compose.yml))
 43 | 
 44 | ## Possible Environment Variables
 45 | 
 46 | **Friendica Settings**
 47 | 
 48 | -	`FRIENDICA_URL` The Friendica complete URL including protocol, domain and subpath (example: https://friendica.local/sub/ ).
 49 | -	`FRIENDICA_TZ` The default localization of the Friendica server.
 50 | -	`FRIENDICA_LANG` The default language of the Friendica server.
 51 | -	`FRIENDICA_SITENAME` The Sitename of the Friendica server.
 52 | -	`FRIENDICA_NO_VALIDATION` If set to `true`, the URL and E-Mail validation will be disabled.
 53 | -	`FRIENDICA_DATA` Set the name of the storage provider (e.g `Filesystem` to use filesystem), default ist the DB backend.
 54 | -	`FRIENDICA_DATA_DIR` The data directory of the Friendica server (Default: /var/www/data).
 55 | -	`FRIENDICA_UPGRADE` Force starting the Friendica update even it's the same version (Default: `false`).
 56 | 
 57 | **Friendica Logging**
 58 | 
 59 | -	`FRIENDICA_DEBUGGING` If set to `true`, the logging of Friendica is enabled.
 60 | -	`FRIENDICA_LOGFILE` (optional) The path to the logfile (Default: /var/www/friendica.log).
 61 | -	`FRIENDICA_LOGLEVEL` (optional) The loglevel to log (Default: notice).
 62 | -	`FRIENDICA_LOGGER` (optional) Set the type - stream, syslog, monolog (Default: stream).
 63 | -	`FRIENDICA_SYSLOG_FLAGS` (optional) In case syslog is used, set the corresponding flags (Default: `LOG_PID | LOG_ODELAY | LOG_CONS | LOG_PERROR`).
 64 | -	`FRIENDICA_SYSLOG_FACTORY` (optional) In case syslog is used, set the corresponding factory (Default: `LOG_USER`).
 65 | 
 66 | **Database** (**required at installation**)
 67 | 
 68 | -	`MYSQL_USER` Username for the database user using mysql / mariadb.
 69 | -	`MYSQL_PASSWORD` Password for the database user using mysql / mariadb.
 70 | -	`MYSQL_DATABASE` Name of the database using mysql / mariadb.
 71 | -	`MYSQL_HOST` Hostname of the database server using mysql / mariadb.
 72 | -	`MYSQL_PORT` Port of the database server using mysql / mariadb (Default: `3306`)
 73 | 
 74 | **Lock Driver (Redis)**
 75 | 
 76 | -	`REDIS_HOST` The hostname of the redis instance (in case of locking).
 77 | -	`REDIS_PORT` (optional) The port of the redis instance (in case of locking).
 78 | -	`REDIS_PW` (optional) The password for the redis instance (in case of locking).
 79 | -	`REDIS_DB` (optional) The database instance of the redis instance (in case of locking).
 80 | 
 81 | **PHP limits**
 82 | 
 83 | -	`PHP_MEMORY_LIMIT` (default `512M`) This sets the maximum amount of memory in bytes that a script is allowed to allocate. This is meant to help prevent poorly written scripts from eating up all available memory, but it can prevent normal operation if set too tight.
 84 | -	`PHP_UPLOAD_LIMIT` (default `512M`) This sets the upload limit (`post_max_size` and `upload_max_filesize`) for big files. Note that you may have to change other limits depending on your client, webserver or operating system.
 85 | 
 86 | ## Administrator account
 87 | 
 88 | Because Friendica links the administrator account to a specific mail address, you **have** to set a valid address for `MAILNAME`.
 89 | 
 90 | ## Mail settings
 91 | 
 92 | The binary `ssmtp` is used for the `mail()` support of Friendica.
 93 | 
 94 | You have to set the `--hostname/-h` parameter correctly to use the right domainname for the `mail()` command.
 95 | 
 96 | You have to set a valid SMTP-MTA for the `SMTP` environment variable to enable mail support in Friendica. A valid SMTP-MTA would be, for example, `mx.example.org`.
 97 | 
 98 | The following environment variables are possible for the SMTP examples.
 99 | 
100 | -	`SMTP` Address of the SMTP Mail-Gateway. (**required**)
101 | -	`SMTP_PORT` Port of the SMTP Mail-Gateway. (Default: 587)
102 | -	`SMTP_DOMAIN` The sender domain. (**required** - e.g. `friendica.local`)
103 | -	`SMTP_FROM` Sender user-part of the address. (Default: `no-reply` - e.g. [email protected])
104 | -	`SMTP_TLS` Use TLS for connecting the SMTP Mail-Gateway. (Default: empty)
105 | -	`SMTP_STARTTLS` Use STARTTLS for connecting the SMTP Mail-Gateway. (Default: `On`)
106 | -	`SMTP_AUTH` Auth mode for the SMTP Mail-Gateway. (Default: `On`)
107 | -	`SMTP_AUTH_USER` Username for the SMTP Mail-Gateway. (Default: empty)
108 | -	`SMTP_AUTH_PASS` Password for the SMTP Mail-Gateway. (Default: empty)
109 | 
110 | **Addition to STARTTLS**
111 | 
112 | the `tls_starttls` setting is either `On` or `Off`, but never unset. That's because in case it's unset, `starttls` would be activated by default (which would need additional configuration like a separate port).
113 | 
114 | ## Database settings
115 | 
116 | You have to add the Friendica container to the same network as the running database container, e. g. `--network some-network`, and then use `mysql` as the database host on setup.
117 | 
118 | ## Persistent data
119 | 
120 | The Friendica installation and all data beyond what lives in the database (file uploads, etc) is stored in the [unnamed docker volume](https://docs.docker.com/storage/volumes/) volume `/var/www/html`. The docker daemon will store that data within the docker directory `/var/lib/docker/volumes/...`. That means your data is saved even if the container crashes, is stopped or deleted. To make your data persistent to upgrading and get access for backups is using named docker volume or mount a host folder. To achieve this you need one volume for your database container and Friendica.
121 | 
122 | Friendica:
123 | 
124 | -	`/var/www/html/` folder where all Friendica data lives
125 | 
126 | ```console
127 | $ docker run -d \
128 |   -v friendica-vol-1:/var/www/html \
129 |   --network some-network
130 |   %%IMAGE%%
131 | ```
132 | 
133 | Database:
134 | 
135 | -	`/var/lib/mysql` MySQL / MariaDB Data
136 | 
137 | ```console
138 | $ docker run -d \
139 |   -v mysql-vol-1:/var/lib/mysql \
140 |   --network some-network
141 |   mariadb
142 | ```
143 | 
144 | ## Automatic installation
145 | 
146 | The Friendica image supports auto configuration via environment variables. You can preconfigure everything that is asked on the install page on first run. To enable the automatic installation, you have to the following environment variables:
147 | 
148 | -	`FRIENDICA_URL` The Friendica complete URL including protocol, domain and subpath (example: https://friendica.local/sub/ ).
149 | -	`FRIENDICA_ADMIN_MAIL` E-Mail address of the administrator.
150 | -	`MYSQL_USER` Username for the database user using mysql / mariadb.
151 | -	`MYSQL_PASSWORD` Password for the database user using mysql / mariadb.
152 | -	`MYSQL_DATABASE` Name of the database using mysql / mariadb.
153 | -	`MYSQL_HOST` Hostname of the database server using mysql / mariadb.
154 | 
155 | # Docker Secrets
156 | 
157 | As an alternative to passing sensitive information via environment variables, _FILE may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in /run/secrets/<secret_name> files. For example:
158 | 
159 | ```yaml
160 | services:
161 |   db:
162 |     image: mariadb
163 |     restart: always
164 |     volumes:
165 |       - db:/var/lib/mysql
166 |     environment:
167 |        - MYSQL_DATABASE_FILE=/run/secrets/mysql_database
168 |        - MYSQL_USER_FILE=/run/secrets/mysql_user
169 |        - MYSQL_PASSWORD_FILE=/run/secrets/mysql_password
170 |     secrets:
171 |       - mysql_database
172 |       - mysql_password
173 |       - mysql_user
174 | 
175 |   app:
176 |     image: friendica
177 |     restart: always
178 |     volumes:
179 |       - friendica:/var/www/html
180 |     ports:
181 |       - "8080:80"
182 |     environment:
183 |       - MYSQL_HOST=db
184 |       - MYSQL_DATABASE_FILE=/run/secrets/mysql_database
185 |       - MYSQL_USER_FILE=/run/secrets/mysql_user
186 |       - MYSQL_PASSWORD_FILE=/run/secrets/mysql_password
187 |       - FRIENDICA_ADMIN_MAIL_FILE=/run/secrets/friendica_admin_mail
188 |     depends_on:
189 |       - db
190 |     secrets:
191 |       - friendica_admin_mail
192 |       - mysql_database
193 |       - mysql_password
194 |       - mysql_user
195 | 
196 | volumes:
197 |   db:
198 |   friendica:
199 | 
200 | secrets:
201 |   friendica_admin_mail:
202 |     file: ./friendica_admin_mail.txt # put admin email to this file
203 |   mysql_database:
204 |     file: ./mysql_database.txt # put mysql database name to this file
205 |   mysql_password:
206 |     file: ./mysql_password.txt # put mysql password to this file
207 |   mysql_user:
208 |     file: ./mysql_user.txt # put mysql username to this file
209 | ```
210 | 
211 | Currently, this is only supported for `FRIENDICA_ADMIN_MAIL`, `MYSQL_DATABASE`, `MYSQL_PASSWORD`, `MYSQL_USER`.
212 | 
213 | # Maintenance of the image
214 | 
215 | ## Updating to a newer version
216 | 
217 | You have to pull the latest image from the hub (`docker pull %%IMAGE%%`). The stable branch gets checked at every startup and will get updated if no installation was found or a new image is used.
218 | 
219 | # Running this image with Docker Compose
220 | 
221 | The easiest way to get a fully featured and functional setup is using a `compose.yaml` file. There are too many different possibilities to setup your system, so here are only some examples what you have to look for.
222 | 
223 | At first make sure you have chosen the right base image (fpm or apache) and added the features you wanted (see below). In every case you want to add a database container and docker volumes to get easy access to your persistent data. When you want your server reachable from the internet adding HTTPS-encryption is mandatory! See below for more information.
224 | 
225 | ## Base version - apache
226 | 
227 | This version will use the apache image and add a mariaDB container. The volumes are set to keep your data persistent. This setup provides **no ssl encryption** and is intended to run behind a proxy.
228 | 
229 | Make sure to set the variable `MYSQL_PASSWORD` before run this setup.
230 | 
231 | ```yaml
232 | services:
233 |   db:
234 |     image: mariadb
235 |     restart: always
236 |     volumes:
237 |       - db:/var/lib/mysql
238 |     environment:
239 |       - MYSQL_USER=friendica
240 |       - MYSQL_PASSWORD=
241 |       - MYSQL_DATABASE=friendica
242 |       - MYSQL_RANDOM_ROOT_PASSWORD=yes
243 | 
244 |   app:
245 |     image: %%IMAGE%%
246 |     restart: always
247 |     volumes:
248 |       - friendica:/var/www/html
249 |     ports:
250 |       - "8080:80"
251 |     environment:
252 |       - MYSQL_HOST=db
253 |       - MYSQL_USER=friendica
254 |       - MYSQL_PASSWORD=
255 |       - MYSQL_DATABASE=friendica
256 |       - [email protected]      
257 |     depends_on:
258 |       - db
259 | 
260 | volumes:
261 |   db:
262 |   friendica:
263 | ```
264 | 
265 | Then run `docker compose up -d`, now you can access Friendica at http://localhost:8080/ from your system.
266 | 
267 | ## Base version - FPM
268 | 
269 | When using the FPM image you need another container that acts as web server on port 80 and proxies requests to the Friendica container. In this example a simple nginx container is combined with the Friendica-fpm image and a MariaDB database container. The data is stored in docker volumes. The nginx container also need access to static files from your Friendica installation. It gets access to all the volumes mounted to Friendica via the `volumes_from` option. The configuration for nginx is stored in the configuration file `nginx.conf` that is mounted into the container.
270 | 
271 | An example can be found in the [examples section](https://github.com/friendica/docker/tree/master/.examples).
272 | 
273 | As this setup does **not include encryption** it should to be run behind a proxy.
274 | 
275 | Prerequisites for this example:
276 | 
277 | -	Make sure to set the variable `MYSQL_PASSWORD` and `MYSQL_USER` before you run the setup.
278 | -	Create a `nginx.conf` in the same directory as the `compose.yaml` file (take it from [example](https://github.com/friendica/docker/tree/master/.examples/docker-compose/with-traefik-proxy/mariadb-cron-smtp/fpm/web/nginx.conf))
279 | 
280 | ```yaml
281 | services:
282 |   db:
283 |     image: mariadb
284 |     restart: always
285 |     volumes:
286 |       - db:/var/lib/mysql
287 |     environment:
288 |       - MYSQL_USER=friendica
289 |       - MYSQL_PASSWORD=
290 |       - MYSQL_DATABASE=friendica
291 |       - MYSQL_RANDOM_ROOT_PASSWORD=yes
292 | 
293 |   app:
294 |     image: %%IMAGE%%:fpm
295 |     restart: always
296 |     volumes:
297 |       - friendica:/var/www/html    
298 |     environment:
299 |       - MYSQL_HOST=db
300 |       - MYSQL_USER=friendica
301 |       - MYSQL_PASSWORD=
302 |       - MYSQL_DATABASE=friendica
303 |       - [email protected]
304 |     networks:
305 |       - proxy-tier
306 |       - default 
307 | 
308 |   web:
309 |     image: nginx
310 |     ports:
311 |       - 8080:80
312 |     links:
313 |       - app
314 |     volumes:
315 |       - ./nginx.conf:/etc/nginx/nginx.conf:ro    
316 |     restart: always
317 |     networks:
318 |       - proxy-tier  
319 | 
320 | volumes:
321 |   db:
322 |   friendica:
323 | 
324 | networks:
325 |   proxy-tier:
326 | ```
327 | 
328 | Then run `docker compose up -d`, now you can access Friendica at http://localhost:8080/ from your system.
329 | 
330 | # Special settings for DEV/RC images
331 | 
332 | The `*-dev` and `*-rc` branches are directly downloaded and verified at each docker start to ensure that the latest sources are used. The parameter `FRIENDICA_UPGRADE` is required to be `true` (Default: `false`) to activate this behavior.
333 | 
334 | # Questions / Issues
335 | 
336 | If you got any questions or problems using the image, please visit our [Github Repository](https://github.com/friendica/docker) and write an issue.
337 | 
```

--------------------------------------------------------------------------------
/postgres/content.md:
--------------------------------------------------------------------------------

```markdown
  1 | # What is PostgreSQL?
  2 | 
  3 | PostgreSQL, often simply "Postgres", is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standards-compliance. As a database server, its primary function is to store data, securely and supporting best practices, and retrieve it later, as requested by other software applications, be it those on the same computer or those running on another computer across a network (including the Internet). It can handle workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users. Recent versions also provide replication of the database itself for security and scalability.
  4 | 
  5 | PostgreSQL implements the majority of the SQL:2011 standard, is ACID-compliant and transactional (including most DDL statements) avoiding locking issues using multiversion concurrency control (MVCC), provides immunity to dirty reads and full serializability; handles complex SQL queries using many indexing methods that are not available in other databases; has updateable views and materialized views, triggers, foreign keys; supports functions and stored procedures, and other expandability, and has a large number of extensions written by third parties. In addition to the possibility of working with the major proprietary and open source databases, PostgreSQL supports migration from them, by its extensive standard SQL support and available migration tools. And if proprietary extensions had been used, by its extensibility that can emulate many through some built-in and third-party open source compatibility extensions, such as for Oracle.
  6 | 
  7 | > [wikipedia.org/wiki/PostgreSQL](https://en.wikipedia.org/wiki/PostgreSQL)
  8 | 
  9 | %%LOGO%%
 10 | 
 11 | # How to use this image
 12 | 
 13 | ## start a postgres instance
 14 | 
 15 | ```console
 16 | $ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d %%IMAGE%%
 17 | ```
 18 | 
 19 | The default `postgres` user and database are created in the entrypoint with `initdb`.
 20 | 
 21 | > The postgres database is a default database meant for use by users, utilities and third party applications.
 22 | >
 23 | > [postgresql.org/docs](https://www.postgresql.org/docs/14/app-initdb.html)
 24 | 
 25 | ## ... or via `psql`
 26 | 
 27 | ```console
 28 | $ docker run -it --rm --network some-network %%IMAGE%% psql -h some-postgres -U postgres
 29 | psql (14.3)
 30 | Type "help" for help.
 31 | 
 32 | postgres=# SELECT 1;
 33 |  ?column? 
 34 | ----------
 35 |         1
 36 | (1 row)
 37 | ```
 38 | 
 39 | ## %%COMPOSE%%
 40 | 
 41 | Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate).
 42 | 
 43 | # How to extend this image
 44 | 
 45 | There are many ways to extend the `%%REPO%%` image. Without trying to support every possible use case, here are just a few that we have found useful.
 46 | 
 47 | ## Environment Variables
 48 | 
 49 | The PostgreSQL image uses several environment variables which are easy to miss. The only variable required is `POSTGRES_PASSWORD`, the rest are optional.
 50 | 
 51 | **Warning**: the Docker specific variables will only have an effect if you start the container with a data directory that is empty; any pre-existing database will be left untouched on container startup.
 52 | 
 53 | ### `POSTGRES_PASSWORD`
 54 | 
 55 | This environment variable is required for you to use the PostgreSQL image. It must not be empty or undefined. This environment variable sets the superuser password for PostgreSQL. The default superuser is defined by the `POSTGRES_USER` environment variable.
 56 | 
 57 | **Note 1:** The PostgreSQL image sets up `trust` authentication locally so you may notice a password is not required when connecting from `localhost` (inside the same container). However, a password will be required if connecting from a different host/container.
 58 | 
 59 | **Note 2:** This variable defines the superuser password in the PostgreSQL instance, as set by the `initdb` script during initial container startup. It has no effect on the `PGPASSWORD` environment variable that may be used by the `psql` client at runtime, as described at [https://www.postgresql.org/docs/14/libpq-envars.html](https://www.postgresql.org/docs/14/libpq-envars.html). `PGPASSWORD`, if used, will be specified as a separate environment variable.
 60 | 
 61 | ### `POSTGRES_USER`
 62 | 
 63 | This optional environment variable is used in conjunction with `POSTGRES_PASSWORD` to set a user and its password. This variable will create the specified user with superuser power and a database with the same name. If it is not specified, then the default user of `postgres` will be used.
 64 | 
 65 | Be aware that if this parameter is specified, PostgreSQL will still show `The files belonging to this database system will be owned by user "postgres"` during initialization. This refers to the Linux system user (from `/etc/passwd` in the image) that the `postgres` daemon runs as, and as such is unrelated to the `POSTGRES_USER` option. See the section titled "Arbitrary `--user` Notes" for more details.
 66 | 
 67 | ### `POSTGRES_DB`
 68 | 
 69 | This optional environment variable can be used to define a different name for the default database that is created when the image is first started. If it is not specified, then the value of `POSTGRES_USER` will be used.
 70 | 
 71 | ### `POSTGRES_INITDB_ARGS`
 72 | 
 73 | This optional environment variable can be used to send arguments to `postgres initdb`. The value is a space separated string of arguments as `postgres initdb` would expect them. This is useful for adding functionality like data page checksums: `-e POSTGRES_INITDB_ARGS="--data-checksums"`.
 74 | 
 75 | ### `POSTGRES_INITDB_WALDIR`
 76 | 
 77 | This optional environment variable can be used to define another location for the Postgres transaction log. By default the transaction log is stored in a subdirectory of the main Postgres data folder (`PGDATA`). Sometimes it can be desireable to store the transaction log in a different directory which may be backed by storage with different performance or reliability characteristics.
 78 | 
 79 | **Note:** on PostgreSQL 9.x, this variable is `POSTGRES_INITDB_XLOGDIR` (reflecting [the changed name of the `--xlogdir` flag to `--waldir` in PostgreSQL 10+](https://wiki.postgresql.org/wiki/New_in_postgres_10#Renaming_of_.22xlog.22_to_.22wal.22_Globally_.28and_location.2Flsn.29)).
 80 | 
 81 | ### `POSTGRES_HOST_AUTH_METHOD`
 82 | 
 83 | This optional variable can be used to control the `auth-method` for `host` connections for `all` databases, `all` users, and `all` addresses. If unspecified then [`scram-sha-256` password authentication](https://www.postgresql.org/docs/14/auth-password.html) is used (in 14+; `md5` in older releases). On an uninitialized database, this will populate `pg_hba.conf` via this approximate line:
 84 | 
 85 | ```console
 86 | echo "host all all all $POSTGRES_HOST_AUTH_METHOD" >> pg_hba.conf
 87 | ```
 88 | 
 89 | See the PostgreSQL documentation on [`pg_hba.conf`](https://www.postgresql.org/docs/14/auth-pg-hba-conf.html) for more information about possible values and their meanings.
 90 | 
 91 | **Note 1:** It is not recommended to use `trust` since it allows anyone to connect without a password, even if one is set (like via `POSTGRES_PASSWORD`). For more information see the PostgreSQL documentation on [*Trust Authentication*](https://www.postgresql.org/docs/14/auth-trust.html).
 92 | 
 93 | **Note 2:** If you set `POSTGRES_HOST_AUTH_METHOD` to `trust`, then `POSTGRES_PASSWORD` is not required.
 94 | 
 95 | **Note 3:** If you set this to an alternative value (such as `scram-sha-256`), you might need additional `POSTGRES_INITDB_ARGS` for the database to initialize correctly (such as `POSTGRES_INITDB_ARGS=--auth-host=scram-sha-256`).
 96 | 
 97 | ### `PGDATA`
 98 | 
 99 | > **Important Note:** Mount the data volume at `/var/lib/postgresql/data` and not at `/var/lib/postgresql` because mounts at the latter path WILL NOT PERSIST database data when the container is re-created. The Dockerfile that builds the image declares a volume at `/var/lib/postgresql/data` and if no data volume is mounted at that path then the container runtime will automatically create an [anonymous volume](https://docs.docker.com/engine/storage/#volumes) that is not reused across container re-creations. Data will be written to the anonymous volume rather than your intended data volume and won't persist when the container is deleted and re-created.
100 | 
101 | This optional variable can be used to define another location - like a subdirectory - for the database files. The default is `/var/lib/postgresql/data`. If the data volume you're using is a filesystem mountpoint (like with GCE persistent disks), or remote folder that cannot be chowned to the `postgres` user (like some NFS mounts), or contains folders/files (e.g. `lost+found`), Postgres `initdb` requires a subdirectory to be created within the mountpoint to contain the data.
102 | 
103 | For example:
104 | 
105 | ```console
106 | $ docker run -d \
107 | 	--name some-postgres \
108 | 	-e POSTGRES_PASSWORD=mysecretpassword \
109 | 	-e PGDATA=/var/lib/postgresql/data/pgdata \
110 | 	-v /custom/mount:/var/lib/postgresql/data \
111 | 	%%IMAGE%%
112 | ```
113 | 
114 | This is an environment variable that is not Docker specific. Because the variable is used by the `postgres` server binary (see the [PostgreSQL docs](https://www.postgresql.org/docs/14/app-postgres.html#id-1.9.5.14.7)), the entrypoint script takes it into account.
115 | 
116 | ## Docker Secrets
117 | 
118 | As an alternative to passing sensitive information via environment variables, `_FILE` may be appended to some of the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in `/run/secrets/<secret_name>` files. For example:
119 | 
120 | ```console
121 | $ docker run --name some-postgres -e POSTGRES_PASSWORD_FILE=/run/secrets/postgres-passwd -d %%IMAGE%%
122 | ```
123 | 
124 | Currently, this is only supported for `POSTGRES_INITDB_ARGS`, `POSTGRES_PASSWORD`, `POSTGRES_USER`, and `POSTGRES_DB`.
125 | 
126 | ## Initialization scripts
127 | 
128 | If you would like to do additional initialization in an image derived from this one, add one or more `*.sql`, `*.sql.gz`, or `*.sh` scripts under `/docker-entrypoint-initdb.d` (creating the directory if necessary). After the entrypoint calls `initdb` to create the default `postgres` user and database, it will run any `*.sql` files, run any executable `*.sh` scripts, and source any non-executable `*.sh` scripts found in that directory to do further initialization before starting the service.
129 | 
130 | **Warning**: scripts in `/docker-entrypoint-initdb.d` are only run if you start the container with a data directory that is empty; any pre-existing database will be left untouched on container startup. One common problem is that if one of your `/docker-entrypoint-initdb.d` scripts fails (which will cause the entrypoint script to exit) and your orchestrator restarts the container with the already initialized data directory, it will not continue on with your scripts.
131 | 
132 | For example, to add an additional user and database, add the following to `/docker-entrypoint-initdb.d/init-user-db.sh`:
133 | 
134 | ```bash
135 | #!/usr/bin/env bash
136 | set -e
137 | 
138 | psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
139 | 	CREATE USER docker;
140 | 	CREATE DATABASE docker;
141 | 	GRANT ALL PRIVILEGES ON DATABASE docker TO docker;
142 | EOSQL
143 | ```
144 | 
145 | These initialization files will be executed in sorted name order as defined by the current locale, which defaults to `en_US.utf8`. Any `*.sql` files will be executed by `POSTGRES_USER`, which defaults to the `postgres` superuser. It is recommended that any `psql` commands that are run inside of a `*.sh` script be executed as `POSTGRES_USER` by using the `--username "$POSTGRES_USER"` flag. This user will be able to connect without a password due to the presence of `trust` authentication for Unix socket connections made inside the container.
146 | 
147 | Additionally, as of [docker-library/postgres#253](https://github.com/docker-library/postgres/pull/253), these initialization scripts are run as the `postgres` user (or as the "semi-arbitrary user" specified with the `--user` flag to `docker run`; see the section titled "Arbitrary `--user` Notes" for more details). Also, as of [docker-library/postgres#440](https://github.com/docker-library/postgres/pull/440), the temporary daemon started for these initialization scripts listens only on the Unix socket, so any `psql` usage should drop the hostname portion (see [docker-library/postgres#474 (comment)](https://github.com/docker-library/postgres/issues/474#issuecomment-416914741) for example).
148 | 
149 | ## Database Configuration
150 | 
151 | There are many ways to set PostgreSQL server configuration. For information on what is available to configure, see the [PostgreSQL docs](https://www.postgresql.org/docs/14/runtime-config.html) for the specific version of PostgreSQL that you are running. Here are a few options for setting configuration:
152 | 
153 | -	Use a custom config file. Create a config file and get it into the container. If you need a starting place for your config file you can use the sample provided by PostgreSQL which is available in the container at `/usr/share/postgresql/postgresql.conf.sample` (`/usr/local/share/postgresql/postgresql.conf.sample` in Alpine variants).
154 | 
155 | 	-	**Important note:** you must set `listen_addresses = '*'`so that other containers will be able to access %%REPO%%.
156 | 
157 | 	```console
158 | 	$ # get the default config
159 | 	$ docker run -i --rm postgres cat /usr/share/postgresql/postgresql.conf.sample > my-postgres.conf
160 | 
161 | 	$ # customize the config
162 | 
163 | 	$ # run postgres with custom config
164 | 	$ docker run -d --name some-postgres -v "$PWD/my-postgres.conf":/etc/postgresql/postgresql.conf -e POSTGRES_PASSWORD=mysecretpassword %%IMAGE%% -c 'config_file=/etc/postgresql/postgresql.conf'
165 | 	```
166 | 
167 | -	Set options directly on the run line. The entrypoint script is made so that any options passed to the docker command will be passed along to the `postgres` server daemon. From the [PostgreSQL docs](https://www.postgresql.org/docs/14/app-postgres.html#id-1.9.5.14.6.3) we see that any option available in a `.conf` file can be set via `-c`.
168 | 
169 | 	```console
170 | 	$ docker run -d --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword %%IMAGE%% -c shared_buffers=256MB -c max_connections=200
171 | 	```
172 | 
173 | ## Locale Customization
174 | 
175 | You can extend the Debian-based images with a simple `Dockerfile` to set a different locale. The following example will set the default locale to `de_DE.utf8`:
176 | 
177 | ```dockerfile
178 | FROM %%IMAGE%%:14.3
179 | RUN localedef -i de_DE -c -f UTF-8 -A /usr/share/locale/locale.alias de_DE.UTF-8
180 | ENV LANG de_DE.utf8
181 | ```
182 | 
183 | Since database initialization only happens on container startup, this allows us to set the language before it is created.
184 | 
185 | Also of note, Alpine-based variants starting with Postgres 15 support [ICU locales](https://www.postgresql.org/docs/15/locale.html#id-1.6.11.3.7). Previous Postgres versions based on alpine do *not* support locales; see ["Character sets and locale" in the musl documentation](https://wiki.musl-libc.org/functional-differences-from-glibc.html#Character-sets-and-locale) for more details.
186 | 
187 | You can set locales in the Alpine-based images with `POSTGRES_INITDB_ARGS` to set a different locale. The following example will set the default locale for a newly initialized database to `de_DE.utf8`:
188 | 
189 | ```console
190 | $ docker run -d -e LANG=de_DE.utf8 -e POSTGRES_INITDB_ARGS="--locale-provider=icu --icu-locale=de-DE" -e POSTGRES_PASSWORD=mysecretpassword %%IMAGE%%:15-alpine 
191 | ```
192 | 
193 | ## Additional Extensions
194 | 
195 | When using the default (Debian-based) variants, installing additional extensions (such as PostGIS) should be as simple as installing the relevant packages (see [github.com/postgis/docker-postgis](https://github.com/postgis/docker-postgis/blob/81a0b55/14-3.2/Dockerfile) for a concrete example).
196 | 
197 | When using the Alpine variants, any postgres extension not listed in [postgres-contrib](https://www.postgresql.org/docs/14/contrib.html) will need to be compiled in your own image (again, see [github.com/postgis/docker-postgis](https://github.com/postgis/docker-postgis/blob/81a0b55/14-3.2/alpine/Dockerfile) for a concrete example).
198 | 
199 | # Arbitrary `--user` Notes
200 | 
201 | As of [docker-library/postgres#253](https://github.com/docker-library/postgres/pull/253), this image supports running as a (mostly) arbitrary user via `--user` on `docker run`. As of [docker-library/postgres#1018](https://github.com/docker-library/postgres/pull/1018), this is also the case for the Alpine variants.
202 | 
203 | The main caveat to note is that `postgres` doesn't care what UID it runs as (as long as the owner of `/var/lib/postgresql/data` matches), but `initdb` *does* care (and needs the user to exist in `/etc/passwd`):
204 | 
205 | ```console
206 | $ docker run -it --rm --user www-data -e POSTGRES_PASSWORD=mysecretpassword %%IMAGE%%
207 | The files belonging to this database system will be owned by user "www-data".
208 | ...
209 | 
210 | $ docker run -it --rm --user 1000:1000 -e POSTGRES_PASSWORD=mysecretpassword %%IMAGE%%
211 | initdb: could not look up effective user ID 1000: user does not exist
212 | ```
213 | 
214 | The three easiest ways to get around this:
215 | 
216 | 1.	allow the image to use [the `nss_wrapper` library](https://cwrap.org/nss_wrapper.html) to "fake" `/etc/passwd` contents for you (see [docker-library/postgres#448](https://github.com/docker-library/postgres/pull/448) for more details)
217 | 
218 | 2.	bind-mount `/etc/passwd` read-only from the host (if the UID you desire is a valid user on your host):
219 | 
220 | 	```console
221 | 	$ docker run -it --rm --user "$(id -u):$(id -g)" -v /etc/passwd:/etc/passwd:ro -e POSTGRES_PASSWORD=mysecretpassword %%IMAGE%%
222 | 	The files belonging to this database system will be owned by user "jsmith".
223 | 	...
224 | 	```
225 | 
226 | 3.	initialize the target directory separately from the final runtime (with a `chown` in between):
227 | 
228 | 	```console
229 | 	$ docker volume create pgdata
230 | 	$ docker run -it --rm -v pgdata:/var/lib/postgresql/data -e POSTGRES_PASSWORD=mysecretpassword %%IMAGE%%
231 | 	The files belonging to this database system will be owned by user "postgres".
232 | 	...
233 | 	( once it's finished initializing successfully and is waiting for connections, stop it )
234 | 	$ docker run -it --rm -v pgdata:/var/lib/postgresql/data bash chown -R 1000:1000 /var/lib/postgresql/data
235 | 	$ docker run -it --rm --user 1000:1000 -v pgdata:/var/lib/postgresql/data %%IMAGE%%
236 | 	LOG:  database system was shut down at 2017-01-20 00:03:23 UTC
237 | 	LOG:  MultiXact member wraparound protections are now enabled
238 | 	LOG:  autovacuum launcher started
239 | 	LOG:  database system is ready to accept connections
240 | 	```
241 | 
242 | # Caveats
243 | 
244 | If there is no database when `postgres` starts in a container, then `postgres` will create the default database for you. While this is the expected behavior of `postgres`, this means that it will not accept incoming connections during that time. This may cause issues when using automation tools, such as `docker compose`, that start several containers simultaneously.
245 | 
246 | Also note that the default `/dev/shm` size for containers is 64MB. If the shared memory is exhausted you will encounter `ERROR:  could not resize shared memory segment . . . : No space left on device`. You will want to pass [`--shm-size=256MB`](https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources) for example to `docker run`, or alternatively in [`docker compose`](https://docs.docker.com/compose/compose-file/05-services/#shm_size).
247 | 
248 | ## Where to Store Data
249 | 
250 | **Important note:** There are several ways to store data used by applications that run in Docker containers. We encourage users of the `%%IMAGE%%` images to familiarize themselves with the options available, including:
251 | 
252 | -	Let Docker manage the storage of your database data [by writing the database files to disk on the host system using its own internal volume management](https://docs.docker.com/storage/volumes/). This is the default and is easy and fairly transparent to the user. The downside is that the files may be hard to locate for tools and applications that run directly on the host system, i.e. outside containers.
253 | -	Create a data directory on the host system (outside the container) and [mount this to a directory visible from inside the container](https://docs.docker.com/storage/bind-mounts/). This places the database files in a known location on the host system, and makes it easy for tools and applications on the host system to access the files. The downside is that the user needs to make sure that the directory exists, and that e.g. directory permissions and other security mechanisms on the host system are set up correctly.
254 | 
255 | The Docker documentation is a good starting point for understanding the different storage options and variations, and there are multiple blogs and forum postings that discuss and give advice in this area. We will simply show the basic procedure here for the latter option above:
256 | 
257 | 1.	Create a data directory on a suitable volume on your host system, e.g. `/my/own/datadir`.
258 | 2.	Start your `%%IMAGE%%` container like this:
259 | 
260 | 	```console
261 | 	$ docker run --name some-%%REPO%% -v /my/own/datadir:/var/lib/postgresql/data -e POSTGRES_PASSWORD=mysecretpassword -d %%IMAGE%%:tag
262 | 	```
263 | 
264 | The `-v /my/own/datadir:/var/lib/postgresql/data` part of the command mounts the `/my/own/datadir` directory from the underlying host system as `/var/lib/postgresql/data` inside the container, where PostgreSQL by default will write its data files.
265 | 
```

--------------------------------------------------------------------------------
/nextcloud/content.md:
--------------------------------------------------------------------------------

```markdown
  1 | # What is Nextcloud?
  2 | 
  3 | A safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms.
  4 | 
  5 | > [Nextcloud.com](https://nextcloud.com/)
  6 | 
  7 | This Docker micro-service image is developed and maintained by the Nextcloud community. Nextcloud GmbH does not offer support for this Docker image. When you are looking to get professional support, you can become an [enterprise](https://nextcloud.com/enterprise/) customer or use [AIO](https://github.com/nextcloud/all-in-one#nextcloud-all-in-one).
  8 | 
  9 | # How to use this image
 10 | 
 11 | This image is designed to be used in a micro-service environment. There are two versions of the image you can choose from.
 12 | 
 13 | The `apache` tag contains a full Nextcloud installation including an apache web server. It is designed to be easy to use and gets you running pretty fast. This is also the default for the `latest` tag and version tags that are not further specified.
 14 | 
 15 | The second option is a `fpm` container. It is based on the [php-fpm](https://hub.docker.com/_/php/) image and runs a fastCGI-Process that serves your Nextcloud page. To use this image it must be combined with any webserver that can proxy the http requests to the FastCGI-port of the container.
 16 | 
 17 | ## Using the apache image
 18 | 
 19 | The apache image contains a webserver and exposes port 80. To start the container type:
 20 | 
 21 | ```console
 22 | $ docker run -d -p 8080:80 %%IMAGE%%
 23 | ```
 24 | 
 25 | Now you can access Nextcloud at http://localhost:8080/ from your host system.
 26 | 
 27 | ## Using the fpm image
 28 | 
 29 | To use the fpm image, you need an additional web server, such as [nginx](https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html), that can proxy http-request to the fpm-port of the container. For fpm connection this container exposes port 9000. In most cases, you might want to use another container or your host as proxy. If you use your host you can address your Nextcloud container directly on port 9000. If you use another container, make sure that you add them to the same docker network (via `docker run --network <NAME> ...` or a `compose.yaml` file). In both cases you don't want to map the fpm port to your host.
 30 | 
 31 | ```console
 32 | $ docker run -d %%IMAGE%%:fpm
 33 | ```
 34 | 
 35 | As the fastCGI-Process is not capable of serving static files (style sheets, images, ...), the webserver needs access to these files. This can be achieved with the `volumes-from` option. You can find more information in the Docker Compose section.
 36 | 
 37 | ## Using an external database
 38 | 
 39 | By default, this container uses SQLite for data storage but the Nextcloud setup wizard (appears on first run) allows connecting to an existing MySQL/MariaDB or PostgreSQL database. You can also link a database container, e. g. `--link my-mysql:mysql`, and then use `mysql` as the database host on setup. More info is in the Docker Compose section.
 40 | 
 41 | ## Persistent data
 42 | 
 43 | The Nextcloud installation and all data beyond what lives in the database (file uploads, etc.) are stored in the [unnamed docker volume](https://docs.docker.com/storage/volumes/) volume `/var/www/html`. The docker daemon will store that data within the docker directory `/var/lib/docker/volumes/...`. That means your data is saved even if the container crashes, is stopped or deleted.
 44 | 
 45 | A named Docker volume or a mounted host directory should be used for upgrades and backups. To achieve this, you need one volume for your database container and one for Nextcloud.
 46 | 
 47 | Nextcloud:
 48 | 
 49 | -	`/var/www/html/` folder where all Nextcloud data lives
 50 | 
 51 | ```console
 52 | $ docker run -d \
 53 | -v nextcloud:/var/www/html \
 54 | %%IMAGE%%
 55 | ```
 56 | 
 57 | Database:
 58 | 
 59 | -	`/var/lib/mysql` MySQL / MariaDB Data
 60 | -	`/var/lib/postgresql/data` PostgreSQL Data
 61 | 
 62 | ```console
 63 | $ docker run -d \
 64 | -v db:/var/lib/mysql \
 65 | mariadb:10.6
 66 | ```
 67 | 
 68 | ### Additional volumes
 69 | 
 70 | If you want to get fine grained access to your individual files, you can mount additional volumes for data, config, your theme and custom apps. The `data`, `config` files are stored in respective subfolders inside `/var/www/html/`. The apps are split into core `apps` (which are shipped with Nextcloud and you don't need to take care of) and a `custom_apps` folder. If you use a custom theme it would go into the `themes` subfolder.
 71 | 
 72 | Overview of the folders that can be mounted as volumes:
 73 | 
 74 | -	`/var/www/html` Main folder, needed for updating
 75 | -	`/var/www/html/custom_apps` installed / modified apps
 76 | -	`/var/www/html/config` local configuration
 77 | -	`/var/www/html/data` the actual data of your Nextcloud
 78 | -	`/var/www/html/themes/<YOUR_CUSTOM_THEME>` theming/branding
 79 | 
 80 | If you want to use named volumes for all of these, it would look like this:
 81 | 
 82 | ```console
 83 | $ docker run -d \
 84 | -v nextcloud:/var/www/html \
 85 | -v apps:/var/www/html/custom_apps \
 86 | -v config:/var/www/html/config \
 87 | -v data:/var/www/html/data \
 88 | -v theme:/var/www/html/themes/<YOUR_CUSTOM_THEME> \
 89 | %%IMAGE%%
 90 | ```
 91 | 
 92 | ### Custom volumes
 93 | 
 94 | If mounting additional volumes under `/var/www/html`, you should consider:
 95 | 
 96 | -	Confirming that [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude) contains the files and folders that should persist during installation and upgrades; or
 97 | -	Mounting storage volumes to locations outside of `/var/www/html`.
 98 | 
 99 | > You should note that data inside the main folder (`/var/www/html`) will be overridden/removed during installation and upgrades, unless listed in [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude). The additional volumes officially supported are already in that list, but custom volumes will need to be added by you. We suggest mounting custom storage volumes outside of `/var/www/html` and if possible read-only so that making this adjustment is unnecessary. If you must do so, however, you may build a custom image with a modified `/upgrade.exclude` file that incorporates your custom volume(s).
100 | 
101 | ## Using the Nextcloud command-line interface
102 | 
103 | To use the [Nextcloud command-line interface](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html) (aka. `occ` command):
104 | 
105 | ```console
106 | $ docker exec --user www-data CONTAINER_ID php occ
107 | ```
108 | 
109 | or for `docker compose`:
110 | 
111 | ```console
112 | $ docker compose exec --user www-data app php occ
113 | ```
114 | 
115 | ## Auto configuration via environment variables
116 | 
117 | The Nextcloud image supports auto configuration via environment variables. You can preconfigure everything that is asked on the install page on first run. To enable auto configuration, set your database connection via the following environment variables. You must specify all of the environment variables for a given database or the database environment variables defaults to SQLITE. ONLY use one database type!
118 | 
119 | **SQLite**:
120 | 
121 | -	`SQLITE_DATABASE` Name of the database using sqlite
122 | 
123 | **MYSQL/MariaDB**:
124 | 
125 | -	`MYSQL_DATABASE` Name of the database using mysql / mariadb.
126 | -	`MYSQL_USER` Username for the database using mysql / mariadb.
127 | -	`MYSQL_PASSWORD` Password for the database user using mysql / mariadb.
128 | -	`MYSQL_HOST` Hostname of the database server using mysql / mariadb.
129 | 
130 | **PostgreSQL**:
131 | 
132 | -	`POSTGRES_DB` Name of the database using postgres.
133 | -	`POSTGRES_USER` Username for the database using postgres.
134 | -	`POSTGRES_PASSWORD` Password for the database user using postgres.
135 | -	`POSTGRES_HOST` Hostname of the database server using postgres.
136 | 
137 | As an alternative to passing sensitive information via environment variables, `_FILE` may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. See [Docker secrets](#docker-secrets) section below.
138 | 
139 | If you set any group of values (i.e. all of `MYSQL_DATABASE`, `MYSQL_USER`, `MYSQL_PASSWORD`, `MYSQL_HOST`), they will not be asked in the install page on first run. With a complete configuration by using all variables for your database type, you can additionally configure your Nextcloud instance by setting admin user and password (only works if you set both):
140 | 
141 | -	`NEXTCLOUD_ADMIN_USER` Name of the Nextcloud admin user.
142 | -	`NEXTCLOUD_ADMIN_PASSWORD` Password for the Nextcloud admin user.
143 | 
144 | If you want, you can set the data directory, otherwise default value will be used.
145 | 
146 | -	`NEXTCLOUD_DATA_DIR` (default: `/var/www/html/data`) Configures the data directory where nextcloud stores all files from the users.
147 | 
148 | One or more trusted domains can be set through environment variable, too. They will be added to the configuration after install.
149 | 
150 | -	`NEXTCLOUD_TRUSTED_DOMAINS` (not set by default) Optional space-separated list of domains
151 | 
152 | The install and update script is only triggered when a default command is used (`apache-foreground` or `php-fpm`). If you use a custom command you have to enable the install / update with
153 | 
154 | -	`NEXTCLOUD_UPDATE` (default: `0`)
155 | 
156 | You might want to make sure the htaccess is up to date after each container update. Especially on multiple swarm nodes as any discrepancy will make your server unusable.
157 | 
158 | -	`NEXTCLOUD_INIT_HTACCESS` (not set by default) Set it to true to enable run `occ maintenance:update:htaccess` after container initialization.
159 | 
160 | If you want to use Redis you have to create a separate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your Compose file. To inform Nextcloud about the Redis container, pass in the following parameters:
161 | 
162 | -	`REDIS_HOST` (not set by default) Name of Redis container
163 | -	`REDIS_HOST_PORT` (default: `6379`) Optional port for Redis, only use for external Redis servers that run on non-standard ports.
164 | -	`REDIS_HOST_PASSWORD` (not set by default) Redis password
165 | 
166 | The use of Redis is recommended to prevent file locking problems. See the examples for further instructions.
167 | 
168 | To use an external SMTP server, you have to provide the connection details. To configure Nextcloud to use SMTP add:
169 | 
170 | -	`SMTP_HOST` (not set by default): The hostname of the SMTP server.
171 | -	`SMTP_SECURE` (empty by default): Set to `ssl` to use SSL, or `tls` to use STARTTLS.
172 | -	`SMTP_PORT` (default: `465` for SSL and `25` for non-secure connections): Optional port for the SMTP connection. Use `587` for an alternative port for STARTTLS.
173 | -	`SMTP_AUTHTYPE` (default: `LOGIN`): The method used for authentication. Use `PLAIN` if no authentication is required.
174 | -	`SMTP_NAME` (empty by default): The username for the authentication.
175 | -	`SMTP_PASSWORD` (empty by default): The password for the authentication.
176 | -	`MAIL_FROM_ADDRESS` (not set by default): Set the local-part for the 'from' field in the emails sent by Nextcloud.
177 | -	`MAIL_DOMAIN` (not set by default): Set a different domain for the emails than the domain where Nextcloud is installed.
178 | 
179 | At least `SMTP_HOST`, `MAIL_FROM_ADDRESS` and `MAIL_DOMAIN` must be set for the configurations to be applied.
180 | 
181 | Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/email_configuration.html) for other values to configure SMTP.
182 | 
183 | To use an external S3 compatible object store as primary storage, set the following variables:
184 | 
185 | -	`OBJECTSTORE_S3_BUCKET`: The name of the bucket that Nextcloud should store the data in
186 | -	`OBJECTSTORE_S3_REGION`: The region that the S3 bucket resides in
187 | -	`OBJECTSTORE_S3_HOST`: The hostname of the object storage server
188 | -	`OBJECTSTORE_S3_PORT`: The port that the object storage server is being served over
189 | -	`OBJECTSTORE_S3_KEY`: AWS style access key
190 | -	`OBJECTSTORE_S3_SECRET`: AWS style secret access key
191 | -	`OBJECTSTORE_S3_STORAGE_CLASS`: The storage class to use when adding objects to the bucket
192 | -	`OBJECTSTORE_S3_SSL` (default: `true`): Whether or not SSL/TLS should be used to communicate with object storage server
193 | -	`OBJECTSTORE_S3_USEPATH_STYLE` (default: `false`): Not required for AWS S3
194 | -	`OBJECTSTORE_S3_LEGACYAUTH` (default: `false`): Not required for AWS S3
195 | -	`OBJECTSTORE_S3_OBJECT_PREFIX` (default: `urn:oid:`): Prefix to prepend to the fileid
196 | -	`OBJECTSTORE_S3_AUTOCREATE` (default: `true`): Create the container if it does not exist
197 | -	`OBJECTSTORE_S3_SSE_C_KEY` (not set by default): Base64 encoded key with a maximum length of 32 bytes for server side encryption (SSE-C)
198 | 
199 | Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html#simple-storage-service-s3) for more information.
200 | 
201 | To use an external OpenStack Swift object store as primary storage, set the following variables:
202 | 
203 | -	`OBJECTSTORE_SWIFT_URL`: The Swift identity (Keystone) endpoint
204 | -	`OBJECTSTORE_SWIFT_AUTOCREATE` (default: `false`): Whether or not Nextcloud should automatically create the Swift container
205 | -	`OBJECTSTORE_SWIFT_USER_NAME`: Swift username
206 | -	`OBJECTSTORE_SWIFT_USER_PASSWORD`: Swift user password
207 | -	`OBJECTSTORE_SWIFT_USER_DOMAIN` (default: `Default`): Swift user domain
208 | -	`OBJECTSTORE_SWIFT_PROJECT_NAME`: OpenStack project name
209 | -	`OBJECTSTORE_SWIFT_PROJECT_DOMAIN` (default: `Default`): OpenStack project domain
210 | -	`OBJECTSTORE_SWIFT_SERVICE_NAME` (default: `swift`): Swift service name
211 | -	`OBJECTSTORE_SWIFT_REGION`: Swift endpoint region
212 | -	`OBJECTSTORE_SWIFT_CONTAINER_NAME`: Swift container (bucket) that Nextcloud should store the data in
213 | 
214 | Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html#openstack-swift) for more information.
215 | 
216 | To customize other PHP limits you can simply change the following variables:
217 | 
218 | -	`PHP_MEMORY_LIMIT` (default `512M`) This sets the maximum amount of memory in bytes that a script is allowed to allocate. This is meant to help prevent poorly written scripts from eating up all available memory but it can prevent normal operation if set too tight.
219 | -	`PHP_UPLOAD_LIMIT` (default `512M`) This sets the upload limit (`post_max_size` and `upload_max_filesize`) for big files. Note that you may have to change other limits depending on your client, webserver or operating system. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html) for more information.
220 | 
221 | To customize Apache max file upload limit you can change the following variable:
222 | 
223 | -	`APACHE_BODY_LIMIT` (default `1073741824` [1GiB]) This restricts the total size of the HTTP request body sent from the client. It specifies the number of *bytes* that are allowed in a request body. A value of **0** means **unlimited**. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html#apache) for more information.
224 | 
225 | ## Auto configuration via hook folders
226 | 
227 | There are 5 hooks
228 | 
229 | -	`pre-installation` Executed before the Nextcloud is installed/initiated
230 | -	`post-installation` Executed after the Nextcloud is installed/initiated
231 | -	`pre-upgrade` Executed before the Nextcloud is upgraded
232 | -	`post-upgrade` Executed after the Nextcloud is upgraded
233 | -	`before-starting` Executed before the Nextcloud starts
234 | 
235 | To use the hooks triggered by the `entrypoint` script, either
236 | 
237 | -	Added your script(s) to the individual of the hook folder(s), which are located at the path `/docker-entrypoint-hooks.d` in the container
238 | -	Use volume(s) if you want to use script from the host system inside the container, see example.
239 | 
240 | **Note:** Only the script(s) located in a hook folder (not sub-folders), ending with `.sh` and marked as executable, will be executed.
241 | 
242 | **Example:** Mount using volumes
243 | 
244 | ```yaml
245 | ...
246 |   app:
247 |     image: %%IMAGE%%:stable
248 | 
249 |     volumes:
250 |       - ./app-hooks/pre-installation:/docker-entrypoint-hooks.d/pre-installation
251 |       - ./app-hooks/post-installation:/docker-entrypoint-hooks.d/post-installation
252 |       - ./app-hooks/pre-upgrade:/docker-entrypoint-hooks.d/pre-upgrade
253 |       - ./app-hooks/post-upgrade:/docker-entrypoint-hooks.d/post-upgrade
254 |       - ./app-hooks/before-starting:/docker-entrypoint-hooks.d/before-starting
255 | ...
256 | ```
257 | 
258 | ## Using the apache image behind a reverse proxy and auto configure server host and protocol
259 | 
260 | The apache image will replace the remote addr (IP address visible to Nextcloud) with the IP address from `X-Real-IP` if the request is coming from a proxy in `10.0.0.0/8`, `172.16.0.0/12` or `192.168.0.0/16` by default. If you want Nextcloud to pick up the server host (`HTTP_X_FORWARDED_HOST`), protocol (`HTTP_X_FORWARDED_PROTO`) and client IP (`HTTP_X_FORWARDED_FOR`) from a trusted proxy, then disable rewrite IP and add the reverse proxy's IP address to `TRUSTED_PROXIES`.
261 | 
262 | -	`APACHE_DISABLE_REWRITE_IP` (not set by default): Set to 1 to disable rewrite IP.
263 | -	`TRUSTED_PROXIES` (empty by default): A space-separated list of trusted proxies. CIDR notation is supported for IPv4.
264 | 
265 | If the `TRUSTED_PROXIES` approach does not work for you, try using fixed values for overwrite parameters.
266 | 
267 | -	`OVERWRITEHOST` (empty by default): Set the hostname of the proxy. Can also specify a port.
268 | -	`OVERWRITEPROTOCOL` (empty by default): Set the protocol of the proxy, http or https.
269 | -	`OVERWRITECLIURL` (empty by default): Set the cli url of the proxy (e.g. https://mydnsname.example.com)
270 | -	`OVERWRITEWEBROOT` (empty by default): Set the absolute path of the proxy.
271 | -	`OVERWRITECONDADDR` (empty by default): Regex to overwrite the values dependent on the remote address.
272 | 
273 | Check the [Nexcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html) for more details.
274 | 
275 | Keep in mind that once set, removing these environment variables won't remove these values from the configuration file, due to how Nextcloud merges configuration files together.
276 | 
277 | # Running this image with Docker Compose
278 | 
279 | The easiest way to get a fully featured and functional setup is using a `compose.yaml` file. There are too many different possibilities to setup your system, so here are only some examples of what you have to look for.
280 | 
281 | At first, make sure you have chosen the right base image (fpm or apache) and added features you wanted (see below). In every case, you would want to add a database container and docker volumes to get easy access to your persistent data. When you want to have your server reachable from the internet, adding HTTPS-encryption is mandatory! See below for more information.
282 | 
283 | ## Base version - apache
284 | 
285 | This version will use the apache image and add a mariaDB container. The volumes are set to keep your data persistent. This setup provides **no ssl encryption** and is intended to run behind a proxy.
286 | 
287 | Make sure to pass in values for `MYSQL_ROOT_PASSWORD` and `MYSQL_PASSWORD` variables before you run this setup.
288 | 
289 | ```yaml
290 | volumes:
291 |   nextcloud:
292 |   db:
293 | 
294 | services:
295 |   db:
296 |     image: mariadb:10.6
297 |     restart: always
298 |     command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
299 |     volumes:
300 |       - db:/var/lib/mysql
301 |     environment:
302 |       - MYSQL_ROOT_PASSWORD=
303 |       - MYSQL_PASSWORD=
304 |       - MYSQL_DATABASE=nextcloud
305 |       - MYSQL_USER=nextcloud
306 | 
307 |   app:
308 |     image: %%IMAGE%%
309 |     restart: always
310 |     ports:
311 |       - 8080:80
312 |     links:
313 |       - db
314 |     volumes:
315 |       - nextcloud:/var/www/html
316 |     environment:
317 |       - MYSQL_PASSWORD=
318 |       - MYSQL_DATABASE=nextcloud
319 |       - MYSQL_USER=nextcloud
320 |       - MYSQL_HOST=db
321 | ```
322 | 
323 | Then run `docker compose up -d`, now you can access Nextcloud at http://localhost:8080/ from your host system.
324 | 
325 | ## Base version - FPM
326 | 
327 | When using the FPM image, you need another container that acts as web server on port 80 and proxies the requests to the Nextcloud container. In this example a simple nginx container is combined with the Nextcloud-fpm image and a MariaDB database container. The data is stored in docker volumes. The nginx container also needs access to static files from your Nextcloud installation. It gets access to all the volumes mounted to Nextcloud via the `volumes_from` option. The configuration for nginx is stored in the configuration file `nginx.conf`, that is mounted into the container. An example can be found in the examples section [here](https://github.com/nextcloud/docker/tree/master/.examples).
328 | 
329 | As this setup does **not include encryption**, it should be run behind a proxy.
330 | 
331 | Make sure to pass in values for `MYSQL_ROOT_PASSWORD` and `MYSQL_PASSWORD` variables before you run this setup.
332 | 
333 | ```yaml
334 | volumes:
335 |   nextcloud:
336 |   db:
337 | 
338 | services:
339 |   db:
340 |     image: mariadb:10.6
341 |     restart: always
342 |     command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
343 |     volumes:
344 |       - db:/var/lib/mysql
345 |     environment:
346 |       - MYSQL_ROOT_PASSWORD=
347 |       - MYSQL_PASSWORD=
348 |       - MYSQL_DATABASE=nextcloud
349 |       - MYSQL_USER=nextcloud
350 | 
351 |   app:
352 |     image: %%IMAGE%%:fpm
353 |     restart: always
354 |     links:
355 |       - db
356 |     volumes:
357 |       - nextcloud:/var/www/html
358 |     environment:
359 |       - MYSQL_PASSWORD=
360 |       - MYSQL_DATABASE=nextcloud
361 |       - MYSQL_USER=nextcloud
362 |       - MYSQL_HOST=db
363 | 
364 |   web:
365 |     image: nginx
366 |     restart: always
367 |     ports:
368 |       - 8080:80
369 |     links:
370 |       - app
371 |     volumes:
372 |       - ./nginx.conf:/etc/nginx/nginx.conf:ro
373 |     volumes_from:
374 |       - app
375 | ```
376 | 
377 | Then run `docker compose up -d`, now you can access Nextcloud at http://localhost:8080/ from your host system.
378 | 
379 | # Docker Secrets
380 | 
381 | As an alternative to passing sensitive information via environment variables, `_FILE` may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in `/run/secrets/<secret_name>` files. For example:
382 | 
383 | ```yaml
384 | services:
385 |   db:
386 |     image: postgres
387 |     restart: always
388 |     volumes:
389 |       - db:/var/lib/postgresql/data
390 |     environment:
391 |       - POSTGRES_DB_FILE=/run/secrets/postgres_db
392 |       - POSTGRES_USER_FILE=/run/secrets/postgres_user
393 |       - POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
394 |     secrets:
395 |       - postgres_db
396 |       - postgres_password
397 |       - postgres_user
398 | 
399 |   app:
400 |     image: %%IMAGE%%
401 |     restart: always
402 |     ports:
403 |       - 8080:80
404 |     volumes:
405 |       - nextcloud:/var/www/html
406 |     environment:
407 |       - POSTGRES_HOST=db
408 |       - POSTGRES_DB_FILE=/run/secrets/postgres_db
409 |       - POSTGRES_USER_FILE=/run/secrets/postgres_user
410 |       - POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
411 |       - NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password
412 |       - NEXTCLOUD_ADMIN_USER_FILE=/run/secrets/nextcloud_admin_user
413 |     depends_on:
414 |       - db
415 |     secrets:
416 |       - nextcloud_admin_password
417 |       - nextcloud_admin_user
418 |       - postgres_db
419 |       - postgres_password
420 |       - postgres_user
421 | 
422 | volumes:
423 |   db:
424 |   nextcloud:
425 | 
426 | secrets:
427 |   nextcloud_admin_password:
428 |     file: ./nextcloud_admin_password.txt # put admin password in this file
429 |   nextcloud_admin_user:
430 |     file: ./nextcloud_admin_user.txt # put admin username in this file
431 |   postgres_db:
432 |     file: ./postgres_db.txt # put postgresql db name in this file
433 |   postgres_password:
434 |     file: ./postgres_password.txt # put postgresql password in this file
435 |   postgres_user:
436 |     file: ./postgres_user.txt # put postgresql username in this file
437 | ```
438 | 
439 | Currently, this is only supported for `NEXTCLOUD_ADMIN_PASSWORD`, `NEXTCLOUD_ADMIN_USER`, `MYSQL_DATABASE`, `MYSQL_PASSWORD`, `MYSQL_USER`, `POSTGRES_DB`, `POSTGRES_PASSWORD`, `POSTGRES_USER`, `REDIS_HOST_PASSWORD`, `SMTP_PASSWORD`, `OBJECTSTORE_S3_KEY`, and `OBJECTSTORE_S3_SECRET`.
440 | 
441 | If you set any group of values (i.e. all of `MYSQL_DATABASE_FILE`, `MYSQL_USER_FILE`, `MYSQL_PASSWORD_FILE`, `MYSQL_HOST`), the script will not use the corresponding group of environment variables (`MYSQL_DATABASE`, `MYSQL_USER`, `MYSQL_PASSWORD`, `MYSQL_HOST`).
442 | 
443 | # Make your Nextcloud available from the internet
444 | 
445 | Until here, your Nextcloud is just available from your docker host. If you want your Nextcloud available from the internet adding SSL encryption is mandatory.
446 | 
447 | ## HTTPS - SSL encryption
448 | 
449 | There are many different possibilities to introduce encryption depending on your setup.
450 | 
451 | We recommend using a reverse proxy in front of your Nextcloud installation. Your Nextcloud will only be reachable through the proxy, which encrypts all traffic to the clients. You can mount your manually generated certificates to the proxy or use a fully automated solution which generates and renews the certificates for you.
452 | 
453 | In our [examples](https://github.com/nextcloud/docker/tree/master/.examples) section we have an example for a fully automated setup using a reverse proxy, a container for [Let's Encrypt](https://letsencrypt.org/) certificate handling, database and Nextcloud. It uses the popular [nginx-proxy](https://github.com/jwilder/nginx-proxy) and [docker-letsencrypt-nginx-proxy-companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion) containers. Please check the according documentations before using this setup.
454 | 
455 | # First use
456 | 
457 | When you first access your Nextcloud, the setup wizard will appear and ask you to choose an administrator account username, password and the database connection. For the database use `db` as host and `nextcloud` as table and user name. Also enter the password you chose in your `compose.yaml` file.
458 | 
459 | # Update to a newer version
460 | 
461 | Updating the Nextcloud container is done by pulling the new image, throwing away the old container and starting the new one.
462 | 
463 | **It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16.**
464 | 
465 | Since all data is stored in volumes, nothing gets lost. The startup script will check for the version in your volume and the installed docker version. If it finds a mismatch, it automatically starts the upgrade process. Don't forget to add all the volumes to your new container, so it works as expected.
466 | 
467 | ```console
468 | $ docker pull %%IMAGE%%
469 | $ docker stop <your_nextcloud_container>
470 | $ docker rm <your_nextcloud_container>
471 | $ docker run <OPTIONS> -d %%IMAGE%%
472 | ```
473 | 
474 | Beware that you have to run the same command with the options that you used to initially start your Nextcloud. That includes volumes, port mapping.
475 | 
476 | When using Docker Compose, your `compose.yaml` file takes care of your configuration, so you just have to run:
477 | 
478 | ```console
479 | $ docker compose pull
480 | $ docker compose up -d
481 | ```
482 | 
483 | # Adding Features
484 | 
485 | A lot of people want to use additional functionality inside their Nextcloud installation. If the image does not include the packages you need, you can easily build your own image on top of it. Start your derived image with the `FROM` statement and add whatever you like.
486 | 
487 | ```dockerfile
488 | FROM %%IMAGE%%:apache
489 | 
490 | RUN ...
491 | ```
492 | 
493 | The [examples folder](https://github.com/nextcloud/docker/blob/master/.examples) gives a few examples on how to add certain functionalities, like including the cron job, smb-support or imap-authentication.
494 | 
495 | If you use your own Dockerfile, you need to configure your `compose.yaml` file accordingly. Switch out the `image` option with `build`. You have to specify the path to your Dockerfile. (in the example it's in the same directory next to the `compose.yaml` file)
496 | 
497 | ```yaml
498 |   app:
499 |     build: .
500 |     restart: always
501 |     links:
502 |       - db
503 |     volumes:
504 |       - data:/var/www/html/data
505 |       - config:/var/www/html/config
506 |       - apps:/var/www/html/apps
507 | ```
508 | 
509 | If you intend to use another command to run the image, make sure that you set `NEXTCLOUD_UPDATE=1` in your Dockerfile. Otherwise the installation and update will not work.
510 | 
511 | ```dockerfile
512 | FROM %%IMAGE%%:apache
513 | 
514 | ...
515 | 
516 | ENV NEXTCLOUD_UPDATE=1
517 | 
518 | CMD ["/usr/bin/supervisord"]
519 | ```
520 | 
521 | **Updating** your own derived image is also very simple. When a new version of the Nextcloud image is available run:
522 | 
523 | ```console
524 | docker build -t your-name --pull .
525 | docker run -d your-name
526 | ```
527 | 
528 | Or for Docker Compose:
529 | 
530 | ```console
531 | docker compose build --pull
532 | docker compose up -d
533 | ```
534 | 
535 | The `--pull` option tells docker to look for new versions of the base image. Then the build instructions inside your `Dockerfile` are run on top of the new image.
536 | 
537 | # Migrating an existing installation
538 | 
539 | You're already using Nextcloud and want to switch to docker? Great! Here are some things to look out for:
540 | 
541 | 1.	Define your whole Nextcloud infrastructure in a `compose.yaml` file and run it with `docker compose up -d` to get the base installation, volumes and database. Work from there.
542 | 
543 | 2.	Restore your database from a mysqldump (nextcloud\_db\_1 is the name of your db container)
544 | 
545 | 	-	To import from a MySQL dump use the following commands
546 | 
547 | 		```console
548 | 		docker cp ./database.dmp nextcloud_db_1:/dmp
549 | 		docker compose exec db sh -c "mysql --user USER --password PASSWORD nextcloud < /dmp"
550 | 		docker compose exec db rm /dmp
551 | 		```
552 | 
553 | 	-	To import from a PostgreSQL dump use to following commands
554 | 
555 | 		```console
556 | 		docker cp ./database.dmp nextcloud_db_1:/dmp
557 | 		docker compose exec db sh -c "psql -U USER --set ON_ERROR_STOP=on nextcloud < /dmp"
558 | 		docker compose exec db rm /dmp
559 | 		```
560 | 
561 | 3.	Edit your config.php
562 | 
563 | 	1.	Set database connection
564 | 
565 | 		-	In case of MySQL database
566 | 
567 | 			```php
568 | 			'dbhost' => 'db:3306',
569 | 			```
570 | 
571 | 		-	In case of PostgreSQL database
572 | 
573 | 			```php
574 | 			'dbhost' => 'db:5432',
575 | 			```
576 | 
577 | 	2.	Make sure you have no configuration for the `apps_paths`. Delete lines like these
578 | 
579 | 		```php
580 | 		'apps_paths' => array (
581 | 		    0 => array (
582 | 		        'path' => OC::$SERVERROOT.'/apps',
583 | 		        'url' => '/apps',
584 | 		        'writable' => true,
585 | 		    ),
586 | 		),
587 | 		```
588 | 
589 | 	3.	Make sure to have the `apps` directory non writable and the `custom_apps` directory writable
590 | 
591 | 		```php
592 | 		'apps_paths' => array (
593 | 		  0 => array (
594 | 		    'path' => '/var/www/html/apps',
595 | 		    'url' => '/apps',
596 | 		    'writable' => false,
597 | 		  ),
598 | 		  1 => array (
599 | 		    'path' => '/var/www/html/custom_apps',
600 | 		    'url' => '/custom_apps',
601 | 		    'writable' => true,
602 | 		  ),
603 | 		),
604 | 		```
605 | 
606 | 	4.	Make sure your data directory is set to /var/www/html/data
607 | 
608 | 		```php
609 | 		'datadirectory' => '/var/www/html/data',
610 | 		```
611 | 
612 | 4.	Copy your data (nextcloud_app_1 is the name of your Nextcloud container):
613 | 
614 | 	```console
615 | 	docker cp ./data/ nextcloud_app_1:/var/www/html/
616 | 	docker compose exec app chown -R www-data:www-data /var/www/html/data
617 | 	docker cp ./theming/ nextcloud_app_1:/var/www/html/
618 | 	docker compose exec app chown -R www-data:www-data /var/www/html/theming
619 | 	docker cp ./config/config.php nextcloud_app_1:/var/www/html/config
620 | 	docker compose exec app chown -R www-data:www-data /var/www/html/config
621 | 	```
622 | 
623 | 	If you want to preserve the metadata of your files like timestamps, copy the data directly on the host to the named volume using plain `cp` like this:
624 | 
625 | 	```console
626 | 	cp --preserve --recursive ./data/ /path/to/nextcloudVolume/data
627 | 	```
628 | 
629 | 5.	Copy only the custom apps you use (or simply redownload them from the web interface):
630 | 
631 | 	```console
632 | 	docker cp ./custom_apps/ nextcloud_data:/var/www/html/
633 | 	docker compose exec app chown -R www-data:www-data /var/www/html/custom_apps
634 | 	```
635 | 
636 | # Questions / Issues
637 | 
638 | If you got any questions or problems using the image, please visit our [Github Repository](https://github.com/nextcloud/docker) and write an issue.
639 | 
```

--------------------------------------------------------------------------------
/influxdb/content.md:
--------------------------------------------------------------------------------

```markdown
  1 | # What is InfluxDB?
  2 | 
  3 | InfluxDB is the time series data platform designed to handle high write and query workloads. Using InfluxDB, you can collect, store, and process large amounts of timestamped data, including metrics and events for use cases such as DevOps monitoring, application metrics, IoT sensors, and event monitoring.
  4 | 
  5 | Use the InfluxDB Docker Hub image to write, query, and process time series data in [InfluxDB v2](https://docs.influxdata.com/influxdb/v2/) or [InfluxDB v1](https://docs.influxdata.com/influxdb/v1/).
  6 | 
  7 | For more information, visit https://influxdata.com.
  8 | 
  9 | %%LOGO%%
 10 | 
 11 | # How to use this image for InfluxDB v2
 12 | 
 13 | **Quick start**: See the guide to [Install InfluxDB v2 for Docker](https://docs.influxdata.com/influxdb/v2/install/?t=Docker) and get started using InfluxDB v2.
 14 | 
 15 | ## Start InfluxDB v2 and set up with the UI, CLI, or API
 16 | 
 17 | To start an InfluxDB v2 container, enter the following command:
 18 | 
 19 | ```bash
 20 | docker run \
 21 |     -p 8086:8086 \
 22 |     -v "$PWD/data:/var/lib/influxdb2" \
 23 |     -v "$PWD/config:/etc/influxdb2" \
 24 |     %%IMAGE%%:2
 25 | ```
 26 | 
 27 | Replace the following with your own values:
 28 | 
 29 | -	`$PWD/data`: A host directory to mount at the container's [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path
 30 | -	`$PWD/config`: A host directory to mount at the container's [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path
 31 | 
 32 | After the container starts, the InfluxDB UI and API are accessible at http://localhost:8086 on the host. You're ready to set up an initial admin user, token, and bucket from outside or inside the container--choose one of the following:
 33 | 
 34 | -	**Set up InfluxDB from outside the container**: [Set up InfluxDB](https://docs.influxdata.com/influxdb/v2/get-started/setup/) from the host or network using the InfluxDB UI, `influx` CLI, or HTTP API.
 35 | 
 36 | -	**Set up InfluxDB from inside the container**: Use `docker exec` to run the `influx` CLI installed in the container--for example:
 37 | 
 38 | 	```bash
 39 | 	docker exec influxdb2 influx setup \
 40 | 	  --username $USERNAME \
 41 | 	  --password $PASSWORD \
 42 | 	  --org $ORGANIZATION \
 43 | 	  --bucket $BUCKET \
 44 | 	  --force
 45 | 	```
 46 | 
 47 | See the [`influx setup` documentation](https://docs.influxdata.com/influxdb/v2/reference/cli/influx/setup/) for the full list of options.
 48 | 
 49 | *If you run setup from within the container, InfluxDB stores `influx` CLI [connection configurations](/influxdb/v2/reference/cli/influx/#provide-required-authentication-credentials) in the container's `/etc/influxdb2/influx-configs` file.*
 50 | 
 51 | ## Start InfluxDB v2 with automated setup
 52 | 
 53 | To start and set up InfluxDB v2 with a single command, specify `-e DOCKER_INFLUXDB_INIT_MODE=setup` and `-e DOCKER_INFLUXDB_INIT_` environment variables for the initial user, password, bucket, and organization--for example:
 54 | 
 55 | ```bash
 56 | docker run -d -p 8086:8086 \
 57 |   -v "$PWD/data:/var/lib/influxdb2" \
 58 |   -v "$PWD/config:/etc/influxdb2" \
 59 |   -e DOCKER_INFLUXDB_INIT_MODE=setup \
 60 |   -e DOCKER_INFLUXDB_INIT_USERNAME=<USERNAME> \
 61 |   -e DOCKER_INFLUXDB_INIT_PASSWORD=<PASSWORD> \
 62 |   -e DOCKER_INFLUXDB_INIT_ORG=<ORG_NAME> \
 63 |   -e DOCKER_INFLUXDB_INIT_BUCKET=<BUCKET_NAME> \
 64 |   %%IMAGE%%:2
 65 | ```
 66 | 
 67 | Replace the following with your own values:
 68 | 
 69 | -	`$PWD/data`: A host directory to mount at the container's [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path
 70 | -	`$PWD/config`: A host directory to mount at the container's [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path
 71 | -	`<USERNAME>`: A name for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/)
 72 | -	`<PASSWORD>`: A password for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/)
 73 | -	`<ORG_NAME>`: A name for your initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/)
 74 | -	`<BUCKET_NAME>`: A name for your initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/) (database)
 75 | 
 76 | *If you run setup from within the container, InfluxDB stores `influx` CLI [connection configurations](/influxdb/v2/reference/cli/influx/#provide-required-authentication-credentials) in the container's `/etc/influxdb2/influx-configs` file.*
 77 | 
 78 | ### Automated setup options
 79 | 
 80 | In setup mode (`DOCKER_INFLUXDB_INIT_MODE=setup`) or upgrade mode (`DOCKER_INFLUXDB_INIT_MODE=upgrade`), you can specify the following Docker-specific environment variables to provide initial setup values:
 81 | 
 82 | -	`DOCKER_INFLUXDB_INIT_USERNAME`: A name for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/).
 83 | -	`DOCKER_INFLUXDB_INIT_PASSWORD`: A password for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/).
 84 | -	`DOCKER_INFLUXDB_INIT_ORG`: A name for your initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/).
 85 | -	`DOCKER_INFLUXDB_INIT_BUCKET`: A name for your initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/).
 86 | -	Optional: `DOCKER_INFLUXDB_INIT_RETENTION`: A [duration](https://docs.influxdata.com/influxdb/v2/reference/glossary/#duration) to use as the initial bucket's [retention period](https://docs.influxdata.com/influxdb/v2/reference/internals/data-retention/#bucket-retention-period). Default: `0` (infinite; doesn't delete data).
 87 | -	Optional: `DOCKER_INFLUXDB_INIT_ADMIN_TOKEN`: A string value to set for the [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). Default: a generated token.
 88 | 
 89 | The following example shows how to pass values for all initial setup options:
 90 | 
 91 | ```bash
 92 | docker run -d -p 8086:8086 \
 93 |     -v "$PWD/data:/var/lib/influxdb2" \
 94 |     -v "$PWD/config:/etc/influxdb2" \
 95 |     -e DOCKER_INFLUXDB_INIT_MODE=setup \
 96 |     -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \
 97 |     -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \
 98 |     -e DOCKER_INFLUXDB_INIT_ORG=my-org \
 99 |     -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \
100 |     -e DOCKER_INFLUXDB_INIT_RETENTION=1w \
101 |     -e DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=my-super-secret-auth-token \
102 |     %%IMAGE%%:2
103 | ```
104 | 
105 | *To upgrade from InfluxDB 1.x to InfluxDB 2.x, see the **Upgrading from InfluxDB 1.x** section below.\*
106 | 
107 | With InfluxDB set up and running, see the [Get started](https://docs.influxdata.com/influxdb/v2/get-started/) tutorial to create tokens and write and query data.
108 | 
109 | ### Custom Initialization Scripts
110 | 
111 | In `setup` mode (`DOCKER_INFLUXDB_INIT_MODE=setup`) or `upgrade` mode (`DOCKER_INFLUXDB_INIT_MODE=upgrade`), the InfluxDB Docker Hub image supports running custom initialization scripts. After the setup process completes, scripts are executed in lexical sort order by name.
112 | 
113 | For the container to run scripts, they must:
114 | 
115 | -	Be mounted in the container's `/docker-entrypoint-initdb.d` directory
116 | -	Be named using the `.sh` file name extension
117 | -	Be executable by the user running the `docker run` command--for example, to allow the current use to execute a script with `docker run`:
118 | 
119 | 	```bash
120 | 	chmod +x ./scripts/<yourscript.sh>
121 | 	```
122 | 
123 | > #### Grant permissions to mounted files
124 | >
125 | > By default, Docker runs containers using the user and group IDs of the user executing the `docker run` command. When files are bind-mounted into the container, Docker preserves the user and group ownership from the host system.
126 | 
127 | The image exports a number of variables into the environment before executing scripts. The following variables are available for you to use in your scripts:
128 | 
129 | -	`INFLUX_CONFIGS_PATH`: Path to the `influx` CLI connection configurations file written by `setup`/`upgrade`
130 | -	`INFLUX_HOST`: URL to the `influxd` instance running `setup`/`upgrade`
131 | -	`DOCKER_INFLUXDB_INIT_USER_ID`: ID of the initial admin user created by `setup`/`upgrade`
132 | -	`DOCKER_INFLUXDB_INIT_ORG_ID`: ID of the initial organization created by `setup`/`upgrade`
133 | -	`DOCKER_INFLUXDB_INIT_BUCKET_ID`: ID of the initial bucket created by `setup`/`upgrade`
134 | 
135 | For example, to grant an InfluxDB 1.x client *write* permission to your initial bucket, create a `$PWD/scripts/setup-v1.sh` file that contains the following:
136 | 
137 | ```bash
138 | #!/bin/bash
139 | set -e
140 | 
141 | influx v1 dbrp create \
142 |   --bucket-id ${DOCKER_INFLUXDB_INIT_BUCKET_ID} \
143 |   --db ${V1_DB_NAME} \
144 |   --rp ${V1_RP_NAME} \
145 |   --default \
146 |   --org ${DOCKER_INFLUXDB_INIT_ORG}
147 | 
148 | influx v1 auth create \
149 |   --username ${V1_AUTH_USERNAME} \
150 |   --password ${V1_AUTH_PASSWORD} \
151 |   --write-bucket ${DOCKER_INFLUXDB_INIT_BUCKET_ID} \
152 |   --org ${DOCKER_INFLUXDB_INIT_ORG}
153 | ```
154 | 
155 | Then, run the following command to start and set up InfluxDB using custom scripts:
156 | 
157 | ```bash
158 | docker run -p 8086:8086 \
159 |      -v "$PWD/data:/var/lib/influxdb2" \
160 |      -v "$PWD/config:/etc/influxdb2" \
161 |      -v "$PWD/scripts:/docker-entrypoint-initdb.d" \
162 |      -e DOCKER_INFLUXDB_INIT_MODE=setup \
163 |      -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \
164 |      -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \
165 |      -e DOCKER_INFLUXDB_INIT_ORG=my-org \
166 |      -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \
167 |      -e V1_DB_NAME=v1-db \
168 |      -e V1_RP_NAME=v1-rp \
169 |      -e V1_AUTH_USERNAME=v1-user \
170 |      -e V1_AUTH_PASSWORD=v1-password \
171 |      %%IMAGE%%:2
172 | ```
173 | 
174 | > #### Automated setup and upgrade ignored if already setup
175 | >
176 | > Automated `setup`, `upgrade`, and custom initialization scripts won't run if an existing `influxd.bolt` boltdb file from a previous setup is found in the configured data directory.
177 | >
178 | > This behavior allows for the InfluxDB container to reboot post-setup and avoid overwriting migrated data, `DB is already set up` errors, and errors from non-idempotent script commands.
179 | 
180 | ## Access InfluxDB v2 file system and ports
181 | 
182 | When starting an InfluxDB container, we recommend the following for easy access to your data, configurations, and InfluxDB v2 instance:
183 | 
184 | -	Publish the container's `8086` port to make the InfluxDB [UI](https://docs.influxdata.com/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/) accessible from the host system.
185 | -	Use Docker [Volumes](https://docs.docker.com/storage/volumes/) or [Bind mounts](https://docs.docker.com/storage/bind-mounts/) to persist InfluxDB [data and configuration directories](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) outside of containers.
186 | 
187 | ### Default file system and networking ports
188 | 
189 | For InfluxDB v2, the InfluxDB Docker Hub image uses the following default ports and file system paths:
190 | 
191 | -	TCP port `8086`: the default port for the InfluxDB [UI](https://docs.influxdata.com/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/). To specify a different port or address, use the [`http-bind-address` configuration option](https://docs.influxdata.com/influxdb/v2/reference/config-options/#http-bind-address).
192 | -	`/var/lib/influxdb2/`: the [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout)
193 | 
194 | 	-	`/engine/`: Default InfluxDB [Storage engine path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#engine-path)
195 | 	-	`influxd.bolt`: Default [Bolt path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#bolt-path)
196 | 	-	`influxd.sqlite`: Default [SQLite path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#sqlite-path)
197 | 
198 | -	`/etc/influxdb2`: the [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout)
199 | 
200 | 	-	`/etc/influxdb2/configs`: `influx` CLI connection configurations file
201 | 	-	`/etc/influxdb2/influx-configs`: `influx` CLI connection configurations file, *if you run setup from within the container*
202 | 	-	Optional: `/etc/influxdb2/config.[yml, json, toml]`: Your customized InfluxDB [configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/) file
203 | 
204 | ### Configure InfluxDB v2 in a container
205 | 
206 | To customize InfluxDB, specify [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options) in a configuration file, environment variables, or command line flags.
207 | 
208 | #### Use a configuration file
209 | 
210 | To customize and mount an InfluxDB configuration file, do the following:
211 | 
212 | 1.	If you haven't already, [set up InfluxDB](https://docs.influxdata.com/influxdb/v2/get-started/setup/) to initialize an API [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). You'll need the Operator token in the next step.
213 | 
214 | 2.	Run the `influx server-config` CLI command to output the current server configuration to a file in the mounted configuration directory--for example, enter the following command to use the container's `influx` CLI and default Operator token:
215 | 
216 | 	```bash
217 | 	docker exec -it influxdb2 influx server-config > "$PWD/config/config.yml"
218 | 	```
219 | 
220 | Replace `$PWD/config/` with the host directory that you mounted at the container's `/etc/influxdb2` InfluxDB configuration directory path.
221 | 
222 | 1.	Edit the `config.yml` file to customize [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options).
223 | 2.	Restart the container.
224 | 
225 | 	```bash
226 | 	docker restart influxdb2
227 | 	```
228 | 
229 | #### Use environment variables and command line flags
230 | 
231 | To override specific [configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options), use environment variables or command line flags.
232 | 
233 | -	Pass `INFLUXD_` environment variables to Docker to override the configuration file--for example:
234 | 
235 | 	```bash
236 | 	docker run -p 8086:8086 \
237 | 	-e INFLUXD_STORAGE_WAL_FSYNC_DELAY=15m \
238 | 	influxdb:2 
239 | 	```
240 | 
241 | -	Pass `influxd` command line flags to override environment variables and the configuration file--for example:
242 | 
243 | 	```bash
244 | 	docker run -p 8086:8086 \
245 | 	  %%IMAGE%%:2 --storage-wal-fsync-delay=15m
246 | 	```
247 | 
248 | To learn more, see [InfluxDB configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options).
249 | 
250 | ### Upgrading from InfluxDB 1.x
251 | 
252 | InfluxDB 2.x provides a [1.x-compatible API](https://docs.influxdata.com/influxdb/v2/reference/api/influxdb-1x/), but expects a different storage layout on disk. To account for these differences, the InfluxDB Docker Hub image provides an `upgrade` feature that migrates 1.x data and configuration to 2.x before starting the `influxd` server.
253 | 
254 | The automated upgrade process creates the following in the InfluxDB v2 container:
255 | 
256 | -	an initial admin user
257 | -	an initial organization
258 | -	an initial bucket
259 | -	InfluxDB v2 data files (the default path is `/var/lib/influxdb2`)
260 | -	InfluxDB v2 configuration files (the default path is `/etc/influxdb2`)
261 | 
262 | *Mount volumes at both paths to avoid losing data.*
263 | 
264 | To run the automated upgrade, specify the following when you start the container:
265 | 
266 | -	InfluxDB v2 initialization environment variables:
267 | 
268 | 	-	`DOCKER_INFLUXDB_INIT_MODE=upgrade`
269 | 	-	`DOCKER_INFLUXDB_INIT_USERNAME`: A name for the initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/)
270 | 	-	`DOCKER_INFLUXDB_INIT_PASSWORD`: A password for the initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/)
271 | 	-	`DOCKER_INFLUXDB_INIT_ORG`: A name for the initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/)
272 | 	-	`DOCKER_INFLUXDB_INIT_BUCKET`: A name for the initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/)
273 | 	-	Optional: `DOCKER_INFLUXDB_INIT_RETENTION`: A [duration](https://docs.influxdata.com/influxdb/v2/reference/glossary/#duration) for the bucket [retention period](https://docs.influxdata.com/influxdb/v2/reference/internals/data-retention/#bucket-retention-period). Default: `0` (infinite; doesn't delete data)
274 | 	-	Optional: `DOCKER_INFLUXDB_INIT_ADMIN_TOKEN`: A value to set for the [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). Default: generates a token.
275 | 
276 | -	1.x data and configuration paths:
277 | 
278 | 	-	A 1.x data volume, specified by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_DIR` environment variable or mounted at `/var/lib/influxdb`
279 | 	-	Optional: a 1.x custom configuration file, specified by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG` environment variable or mounted at `/etc/influxdb/influxdb.conf`
280 | 
281 | The upgrade process searches for mounted 1.x data and configuration paths in the following order of precedence:
282 | 
283 | 1.	A configuration file referenced by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG` environment variable
284 | 2.	A data directory referenced by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_DIR` environment variable
285 | 3.	A configuration file mounted at `/etc/influxdb/influxdb.conf`
286 | 4.	A data directory mounted at `/var/lib/influxdb`
287 | 
288 | > #### Automated setup and upgrade ignored if already setup
289 | >
290 | > Automated `setup`, `upgrade`, and custom initialization scripts won't run if an existing `influxd.bolt` boltdb file from a previous setup is found in the configured data directory.
291 | >
292 | > This behavior allows for the InfluxDB container to reboot post-setup and avoid overwriting migrated data, `DB is already set up` errors, and errors from non-idempotent script commands.
293 | 
294 | #### Upgrade InfluxDB 1.x: default data path and configuration
295 | 
296 | Assume you've been running a minimal InfluxDB 1.x deployment:
297 | 
298 | ```bash
299 | docker run -p 8086:8086 \
300 |     -v influxdb:/var/lib/influxdb \
301 |     %%IMAGE%%:1.8
302 | ```
303 | 
304 | To upgrade this deployment to InfluxDB 2.x, stop the running InfluxDB 1.x container, and then run the following command:
305 | 
306 | ```bash
307 | docker run -p 8086:8086 \
308 |     -v influxdb:/var/lib/influxdb \
309 |     -v influxdb2:/var/lib/influxdb2 \
310 |     -e DOCKER_INFLUXDB_INIT_MODE=upgrade \
311 |     -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \
312 |     -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \
313 |     -e DOCKER_INFLUXDB_INIT_ORG=my-org \
314 |     -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \
315 |     %%IMAGE%%:2
316 | ```
317 | 
318 | #### Upgrade InfluxDB 1.x: custom configuration
319 | 
320 | Assume you've been running an InfluxDB 1.x deployment with customized configuration (`/etc/influxdb/influxdb.conf`):
321 | 
322 | ```bash
323 | docker run -p 8086:8086 \
324 |     -v influxdb:/var/lib/influxdb \
325 |     -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf" \
326 |     %%IMAGE%%:1.8
327 | ```
328 | 
329 | To upgrade this deployment to InfluxDB 2.x, stop the running InfluxDB 1.x container, and then run the following command:
330 | 
331 | ```bash
332 | docker run -p 8086:8086 \
333 |     -v influxdb:/var/lib/influxdb \
334 |     -v influxdb2:/var/lib/influxdb2 \
335 |     -v influxdb2-config:/etc/influxdb2 \
336 |     -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf" \
337 |     -e DOCKER_INFLUXDB_INIT_MODE=upgrade \
338 |     -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \
339 |     -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \
340 |     -e DOCKER_INFLUXDB_INIT_ORG=my-org \
341 |     -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \
342 |     %%IMAGE%%:2
343 | ```
344 | 
345 | #### Upgrade InfluxDB 1.x: custom data and configuration paths
346 | 
347 | Assume you've been running an InfluxDB 1.x deployment with data and configuration mounted at custom paths:
348 | 
349 | ```bash
350 | docker run -p 8086:8086 \
351 |     -v influxdb:/root/influxdb/data \
352 |     -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \
353 |     %%IMAGE%%:1.8 -config /root/influxdb/influxdb.conf
354 | ```
355 | 
356 | Before you upgrade to InfluxDB v2, decide whether to keep using your custom paths or to use the InfluxDB v2 defaults.
357 | 
358 | To use InfluxDB v2 defaults, stop the running InfluxDB 1.x container, and then run the following command:
359 | 
360 | ```bash
361 | docker run -p 8086:8086 \
362 |     -v influxdb:/root/influxdb/data \
363 |     -v influxdb2:/var/lib/influxdb2 \
364 |     -v influxdb2-config:/etc/influxdb2 \
365 |     -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \
366 |     -e DOCKER_INFLUXDB_INIT_MODE=upgrade \
367 |     -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \
368 |     -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \
369 |     -e DOCKER_INFLUXDB_INIT_ORG=my-org \
370 |     -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \
371 |     -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \
372 |     %%IMAGE%%:2
373 | ```
374 | 
375 | To use your custom paths instead of InfluxDB v2 default paths, run the following command:
376 | 
377 | ```bash
378 | docker run -p 8086:8086 \
379 |     -v influxdb:/root/influxdb/data \
380 |     -v influxdb2:/root/influxdb2/data \
381 |     -v influxdb2-config:/etc/influxdb2 \
382 |     -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \
383 |     -e DOCKER_INFLUXDB_INIT_MODE=upgrade \
384 |     -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \
385 |     -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \
386 |     -e DOCKER_INFLUXDB_INIT_ORG=my-org \
387 |     -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \
388 |     -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \
389 |     -e DOCKER_INFLUXDB_CONFIG_PATH=/root/influxdb2/config.toml \
390 |     -e DOCKER_INFLUXDB_BOLT_PATH=/root/influxdb2/influxdb.bolt \
391 |     -e DOCKER_INFLUXDB_ENGINE_PATH=/root/influxdb2/engine \
392 |     %%IMAGE%%:2
393 | ```
394 | 
395 | To learn more about the upgrade process, see the [v1-to-v2 upgrade guide](https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/).
396 | 
397 | ### Upgrading from quay.io-hosted InfluxDB 2.x image
398 | 
399 | Early Docker builds of InfluxDB 2.x were hosted at `quay.io/influxdb/influxdb` and contained the `influx` and `influxd` binaries without any default configuration or helper scripts. By default, the `influxd` process stored data in `/root/.influxdbv2`.
400 | 
401 | Starting with `v2.0.4`, we restored the InfluxDB Docker Hub build, which defaults to storing data in `/var/lib/influxdb2`. If you upgrade directly from `quay.io/influxdb/influxdb` to `influxdb:2.0.4` using the default settings, InfluxDB won't be able to find your existing data files.
402 | 
403 | To avoid this problem when migrating from `quay.io/influxdb/influxdb` to `influxdb:2.0`, choose one of the following:
404 | 
405 | #### Update the mount to use the InfluxDB default
406 | 
407 | To use the InfluxDB Docker Hub data path, start a container that mounts your data volume into `/var/lib/influxdb2`--for example, if you used the following command to start the InfluxDB quay.io container:
408 | 
409 | ```bash
410 | # quay.io InfluxDB 2.x container 
411 | docker run -p 8086:8086 \
412 |     -v "$PWD:/root/.influxdbv2" \
413 |     quay.io/influxdb/influxdb:v2.0.3
414 | ```
415 | 
416 | Use this command to start an InfluxDB v2 Docker Hub container:
417 | 
418 | ```bash
419 | # Docker Hub InfluxDB 2.x container
420 | docker run -p 8086:8086 \
421 |     -v "$PWD:/var/lib/influxdb2" \
422 |     %%IMAGE%%:2
423 | ```
424 | 
425 | #### Configure InfluxDB to use the container home directory
426 | 
427 | To continue using the `/root/.influxdbv2` data path, customize storage path configuration options ([bolt-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#bolt-path), [engine-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#engine-path), [sqlite-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#sqlite-path)) configuration options for your InfluxDB Docker Hub container--for example, if you used the following command to start the InfluxDB quay.io container:
428 | 
429 | ```bash
430 | # quay.io-hosted InfluxDB 2.x
431 | docker run -p 8086:8086 \
432 |     -v "$PWD:/root/.influxdbv2" \
433 |     quay.io/influxdb/influxdb:v2.0.3
434 | ```
435 | 
436 | Use this command to start an InfluxDB v2 Docker Hub container:
437 | 
438 | ```bash
439 | docker run -p 8086:8086 \
440 |     -e INFLUXD_BOLT_PATH=/root/.influxdbv2/influxd.bolt \
441 |     -e INFLUXD_ENGINE_PATH=/root/.influxdbv2/engine \
442 |     -v "$PWD:/root/.influxdbv2" \
443 |     %%IMAGE%%:2
444 | ```
445 | 
446 | # How to use this image for InfluxDB v1
447 | 
448 | Use the InfluxDB Docker Hub image to run and set up an [InfluxDB 1.x](https://docs.influxdata.com/influxdb/v1/) container.
449 | 
450 | ## Running the container
451 | 
452 | To start an InfluxDB 1.x container, enter the following command:
453 | 
454 | ```bash
455 | docker run -p 8086:8086 \
456 |     -v "$PWD:/var/lib/influxdb" \
457 |     %%IMAGE%%:1.8
458 | ```
459 | 
460 | The command passes the following arguments:
461 | 
462 | -	`-p 8086:8086`: Exposes the InfluxDB [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/) on host port `8086`.
463 | -	`-v $PWD:/var/lib/influxdb`: Mounts the host's `$PWD` directory to the [InfluxDB data directory](https://docs.influxdata.com/influxdb/v1/concepts/file-system-layout/) to persist data outside the container.
464 | 
465 | Replace `$PWD` with the host directory where you want InfluxDB to store data.
466 | 
467 | *Use Docker [Volumes](https://docs.docker.com/storage/volumes/) or [Bind mounts](https://docs.docker.com/storage/bind-mounts/) to persist InfluxDB [data and configuration directories](https://docs.influxdata.com/influxdb/v1/concepts/file-system-layout/).*
468 | 
469 | ## Networking ports
470 | 
471 | InfluxDB uses the following networking ports:
472 | 
473 | -	TCP port `8086`: the default port for the [HTTP API](https://docs.influxdata.com/influxdb/v1/tools/api/)
474 | -	TCP port `2003`: the port for the Graphite protocol (if enabled)
475 | 
476 | Using the `docker run` [`-P, --publish-all` flag](https://docs.docker.com/reference/cli/docker/container/run/#publish-all) exposes the InfluxDB HTTP API to the host.
477 | 
478 | ## Configure InfluxDB v1 in a container
479 | 
480 | To configure InfluxDB v1 in a container, use a configuration file or environment variables.
481 | 
482 | ### Use a configuration file
483 | 
484 | To customize and mount a configuration file, do the following:
485 | 
486 | 1.	Output the current server configuration to a file in the mounted configuration directory--for example:
487 | 
488 | 	```bash
489 | 	docker run --rm %%IMAGE%%:1.8 influxd config > influxdb.conf
490 | 	```
491 | 
492 | 2.	Edit the `influxdb.conf` file to customize [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options).
493 | 
494 | 	```bash
495 | 	docker run -p 8086:8086 \
496 | 	  -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro" \
497 | 	  %%IMAGE%%:1.8 -config /etc/influxdb/influxdb.conf
498 | 	```
499 | 
500 | 	Replace `$PWD` with the host directory where you want to store the configuration file.
501 | 
502 | ### Use environment variables
503 | 
504 | Pass [`INFLUXDB_` environment variables](https://docs.influxdata.com/influxdb/v1/administration/config/#environment-variables) to override specific InfluxDB v1 configuration options. An environment variable overrides the equivalent option in the configuration file.
505 | 
506 | ```bash
507 | docker run -p 8086:8086 \
508 |     -e INFLUXDB_REPORTING_DISABLED=true \
509 |     -e INFLUXDB_META_DIR=/path/to/metadir \
510 |     -e INFLUXDB_DATA_QUERY_LOG_ENABLED=false \
511 |     %%IMAGE%%:1.8
512 | ```
513 | 
514 | Learn more about [configuring InfluxDB v1](https://docs.influxdata.com/influxdb/v1.8/administration/config/).
515 | 
516 | ## Graphite
517 | 
518 | InfluxDB supports the Graphite line protocol, but the service and ports are not exposed by default. To run InfluxDB with Graphite support enabled, you can either use a configuration file or set the appropriate environment variables. Run InfluxDB with the default Graphite configuration:
519 | 
520 | ```bash
521 | docker run -p 8086:8086 -p 2003:2003 \
522 |     -e INFLUXDB_GRAPHITE_ENABLED=true \
523 |     %%IMAGE%%:1.8
524 | ```
525 | 
526 | See the [README on GitHub](https://github.com/influxdata/influxdb/blob/master/services/graphite/README.md) for more detailed documentation to set up the Graphite service. In order to take advantage of graphite templates, you should use a configuration file by outputting a default configuration file using the steps above and modifying the `[[graphite]]` section.
527 | 
528 | ## InfluxDB v1 HTTP API
529 | 
530 | Creating a DB named mydb:
531 | 
532 | ```bash
533 | curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb"
534 | ```
535 | 
536 | Inserting into the DB:
537 | 
538 | ```bash
539 | curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
540 | ```
541 | 
542 | Read more about this in the [official documentation](https://docs.influxdata.com/influxdb/latest/guides/writing_data/).
543 | 
544 | ## CLI / SHELL
545 | 
546 | Start the container:
547 | 
548 | ```bash
549 | docker run --name=influxdb -d -p 8086:8086 %%IMAGE%%:1.8
550 | ```
551 | 
552 | Run the influx client in this container:
553 | 
554 | ```bash
555 | docker exec -it influxdb influx
556 | ```
557 | 
558 | Or run the influx client in a separate container:
559 | 
560 | ```bash
561 | docker run --rm --link=influxdb -it %%IMAGE%%:1.8 influx -host influxdb
562 | ```
563 | 
564 | ## InfluxDB v1 database initialization
565 | 
566 | ### Not recommended for production
567 | 
568 | We **don't** recommend using initialization options for InfluxDB v1 production scenarios, but they're useful when running standalone instances for testing.
569 | 
570 | The InfluxDB Docker Hub image lets you set initialization options when creating an InfluxDB v1 container.
571 | 
572 | The database initialization script is only called when running `influxd`; it isn't executed by any other program.
573 | 
574 | ### Environment variables
575 | 
576 | During the InfluxDB v1 set up process, the InfluxDB image uses environment variables to automatically configure some server options. You can override the following environment variables to customize set up options.
577 | 
578 | #### INFLUXDB_DB
579 | 
580 | Automatically initializes a database with the name of this environment variable.
581 | 
582 | #### INFLUXDB_HTTP_AUTH_ENABLED
583 | 
584 | Enables authentication. Either this must be set or `auth-enabled = true` must be set within the configuration file for any authentication-related options below to work.
585 | 
586 | #### INFLUXDB_ADMIN_USER
587 | 
588 | The name of the admin user to be created. If this is unset, no admin user is created.
589 | 
590 | #### INFLUXDB_ADMIN_PASSWORD
591 | 
592 | The password for the admin user configured with `INFLUXDB_ADMIN_USER`. If this is unset, a random password is generated and printed to standard out.
593 | 
594 | #### INFLUXDB_USER
595 | 
596 | The name of a user to be created with no privileges. If `INFLUXDB_DB` is set, this user will be granted read and write permissions for that database.
597 | 
598 | #### INFLUXDB_USER_PASSWORD
599 | 
600 | The password for the user configured with `INFLUXDB_USER`. If this is unset, a random password is generated and printed to standard out.
601 | 
602 | #### INFLUXDB_READ_USER
603 | 
604 | The name of a user to be created with read privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions.
605 | 
606 | #### INFLUXDB_READ_USER_PASSWORD
607 | 
608 | The password for the user configured with `INFLUXDB_READ_USER`. If this is unset, a random password is generated and printed to standard out.
609 | 
610 | #### INFLUXDB_WRITE_USER
611 | 
612 | The name of a user to be created with write privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions.
613 | 
614 | #### INFLUXDB_WRITE_USER_PASSWORD
615 | 
616 | The password for the user configured with `INFLUXDB_WRITE_USER`. If this is unset, a random password is generated and printed to standard out.
617 | 
618 | ### Initialization Files
619 | 
620 | If the Docker image finds any files with the extensions `.sh` or `.iql` inside of the `/docker-entrypoint-initdb.d` folder, it will execute them. The order they are executed in is determined by the shell. This is usually alphabetical order.
621 | 
622 | ### Manually Initialize InfluxDB v1
623 | 
624 | To manually initialize an InfluxDB v1 database, use `docker run` to call the `/init-influxdb.sh` script directly. The script takes the same initialization options as the `influxd run` command--for example:
625 | 
626 | ```bash
627 | docker run --rm \
628 |     -e INFLUXDB_DB=db0 \
629 |     -e INFLUXDB_ADMIN_USER=admin \
630 |     -e INFLUXDB_ADMIN_PASSWORD=supersecretpassword \
631 |     -e INFLUXDB_USER=telegraf -e \
632 |     -e INFLUXDB_USER_PASSWORD=secretpassword \
633 |     -v "$PWD:/var/lib/influxdb" \
634 |     %%IMAGE%%:1.8 /init-influxdb.sh
635 | ```
636 | 
637 | The command creates the following:
638 | 
639 | -	a database named `db0`
640 | -	an admin user `admin` with the password `supersecretpassword`
641 | -	a `telegraf` user with the password `secretpassword`
642 | 
643 | The `--rm` flag causes Docker to exit and delete the container after the script runs. The data and configuration files created during initialization remain in the mounted volume (the host's `$PWD` directory).
644 | 
```
Page 24/25FirstPrevNextLast