Here is a quick and dirty nextcloud docker-compose


<span style="color:#323232;">services:
</span><span style="color:#323232;">  db:
</span><span style="color:#323232;">    image: mariadb
</span><span style="color:#323232;">    restart: always
</span><span style="color:#323232;">    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      - ./mysql:/var/lib/mysql
</span><span style="color:#323232;">    environment:
</span><span style="color:#323232;">      - MYSQL_PASSWORD=supersecretpassword
</span><span style="color:#323232;">      - MYSQL_DATABASE=nextclouddb
</span><span style="color:#323232;">      - MYSQL_USER=nextclouduser
</span><span style="color:#323232;">      - MYSQL_RANDOM_ROOT_PASSWORD='yes'
</span><span style="color:#323232;">
</span><span style="color:#323232;">  redis:
</span><span style="color:#323232;">
</span><span style="color:#323232;">    image: redis
</span><span style="color:#323232;">
</span><span style="color:#323232;">    restart: always
</span><span style="color:#323232;">
</span><span style="color:#323232;">    command: redis-server --requirepass supersecretpassword2
</span><span style="color:#323232;">
</span><span style="color:#323232;">  app:
</span><span style="color:#323232;">    image: nextcloud:27
</span><span style="color:#323232;">    restart: always
</span><span style="color:#323232;">    ports:
</span><span style="color:#323232;">      - 8080:80
</span><span style="color:#323232;">    links:
</span><span style="color:#323232;">      - db
</span><span style="color:#323232;">      - redis
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      - ./html:/var/www/html
</span><span style="color:#323232;">    environment:
</span><span style="color:#323232;">      - MYSQL_PASSWORD=supersecretpassword
</span><span style="color:#323232;">      - MYSQL_DATABASE=nextclouddb
</span><span style="color:#323232;">      - MYSQL_USER=nextclouduser
</span><span style="color:#323232;">      - MYSQL_HOST=db
</span><span style="color:#323232;">      - REDIS_HOST_PASSWORD=supersecretpassword2
</span><span style="color:#323232;">    depends_on:
</span><span style="color:#323232;">      - db
</span><span style="color:#323232;">      - redis
</span><span style="color:#323232;">  cron:
</span><span style="color:#323232;">    image: nextcloud:27
</span><span style="color:#323232;">    restart: always
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      - ./html:/var/www/html
</span><span style="color:#323232;">    entrypoint: /cron.sh
</span><span style="color:#323232;">    depends_on:
</span><span style="color:#323232;">      - db
</span>

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

cron,

This guide does not include the setup of a secure connection, e.g. with traefic and letsencrypt. This is recommended when the nextcloud instance is reachable from the internet.

Ddhuud,

The title says quick and dirty. Besides, you can always keep this kind of thing behind some Nginx proxy like nginx-proxy-manager (and probably should)

possiblylinux127,

That was deliberate. You need to take more security precautions when exposing it to the internet. Firewalls and least privlage are a must

  • All
  • Subscribed
  • Moderated
  • Favorites
  • nextcloud@discuss.tchncs.de
  • ngwrru68w68
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • Youngstown
  • everett
  • slotface
  • rosin
  • osvaldo12
  • mdbf
  • kavyap
  • cubers
  • megavids
  • modclub
  • normalnudes
  • tester
  • khanakhh
  • Durango
  • ethstaker
  • tacticalgear
  • Leos
  • provamag3
  • anitta
  • cisconetworking
  • JUstTest
  • lostlight
  • All magazines