Here is a quick and dirty nextcloud docker-compose - Lemmy.zip
lemmy.zip
external-link
services: db: image: mariadb restart: always command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW volumes: - ./mysql:/var/lib/mysql environment: - MYSQL_PASSWORD=supersecretpassword - MYSQL_DATABASE=nextclouddb - MYSQL_USER=nextclouduser - MYSQL_RANDOM_ROOT_PASSWORD='yes' redis: image: redis restart: always command: redis-server --requirepass supersecretpassword2 app: image: nextcloud:27 restart: always ports: - 8080:80 links: - db - redis volumes: - ./html:/var/www/html environment: - MYSQL_PASSWORD=supersecretpassword - MYSQL_DATABASE=nextclouddb - MYSQL_USER=nextclouduser - MYSQL_HOST=db - REDIS_HOST_PASSWORD=supersecretpassword2 depends_on: - db - redis cron: image: nextcloud:27 restart: always volumes: - ./html:/var/www/html entrypoint: /cron.sh depends_on: - db To use this you need docker-compose installed. Once thats installed create a nextcloud folder and copy in this file as docker-compose.yaml. Once you are in the working directory run docker-compose up -d

Thank you. Maybe it could be improved by externalizing user credentials with docker secrets: https://docs.docker.com/compose/use-secrets/

I know it was meant quick and dirty. Just for anybody who uses the script as an approach for their self-hosting solution.

Was just struggling through this last weekend, thanks! Formatting is a little rough though, could you pastebin it?

Possibly linux
creator
link
fedilink
5
edit-2
8M
services:
  db:
    image: mariadb
    restart: always
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
    volumes:
      - ./mysql:/var/lib/mysql
    environment:
      - MYSQL_PASSWORD=supersecretpassword
      - MYSQL_DATABASE=nextclouddb
      - MYSQL_USER=nextclouduser
      - MYSQL_RANDOM_ROOT_PASSWORD='yes'

  redis:

    image: redis

    restart: always

    command: redis-server --requirepass supersecretpassword2

  app:
    image: nextcloud:27
    restart: always
    ports:
      - 8080:80
    links:
      - db
      - redis
    volumes:
      - ./html:/var/www/html
    environment:
      - MYSQL_PASSWORD=supersecretpassword
      - MYSQL_DATABASE=nextclouddb
      - MYSQL_USER=nextclouduser
      - MYSQL_HOST=db
      - REDIS_HOST_PASSWORD=supersecretpassword2
    depends_on:
      - db
      - redis
  cron:
    image: nextcloud:27
    restart: always
    volumes:
      - ./html:/var/www/html
    entrypoint: /cron.sh
    depends_on:
      - db

Is this better?

I still can link to paste bin if it isnt’t

Thx, will try yours next. I always experiment with some combinations, my preferred never worked. But yours looks closest to it. I always want proxy’s out of the compose file but I would prefer postgresql over mariadb

Possibly linux
creator
link
fedilink
18M

I read somewhere that Maria db is faster. I could be wrong though

Much, thanks!

hm i never used redis for Netxcloud.

Scott
link
fedilink
58M

Probably should, it significantly decreased load times in my testing.

Create a post

A place to discuss privacy and freedom in the digital world.

Privacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy.

In this community everyone is welcome to post links and discuss topics related to privacy.

Some Rules

  • Posting a link to a website containing tracking isn’t great, if contents of the website are behind a paywall maybe copy them into the post
  • Don’t promote proprietary software
  • Try to keep things on topic
  • If you have a question, please try searching for previous discussions, maybe it has already been answered
  • Reposts are fine, but should have at least a couple of weeks in between so that the post can reach a new audience
  • Be nice :)

Related communities

Chat rooms

much thanks to @gary_host_laptop for the logo design :)

  • 0 users online
  • 84 users / day
  • 537 users / week
  • 1.5K users / month
  • 6.58K users / 6 months
  • 1 subscriber
  • 2.3K Posts
  • 53.2K Comments
  • Modlog