Skip to content

skylab-kulubu/skycloud

Repository files navigation

Skycloud

Nextcloud

Gerekli ayarları yapmak için .env dosyasını oluşturmalısınız. Örnek bir nextcloud/.env dosyası

MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud
MYSQL_PASSWORD=nextcloud
MYSQL_HOST=db
NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.skylab.com cloud.skylab.com
NEXTCLOUD_ADMIN_USER=nextcloud
NEXTCLOUD_ADMIN_PASSWORD=nextcloud

Dosya Yükleme Boyutu Sınırı

./nextcloud/web/nginx.conf 62. satırdaki client_max_body_size değişkenini düzenleyerek dosya yükleme boyutun ayarlayabilirisiniz.

Nextcloud hakkında daha fazla ortam değişkeni için

MySQL

Gerekli ayarları yapmak için .env dosyasını oluşturmalısınız. Örnek bir mysql/.env dosyası

MARIADB_ROOT_PASSWORD=nextcloud
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud
MYSQL_PASSWORD=nextcloud

MySQL hakkında daha fazla ortam değişken için

Nginx

  • HTTPS eklenecek HTTPS kullanımı için gencert scriptini çalıştırarak sertifikaları certs klasörüne eklemelisiniz.

Bunun için aşağıdaki komutu gencert klasörünün içerisinde çalıştırmanız yeterli olacaktır.

❯ yes NA | bash ../gencert
  • SSL Sertifika otomasyonu eklenecek

Not: bunun için openssl paketinin sisteminizde kurulu olması gereklidir.

Canlıya Almadan Önce!

nginx/nginx.conf dosyasındaki skylab değerlerini alan adı ile değiştirin!

Kurulum

Sisteminizde Docker kurulu olmalı, eğer önceden Docker kurulu bir sisteminiz varsa ve sisteminizin paket yöneticisi aracılığıyla indirmişseniz Dockerı sisteminizden öncelikle silin ve aşağıdaki adımları izleyerek sisteminize Docker yükleyin. Ubuntu

for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; \
do sudo apt-get remove $pkg; \
done

RHEL/Fedora

sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine \
                  podman \
                  runc

ardından Docker yüklemek için

curl -fsSL https://get.docker.com -o get-docker.sh && sudo bash get-docker.sh

Docker kurulumu gerçekleştikten sonra

git clone https://github.com/farukerdem34/homeserver.git
cd homeserver
docker compose up -d

NextCloud uygulamasına erişim sağladıktan sonra nextcloud klasörünün içerisinde bulunan set_configuration.sh dosyasını aşağıdaki komut ile çalıştırın.

bash nextcloud/set_configuration.sh

Kurulum Scripti

❯ ./setup -h
usage: setup [-h] {server,config,backup} ...

Homeserver setup util

positional arguments:
  {server,config,backup}

options:
  -h, --help            show this help message and exit
❯ ./setup server -h
usage: setup server [-h] [-r] [--install-docker] [--hard-installation] 

options:
  -h, --help           show this help message and exit
  -r, --run-server     Start server
  --install-docker     Install docker engine.
  --hard-installation  Remove docker engine before installation. Only RHEL&Debian based distros!
❯ ./setup config -h
usage: setup config [-h] [-c] [--pass-certificate-arguments] [--default-env-files] [-d DOMAIN] [--upload-size UPLOAD_SIZE] [--nextcloud-subdomain NEXTCLOUD_SUBDOMAIN] [-p] 

options:
  -h, --help            show this help message and exit
  -c, --generate-certificates
                        Set this value if you want SSL certificates to be generated, set it to 'False' or leave it blank if you want to use test certificates.
  --pass-certificate-arguments
  --default-env-files   Set to 'True' if you want .env files to be created using standard instance files.
  -d DOMAIN, --domain DOMAIN
                        Set Nginx nameserver
  --upload-size UPLOAD_SIZE
                        File upload size limit, 0 is unlimited. Example: 16G, 100M.
  --nextcloud-subdomain NEXTCLOUD_SUBDOMAIN
                        nextcloud.example.com --> replaces nextcloud to any subdomain string
  -p, --pull-images     Pull docker images after configuration.
❯ ./setup backup -h
usage: setup backup [-h] [-a] [-n] [-s] [-g] [-of] [--dest DEST]

options:
  -h, --help          show this help message and exit
  -a, --all
  -n, --nextcloud
  -s, --stirling-pdf
  -of, --only-office
  --dest DEST         backup destination

Hızlı başlangıç için;

./setup config -c --pass-certificate-arguments --default-env-files
./setup server -r

Kurulum Sonrası

Nextcloud içerisinde Forms ve ONLYOFFICE kullanımını aktifleştirmek için Nextcloud'a giriş yaptıktan sonra aşağıdaki komutu çalıştırın.

bash nextcloud/set_configuration.sh

Bilgisayarınız Test İçin Çalıştırmak İçin

Yerel bilgisayarınızda Linux veya MacOs ise /etc/hosts, Windows ise C:\Windows\System32\drivers\etc\hosts dosyasını aşağıdak gibi düzenleyin.

# Loopback entries; do not change.
# For historical reasons, localhost precedes localhost.localdomain:
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
# See hosts(5) for proper format and other examples:
# 192.168.1.10 foo.example.org foo
# 192.168.1.13 bar.example.org bar
#

#192.168.122.51 nextcloud.skylab.com blog.skylab.com stirling-pdf.skylab.com git.skylab.com 
127.0.0.1  nextcloud.skylab.com stirling-pdf.skylab.com