Nextcloud 설치 · 7 min read · Nov 26, 2025
Debian 10에 NextCloud 설치하는 방법

NextCloud는 ownCloud 프로젝트에서 포크된 무료 오픈 소스 파일 호스팅 및 파일 공유 서버입니다. Google Drive, Dropbox 및 iCloud와 같은 다른 파일 공유 서비스와 매우 유사합니다. NextCloud를 사용하면 중앙 위치에서 파일, 문서, 사진, 영화 및 비디오를 저장할 수 있습니다. NextCloud를 사용하면 친구 및 클라이언트와 파일, 연락처 및 기타 미디어를 공유할 수 있습니다. NextCloud는 메일, 캘린더, 연락처 및 팀이 작업을 더 빠르고 쉽게 완료하는 데 도움이 되는 기타 기능과 통합됩니다. 데스크탑 머신에 NextCloud 클라이언트를 설치하여 Nextcloud 서버와 파일을 동기화할 수 있습니다. 데스크탑 클라이언트는 Windows, macOS, FreeBSD 및 Linux를 포함한 대부분의 운영 체제에서 사용할 수 있습니다.
이 튜토리얼에서는 Debian 10에 NextCloud를 설치하고 Let’s Encrypt SSL로 보안을 설정하는 방법을 설명합니다.
전제 조건
- Debian 10을 실행하는 서버.
- 서버 IP를 가리키는 유효한 도메인 이름. 이 튜토리얼에서는 nextcloud.example.com 도메인을 사용할 것입니다.
- 서버에 구성된 루트 비밀번호.
Apache, MariaDB 및 PHP 설치
NextCloud는 PHP로 작성된 웹 서버에서 실행되며 데이터를 저장하기 위해 MariaDB를 사용합니다. 따라서 시스템에 Apache, MariaDB, PHP 및 기타 필요한 패키지를 설치해야 합니다. 다음 명령을 실행하여 모두 설치할 수 있습니다:
apt-get install apache2 libapache2-mod-php mariadb-server php-xml php-cli php-cgi php-mysql php-mbstring php-gd php-curl php-zip wget unzip -y모든 패키지가 설치되면 php.ini 파일을 열고 몇 가지 권장 설정을 조정합니다:
nano /etc/php/7.3/apache2/php.ini다음 설정을 변경합니다:
memory_limit = 512M
upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 300
date.timezone = Asia/Kolkata작업이 끝나면 파일을 저장하고 닫습니다. 그런 다음 다음 명령을 사용하여 Apache 및 MariaDB 서비스를 시작하고 시스템 재부팅 후 시작하도록 활성화합니다:
systemctl start apache2
systemctl start mariadb
systemctl enable apache2
systemctl enable mariadb작업이 완료되면 다음 단계로 진행할 수 있습니다.
NextCloud용 데이터베이스 구성
다음으로 NextCloud용 데이터베이스와 데이터베이스 사용자를 생성해야 합니다. 이를 위해 다음 명령을 사용하여 MariaDB 셸에 로그인합니다:
mysql -u root -p요청 시 루트 비밀번호를 제공한 다음 다음 명령을 사용하여 데이터베이스와 사용자를 생성합니다:
MariaDB [(none)]> CREATE DATABASE nextclouddb;
MariaDB [(none)]> CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'password';다음으로 다음 명령을 사용하여 nextclouddb에 모든 권한을 부여합니다:
MariaDB [(none)]> GRANT ALL ON nextclouddb.* TO 'nextclouduser'@'localhost';다음으로 권한을 플러시하고 다음 명령을 사용하여 MariaDB 셸에서 종료합니다:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;작업이 완료되면 다음 단계로 진행할 수 있습니다.
NextCloud 다운로드
먼저 NextCloud 다운로드 페이지를 방문하여 시스템에 최신 버전의 NextCloud를 다운로드합니다. 이 기사를 작성할 당시 NextCloud의 최신 버전은 17.0.1입니다. 다음 명령을 사용하여 다운로드할 수 있습니다:
wget https://download.nextcloud.com/server/releases/nextcloud-17.0.1.zip다운로드가 완료되면 다음 명령을 사용하여 다운로드한 파일의 압축을 풉니다:
unzip nextcloud-17.0.1.zip다음으로 추출된 디렉토리를 Apache 웹 루트 디렉토리로 이동합니다:
mv nextcloud /var/www/html/다음으로 다음 명령을 사용하여 nextcloud 디렉토리에 적절한 권한을 부여합니다:
chown -R www-data:www-data /var/www/html/nextcloud/
chmod -R 755 /var/www/html/nextcloud/작업이 완료되면 다음 단계로 진행할 수 있습니다.
NextCloud용 Apache 구성
다음으로 NextCloud를 제공하기 위해 Apache 가상 호스트 구성 파일을 생성해야 합니다. 다음 명령을 사용하여 생성할 수 있습니다:
nano /etc/apache2/sites-available/nextcloud.conf다음 줄을 추가합니다:
ServerAdmin [email protected]
DocumentRoot /var/www/html/nextcloud/
ServerName nextcloud.example.com
Alias /nextcloud "/var/www/html/nextcloud/"
Options +FollowSymlinks
AllowOverride All
Require all granted
Dav off
SetEnv HOME /var/www/html/nextcloud
SetEnv HTTP_HOME /var/www/html/nextcloud
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
작업이 완료되면 파일을 저장하고 닫습니다. 그런 다음 다음 명령을 사용하여 Apache 가상 호스트 파일과 기타 필요한 모듈을 활성화합니다:
a2ensite nextcloud.conf
a2enmod rewrite
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime마지막으로 다음 명령을 사용하여 Apache 서비스를 재시작하여 새 구성을 적용합니다:
systemctl restart apache2Let’s Encrypt 무료 SSL로 NextCloud 보안 설정
이제 NextCloud가 설치되고 구성되었습니다. 다음으로 Let’s Encrypt 무료 SSL로 보안을 설정하는 것이 좋습니다. 이를 위해 먼저 다음 명령을 사용하여 Certbot 클라이언트를 설치합니다:
apt-get install python-certbot-apache -y설치가 완료되면 다음 명령을 실행하여 도메인 nextcloud.example.com에 대한 Let’s Encrypt 인증서를 설치할 수 있습니다.
certbot --apache -d nextcloud.example.com설치 중에 이메일 주소를 제공하고 서비스 약관에 동의하라는 메시지가 표시됩니다:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for nextcloud.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/nextcloud-le-ssl.conf
Deploying Certificate to VirtualHost /etc/apache2/sites-available/nextcloud-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/nextcloud-le-ssl.conf
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2다음으로 2를 입력하고 Enter 키를 눌러 도메인에 대한 무료 SSL 인증서를 다운로드하고 설치합니다. 설치가 성공적으로 완료되면 다음과 같은 출력이 표시됩니다:
Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/nextcloud.conf to ssl vhost in /etc/apache2/sites-available/
nextcloud-le-ssl.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://nextcloud.example.com
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=nextcloud.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/example.com/privkey.pem
Your cert will expire on 2019-10-22. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
작업이 완료되면 다음 단계로 진행할 수 있습니다.
NextCloud 웹 인터페이스에 접근
이제 NextCloud가 Let’s Encrypt SSL로 구성되고 보안이 설정되었습니다. 다음으로 웹 브라우저를 열고 URL https://nextcloud.example.com을 입력합니다. 다음 페이지로 리디렉션됩니다:


이제 관리자 사용자 이름과 비밀번호, 데이터 폴더, 올바른 데이터베이스 자격 증명을 제공하고 설정 완료 버튼을 클릭합니다. 다음 페이지에서 NextCloud 대시보드로 리디렉션됩니다:

이것으로 마무리됩니다.
결론
축하합니다! Debian 10에 NextCloud를 성공적으로 설치하고 Let’s Encrypt 무료 SSL로 보안을 설정했습니다. 이제 NextCloud 웹 인터페이스를 사용하여 다른 사용자와 파일, 문서 및 미디어를 쉽게 공유할 수 있습니다.
새 게시물을 받은 편지함에서 받기
스팸은 없습니다. 언제든지 구독 해지 가능합니다.