NextCloud adalah file hosting dan file sharing server yang free dan open-source yang diambil dari proyek ownCloud. NextCloud sangat mirip dengan layanan berbagi file lainnya seperti Google Drive, Dropbox dan iCloud.
NextCloud memungkinkan Anda untuk menyimpan file, dokumen, gambar, Film, dan Video dari lokasi terpusat. Dengan NextCloud, Anda dapat berbagi file, kontak, dan media lainnya dengan teman dan klien Anda. NextCloud terintegrasi dengan surat, kalender, kontak, dan fitur lain yang akan membantu tim Anda menyelesaikan pekerjaan mereka lebih cepat dan mudah.
Anda dapat menginstal NextCloud client pada mesin desktop untuk menyinkronkan file dengan server Nextcloud Anda. Desktop clients tersedia untuk sebagian besar sistem operasi termasuk, Windows, macOS, FreeBSD, dan Linux.
Dalam tutorial ini, kami akan menjelaskan cara menginstal NextCloud dan mengamankannya dengan Let’s Encrypt SSL pada Debian 10.
Prasyarat Tutorial
- Server yang menjalankan Debian 10.
- Nama domain yang valid yang menunjuk ke IP server Anda. dalam tutorial ini, kita akan menggunakan domain nextcloud.example.com.
- Masuk sebagai root atau user dengan hak sudo.
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
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/Jakarta
systemctl start apache2 systemctl start mariadb systemctl enable apache2 systemctl enable mariadb
mysql -u root -p
CREATE DATABASE nextclouddb; CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'GantiDenganPassword';
GRANT ALL ON nextclouddb.* TO 'nextclouduser'@'localhost';
FLUSH PRIVILEGES; EXIT;
wget https://download.nextcloud.com/server/releases/nextcloud-17.0.1.zip
unzip nextcloud-17.0.1.zip
mv nextcloud /var/www/html/
chown -R www-data:www-data /var/www/html/nextcloud/ chmod -R 755 /var/www/html/nextcloud/
nano /etc/apache2/sites-available/nextcloud.conf
<VirtualHost *:80> ServerAdmin admin@example.com DocumentRoot /var/www/html/nextcloud/ ServerName nextcloud.example.com Alias /nextcloud "/var/www/html/nextcloud/" <Directory /var/www/html/nextcloud/> Options +FollowSymlinks AllowOverride All Require all granted <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/html/nextcloud SetEnv HTTP_HOME /var/www/html/nextcloud </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
a2ensite nextcloud.conf a2enmod rewrite a2enmod headers a2enmod env a2enmod dir a2enmod mime
systemctl restart apache2
apt-get install python-certbot-apache -y
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): admin@example.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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
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
0 Comments