﻿{"id":1578,"date":"2026-10-23T09:43:50","date_gmt":"2026-10-23T02:43:50","guid":{"rendered":"https:\/\/sangnguyen.drayddns.com\/?p=1578"},"modified":"2026-10-23T10:00:15","modified_gmt":"2026-10-23T03:00:15","slug":"huong-dan-cai-dat-nextcloud-nhu-drive-google-tren-win-linux","status":"publish","type":"post","link":"https:\/\/sangnguyen.drayddns.com\/index.php\/2026\/10\/23\/huong-dan-cai-dat-nextcloud-nhu-drive-google-tren-win-linux\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t nextcloud (nh\u01b0 drive google) tr\u00ean win linux mint"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">D\u01b0\u1edbi \u0111\u00e2y l\u00e0 chi ti\u1ebft c\u00e1c b\u01b0\u1edbc tri\u1ec3n khai <strong>Nextcloud<\/strong> b\u1eb1ng Docker Compose ngay tr\u00ean m\u00e1y \u1ea3o Linux Mint, ch\u1ea1y song song \u0111\u1ed9c l\u1eadp v\u1edbi Immich.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>B\u01b0\u1edbc 1: T\u1ea1o th\u01b0 m\u1ee5c qu\u1ea3n l\u00fd Nextcloud<\/strong>.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">M\u1edf Terminal tr\u00ean Linux Mint (ho\u1eb7c SSH v\u00e0o IP 172.16.10.18) v\u00e0 ch\u1ea1y l\u1ec7nh t\u1ea1o th\u01b0 m\u1ee5c ri\u00eang:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p ~\/nextcloud &amp;&amp; cd ~\/nextcloud\nnano docker-compose.yml\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>C\u00e1ch x\u00e1c minh:<\/em> C\u1eeda s\u1ed5 tr\u00ecnh so\u1ea1n th\u1ea3o nano m\u1edf ra v\u1edbi m\u1ed9t trang tr\u1eafng.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>B\u01b0\u1edbc 2: D\u00e1n file c\u1ea5u h\u00ecnh Docker Compose<\/strong>.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Sao ch\u00e9p to\u00e0n b\u1ed9 \u0111o\u1ea1n m\u00e3 d\u01b0\u1edbi \u0111\u00e2y v\u00e0 d\u00e1n v\u00e0o c\u1eeda s\u1ed5 nano:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>YAML\nversion: '3'\n\nservices:\n  db:\n    image: mariadb:10.11\n    container_name: nextcloud-db\n    command: --transaction-isolation=READ-COMMITTED --log-bin-trust-function-creators=1\n    restart: always\n    volumes:\n      - db_data:\/var\/lib\/mysql\n    environment:\n      - MYSQL_ROOT_PASSWORD=SangNguyen_Root_2026!\n      - MYSQL_PASSWORD=SangNguyen_Nextcloud_2026!\n      - MYSQL_DATABASE=nextcloud\n      - MYSQL_USER=nextcloud\n\n  app:\n    image: nextcloud:latest\n    container_name: nextcloud-app\n    restart: always\n    ports:\n      - 2284:80\n    links:\n      - db\n    volumes:\n      - nextcloud_data:\/var\/www\/html\n    environment:\n      - MYSQL_PASSWORD=SangNguyen_Nextcloud_2026!\n      - MYSQL_DATABASE=nextcloud\n      - MYSQL_USER=nextcloud\n      - MYSQL_HOST=db\n\nvolumes:\n  db_data:\n  nextcloud_data:\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>L\u01b0u file:<\/strong> Nh\u1ea5n t\u1ed5 h\u1ee3p ph\u00edm Ctrl + O $\\rightarrow$ nh\u1ea5n Enter $\\rightarrow$ nh\u1ea5n Ctrl + X \u0111\u1ec3 tho\u00e1t.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>B\u01b0\u1edbc 3: Kh\u1edfi ch\u1ea1y Nextcloud<\/strong>.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">T\u1ea1i th\u01b0 m\u1ee5c ~\/nextcloud, ch\u1ea1y l\u1ec7nh t\u1ea3i v\u00e0 kh\u1edfi \u0111\u1ed9ng container:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo docker compose up -d<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>C\u00e1ch x\u00e1c minh:<\/em> Ch\u1ea1y l\u1ec7nh sudo docker ps. B\u1ea1n s\u1ebd th\u1ea5y hai container m\u1edbi l\u00e0 nextcloud-app (s\u1eed d\u1ee5ng c\u1ed5ng 2284) v\u00e0 nextcloud-db \u0111ang b\u00e1o tr\u1ea1ng th\u00e1i <strong>Up<\/strong>, ch\u1ea1y song song c\u00f9ng c\u00e1c container Immich (c\u1ed5ng 2283).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>B\u01b0\u1edbc 4: Kh\u1edfi t\u1ea1o t\u00e0i kho\u1ea3n qu\u1ea3n tr\u1ecb<\/strong>.<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>M\u1edf tr\u00ecnh duy\u1ec7t web tr\u00ean m\u00e1y t\u00ednh (trong m\u1ea1ng n\u1ed9i b\u1ed9), truy c\u1eadp \u0111\u1ecba ch\u1ec9:[http:\/\/172.16.10.18:8080](http:\/\/172.16.10.18:2284)<\/li>\n\n\n\n<li>T\u1ea1i m\u00e0n h\u00ecnh thi\u1ebft l\u1eadp ban \u0111\u1ea7u: \n<ul class=\"wp-block-list\">\n<li><strong>Username:<\/strong><span style=\"color: initial;\"> Nh\u1eadp t\u00ean qu\u1ea3n tr\u1ecb vi\u00ean b\u1ea1n mu\u1ed1n d\u00f9ng (v\u00ed d\u1ee5: sangnguyen).<\/span><\/li>\n\n\n\n<li><strong>Password:<\/strong> Nh\u1eadp m\u1eadt kh\u1ea9u qu\u1ea3n tr\u1ecb.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>B\u1ea5m <strong>Finish setup (Ho\u00e0n t\u1ea5t c\u00e0i \u0111\u1eb7t)<\/strong> v\u00e0 \u0111\u1ee3i kho\u1ea3ng 1\u20132 ph\u00fat \u0111\u1ec3 h\u1ec7 th\u1ed1ng kh\u1edfi t\u1ea1o d\u1eef li\u1ec7u ban \u0111\u1ea7u.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><em>C\u00e1ch x\u00e1c minh:<\/em> M\u00e0n h\u00ecnh chuy\u1ec3n v\u00e0o giao di\u1ec7n qu\u1ea3n l\u00fd t\u1ec7p ch\u00ednh c\u1ee7a Nextcloud v\u1edbi c\u00e2y th\u01b0 m\u1ee5c t\u01b0\u01a1ng t\u1ef1 Google Drive.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>B\u01b0\u1edbc 5: C\u1ea5u h\u00ecnh m\u1edf c\u1ed5ng truy c\u1eadp t\u1eeb xa (4G\/Internet)<\/strong>.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u1ec3 truy c\u1eadp Nextcloud t\u1eeb xa qua \u1ee9ng d\u1ee5ng \u0111i\u1ec7n tho\u1ea1i ho\u1eb7c t\u00ean mi\u1ec1n sangnguyen.drayddns.com:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Tr\u00ean Router DrayTek:<\/strong>\n<ul class=\"wp-block-list\">\n<li><span style=\"color: initial;\">V\u00e0o <\/span><strong style=\"color: initial;\">NAT<\/strong><span style=\"color: initial;\"> $\\rightarrow$ <\/span><strong style=\"color: initial;\">Port Redirection<\/strong><span style=\"color: initial;\">.<\/span><\/li>\n\n\n\n<li>T\u1ea1o 1 quy t\u1eafc m\u1edbi: <strong>WAN Port 2284<\/strong> $\\rightarrow$ <strong>Private IP 172.16.10.18<\/strong> $\\rightarrow$ <strong>Private Port 2284<\/strong>.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Tr\u00ean T\u01b0\u1eddng l\u1eeda FortiGate:<\/strong>\n<ul class=\"wp-block-list\">\n<li>T\u1ea1o th\u00eam m\u1ed9t quy t\u1eafc <strong>Firewall Policy<\/strong> cho ph\u00e9p l\u01b0u l\u01b0\u1ee3ng \u0111i qua c\u1ed5ng 2284 v\u00e0o \u0111\u1ecba ch\u1ec9 172.16.10.18 (c\u1ea5u h\u00ecnh gi\u1ed1ng quy t\u1eafc SERVER_PHOTTO_IMMICH c\u1ed5ng 2283).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em>C\u00e1ch x\u00e1c minh:<\/em> T\u1eaft Wi-Fi tr\u00ean \u0111i\u1ec7n tho\u1ea1i (d\u00f9ng 4G), t\u1ea3i app <strong>Nextcloud<\/strong> t\u1eeb App Store\/Google Play, nh\u1eadp Server URL: [http:\/\/sangnguyen.drayddns.com:2284](http:\/\/sangnguyen.drayddns.com:2284) v\u00e0 \u0111\u0103ng nh\u1eadp t\u00e0i kho\u1ea3n. N\u1ebfu t\u1ea3i\/m\u1edf file th\u00e0nh c\u00f4ng l\u00e0 h\u1ec7 th\u1ed1ng \u0111\u00e3 ho\u00e0n t\u1ea5t 100%.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>D\u01b0\u1edbi \u0111\u00e2y l\u00e0 chi ti\u1ebft c\u00e1c b\u01b0\u1edbc tri\u1ec3n khai Nextcloud b\u1eb1ng Docker Compose ngay tr\u00ean m\u00e1y \u1ea3o Linux Mint, ch\u1ea1y song song \u0111\u1ed9c l\u1eadp v\u1edbi Immich. B\u01b0\u1edbc 1: T\u1ea1o th\u01b0 m\u1ee5c qu\u1ea3n l\u00fd Nextcloud. M\u1edf Terminal tr\u00ean Linux Mint (ho\u1eb7c SSH v\u00e0o IP 172.16.10.18) v\u00e0 ch\u1ea1y l\u1ec7nh t\u1ea1o th\u01b0 m\u1ee5c ri\u00eang: Bash C\u00e1ch x\u00e1c minh: [&#8230;]\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1578","post","type-post","status-publish","format-standard","hentry","category-chia-se-hoac-kien-thuc-cntt"],"_links":{"self":[{"href":"https:\/\/sangnguyen.drayddns.com\/index.php\/wp-json\/wp\/v2\/posts\/1578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sangnguyen.drayddns.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sangnguyen.drayddns.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sangnguyen.drayddns.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sangnguyen.drayddns.com\/index.php\/wp-json\/wp\/v2\/comments?post=1578"}],"version-history":[{"count":4,"href":"https:\/\/sangnguyen.drayddns.com\/index.php\/wp-json\/wp\/v2\/posts\/1578\/revisions"}],"predecessor-version":[{"id":1586,"href":"https:\/\/sangnguyen.drayddns.com\/index.php\/wp-json\/wp\/v2\/posts\/1578\/revisions\/1586"}],"wp:attachment":[{"href":"https:\/\/sangnguyen.drayddns.com\/index.php\/wp-json\/wp\/v2\/media?parent=1578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sangnguyen.drayddns.com\/index.php\/wp-json\/wp\/v2\/categories?post=1578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sangnguyen.drayddns.com\/index.php\/wp-json\/wp\/v2\/tags?post=1578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}