Guide to Installing Nextcloud on VPS
The guide to installing Nextcloud on a VPS is a popular topic among individuals and businesses, as the demand for secure and self-managed data storage and synchronization continues to grow...
The guide to installing Nextcloud on a VPS is a popular topic among individuals and businesses, as the demand for secure and self-managed data storage and synchronization continues to grow. Instead of relying on commercial cloud services, you can self-host Nextcloud—an open-source cloud solution—on your company's VPSVPTSto build a private, secure, and flexible data storage system.
1. Prepare the VPS
First, you need a VPS with recommended parameters:
- Operating system: Ubuntu 22.04
- RAM: Minimum 2GB (4GB recommended for multiple users)
- Storage drive: SSD ≥ 40GB
- Bandwidth: Unlimited (depending on VPTS plan)
2. Steps to Install Nextcloud
Step 1: Update the system and install Docker
- Run the command below and press Enter to update the system
sudo apt update && sudo apt install -y ca-certificates curl gnupg lsb-release
- Next, run the following commands and press enter
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update && sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
Step 2: Verify Docker& Docker Compose
- Run the following command to check Docker
docker compose version
Step 3: Create directory for Nextcloud
- Next, run the following command to create the directory
mkdir ~/nextcloud-docker && cd ~/nextcloud-docker
Step 4: Create docker-compose.yml file
nano docker-compose.yml
Paste the following content into:
version: '3'
services:
db:
image: mariadb:11
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- db_data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=matkhau-root
- MYSQL_PASSWORD=matkhau-nextcloud
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
app:
image: nextcloud
restart: always
ports:
- 8080:80
links:
- db
volumes:
- nextcloud_data:/var/www/html
environment:
- MYSQL_PASSWORD=matkhau-nextcloud
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db
volumes:
db_data:
nextcloud_data:
Set a password, then save the file with CTRL + X, press y, and finally press Enter
Step 5: Launch Nextcloud
- Run the following command to launch Nextcloud
docker compose up -d
Step 6: Access Nextcloud interface
- Open your browser and navigate to:
http://
Note: You can change the port when creating the file in step 4
- On the Nextcloud interface, set up a new administrator account
3. Benefits of using Nextcloud
Nextcloud is a powerful personal and business cloud storage solution, similar to Google Drive or Dropbox, but installed directly on your own VPS. When using Nextcloud, you will enjoy the following benefits:
- Secure data storage:All files, documents, images, videos... are stored on your own VPS, independent of third-party services.
- High security:SSL/HTTPS, two-factor authentication, and data encryption can be integrated to ensure information remains private at all times.
- Share&easy collaboration: Allows sharing files and folders with others via link or account, with flexible view/edit/delete permissions.
- Cross-platform synchronization: Nextcloud apps are available for Windows, Linux, macOS, iOS, and Android, enabling data synchronization across multiple devices.
- Expand utilities: Supports installing additional apps like calendar, contacts, email, team chat, and online office to turn VPS into a complete team collaboration platform.
Don't miss the opportunity to use high-quality services at VPTS with exclusive offers only at VPTS!
- Website: https://vpts.shop
Email: [email protected]
- Hotline: 0328 812 674
Facebook: https://facebook.com/VPSTTT
- Zalo OA: https://zalo.me/vpstttgroup
CONCLUSION
Through the steps above, you can easily deploy and use Nextcloud on a VPS to build a personal or enterprise data storage and synchronization system safely and conveniently. Using Nextcloud helps you take control of your data, enhance security, and optimize team productivity.
If you want to save time and have a stable environment, check out the high-quality VPS services from VPTS. With powerful infrastructure, 24/7 technical support, and periodic backup options,VPTSwill help you deploy Nextcloud quickly, securely, and sustainably.
VPTS – Comprehensive Digital Infrastructure Solutions Provider
VPTS is a digital infrastructure solution provider in Vietnam, serving deployment, operation, and data storage needs for individuals, developers, and enterprises. The service ecosystem includesVietnam VPS, International VPS, VPS Anti DDoS, Hosting cPanel, dedicated server, Rack rental, Proxy IPv4/IPv6, S3 MinIOandCloud Storage.
Besides providing infrastructure resources, VPTS also focuses on assisting customers with deployment, configuration, and practical troubleshooting. Content on the VPTS Blog is drawn from common scenarios in operating VPS, servers, and online systems, helping readers understand root causes and apply clear solutions.
VPTS – Stable infrastructure, flexible solutions, and continuous partnership throughout operations.
VPTS Team Contact Information
Website: https://vpts.shop
Facebook: https://www.facebook.com/trang.vpsttt/
Zalo OA: https://zalo.me/vpstttgroup
Hotline: 0328 812 674