Sign inSign up

cozy/cozy-stack

By cozy

•Updated about 1 hour ago

Production image to self host cozy-stack in a docker environment

Image
1

10K+

cozy/cozy-stack repository overview

⁠About Cozy and cozy-stack

Cozy Logo

Cozy⁠ is a platform that brings all your web services in the same private space. With it, your web apps and your devices can share data easily, providing you with a new experience. You can install Cozy on your own hardware where no one profiles you.

Cozy-stack is the core server of the Cozy platform. It consists of a single process, the Cozy stack.

Full Cozy-Stack documentation here⁠.

⁠Variables

The following variables can be used to customize the image:

  • COUCHDB_PROTOCOL: protocol used to access couchdb (http or https). defaults to http
  • COUCHDB_HOST: CouchDB Host (defaults to couchdb)
  • COUCHDB_PORT: CouchDB Port to use (defaults to 5984)
  • COUCHDB_USER: CouchDB User (defaults to cozy)
  • COUCHDB_PASSWORD: CouchDB password (defaults to cozy)
  • COZY_ADMIN_PASSPHRASE: The admin passphrase. If unset, a random password will be used and echoed in container logs
  • START_EMBEDDED_POSTFIX: Set it to "true" to start a out-only smtp postfix relay. Not started by default.
  • LOCAL_USER_ID: UID of the user running cozy-stack (defaults to 3552)
  • LOCAL_GROUP_ID: GID of the user running cozy-stack (defaults to 3552)
  • All variables that can be used to configure cozy-stack. Usually they are the command line options in upper case prefixed by COZY_ (and dashes replaced with underscores). Refer to our documentation⁠

⁠Running the cozy-stack production image

Create a docker network and start couchdb attached to it

docker network create cozy-stack

docker run --rm -d \
    --name cozy-stack-couchdb \
    --network cozy-stack \
    -e COUCHDB_USER=admin \
    -e COUCHDB_PASSWORD=password \
    -v ./volumes/cozy-stack/couchdb:/opt/couchdb/data \
    couchdb:latest

Then stack cozy-stack

docker run --rm \
    --name cozy-stack \
    --network cozy-stack \
    -p 8080:8080 \
    -p 6060:6060 \
    -e COUCHDB_HOST=cozy-stack-couchdb \
    -e COUCHDB_USER=admin \
    -e COUCHDB_PASSWORD=password \
    -e COZY_HOST=127.0.0.1 \
    -e COZY_ADMIN_HOST=127.0.0.1 \
    -e COZY_COUCHDB_URL=http://admin:password@cozy-stack-couchdb:5984 \
    -e COZY_FS_URL=file:///var/lib/cozy \
    -v ./volumes/cozy-stack/data:/var/lib/cozy \
    -v ./volumes/cozy-stack/config:/etc/cozy/ \
    cozy/cozy-stack:latest

you can configure the stack by adding a cozy.yml file in your cozy-stack/config volume (and remove the COZY_* variables).

⁠Building the image

simply execute the following command from the cozy-stack repo root

docker build -t "cozy/cozy-stack:latest"  -f scripts/docker/production/Dockerfile .

Tag summary

Content type

Image

Digest

sha256:bad20a958…

Size

217.3 MB

Last updated

about 1 hour ago

docker pull cozy/cozy-stack