Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

2.2 KB
Raw Blame
id: nextcloud
name: Nextcloud
version: "28.0"
description: Self-hosted productivity platform with file sync and collaboration
icon: https://serverkit.ai/imgs/template-icons/nextcloud.svg
categories:
  - storage
  - collaboration
  - productivity
website: https://nextcloud.com
documentation: https://docs.nextcloud.com

variables:
  - name: HTTP_PORT
    type: port
    default: "8080"
    hidden: true
    description: Port to expose Nextcloud
    hidden: true
  - name: ADMIN_USER
    type: string
    default: admin
    description: Admin username
  - name: ADMIN_PASSWORD
    type: password
    length: 16
    description: Admin password (auto-generated if empty)
  - name: DB_PASSWORD
    type: password
    length: 24
    description: Database password
    hidden: true
  - name: REDIS_PASSWORD
    type: password
    length: 16
    description: Redis password
    hidden: true

compose:
  services:
    app:
      image: nextcloud:28-apache
      container_name: ${APP_NAME}
      restart: unless-stopped
      ports:
        - "${HTTP_PORT}:80"
      environment:
        POSTGRES_HOST: nextcloud-db
        POSTGRES_DB: nextcloud
        POSTGRES_USER: nextcloud
        POSTGRES_PASSWORD: "${DB_PASSWORD}"
        NEXTCLOUD_ADMIN_USER: "${ADMIN_USER}"
        NEXTCLOUD_ADMIN_PASSWORD: "${ADMIN_PASSWORD}"
        REDIS_HOST: nextcloud-redis
        REDIS_HOST_PASSWORD: "${REDIS_PASSWORD}"
      volumes:
        - nextcloud-data:/var/www/html
      depends_on:
        - nextcloud-db
        - nextcloud-redis

    nextcloud-db:
      image: postgres:15-alpine
      container_name: ${APP_NAME}-db
      restart: unless-stopped
      environment:
        POSTGRES_USER: nextcloud
        POSTGRES_PASSWORD: "${DB_PASSWORD}"
        POSTGRES_DB: nextcloud
      volumes:
        - nextcloud-db-data:/var/lib/postgresql/data

    nextcloud-redis:
      image: redis:alpine
      container_name: ${APP_NAME}-redis
      restart: unless-stopped
      command: redis-server --requirepass "${REDIS_PASSWORD}"
      volumes:
        - nextcloud-redis-data:/data

  volumes:
    nextcloud-data:
    nextcloud-db-data:
    nextcloud-redis-data:

ports:
  - port: "${HTTP_PORT}"
    protocol: http
    description: Web Interface

requirements:
  memory: 1GB
  storage: 10GB