Quick Start Guide
This guide walks you through the essential steps to get your CompleteFTP for Linux server up and running quickly. You'll create a user, set up a folder, and test connections using multiple protocols.
Prerequisites
- CompleteFTP installed and running (see Installation and Setup)
- Your user added to the
completeftpgroup - Basic familiarity with Linux command line
Overview
This quick start will take you through:
- Creating your first user with password authentication
- Setting up a folder for file storage
- Testing connections via FTP, SFTP, and HTTPS
- Verifying file transfers work correctly
- Understanding security and next steps
Time required: 15-30 minutes
Step 1: Create Your First User
Let's create a user account for testing:
# Create a new user
completeftp user add myuser
# Set a password for the user (interactive prompt)
completeftp user set myuser password
When prompted, enter a secure password (e.g., MySecurePass123!).
Note: The password must meet the default policy requirements:
- At least 8 characters
- Mixed case letters
- At least one digit
- Special characters recommended
Verify the User
# Check that the user was created
completeftp user list
# View user details
completeftp user show myuser
You should see myuser in the user list with basic configuration applied.
Step 2: Set Up a Folder Structure
When you create a user, CompleteFTP automatically creates a virtual folder at /Home/myuser, but it doesn't have a physical directory behind it yet. Let's map it to a real directory on disk:
# Create a physical directory and make it owned by the completeftp service user
sudo mkdir -p /var/ftp/myuser
sudo chown completeftp:completeftp /var/ftp/myuser
# Map the existing virtual folder to the physical directory
completeftp folder set /Home/myuser mapping.path=/var/ftp/myuser
# Set folder ownership to the user
completeftp folder chown /Home/myuser owner myuser
# Set appropriate permissions
completeftp folder chmod /Home/myuser owner rwxd
Note: Physical directories must be owned by the
completeftpsystem user (or be world-writable), since the CompleteFTP service runs as that user.
Create a Shared Folder
# Create a shared directory owned by the service user
sudo mkdir -p /var/ftp/shared
sudo chown completeftp:completeftp /var/ftp/shared
# Add to CompleteFTP
completeftp folder add /Shared OS --mapping=/var/ftp/shared
# Set permissions for all users
completeftp folder chmod /Shared all rw
Verify Folder Setup
# List folders
completeftp folder list
# Check folder details
completeftp folder show /Home/myuser
completeftp folder show /Shared
Step 3: Check for Port Conflicts
CompleteFTP's SFTP server listens on port 22 by default. If OpenSSH is already running on that port, CompleteFTP won't be able to bind to it. Check with:
sudo ss -tlnp | grep :22
If OpenSSH is using port 22, you have two options:
- Stop OpenSSH if you don't need it:
sudo systemctl stop sshd && sudo systemctl disable sshd - Move CompleteFTP's SFTP to another port if you need to keep OpenSSH:
completeftp site set default portSFTP=2222If you do this, add
-P 2222to thesftpcommands in the examples below.
Step 4: Test Connections
Now let's test that connections work with different protocols:
Test FTP Connection
# Using command-line FTP client
ftp localhost
When prompted:
- Username:
myuser - Password:
MySecurePass123!(or whatever you set)
Try basic FTP commands:
# List files
ls
# Change to home directory
cd /Home/myuser
# Create a test file
!echo "Hello from FTP" > /tmp/test.txt
# Upload the file
put /tmp/test.txt
# List files to verify upload
ls
# Download the file
get test.txt /tmp/downloaded.txt
# Quit FTP
quit
Test SFTP Connection
# Connect to CompleteFTP's SFTP on port 2222
sftp myuser@localhost
Enter your password when prompted.
Try SFTP commands:
# List files
ls
# Change to home directory
cd /Home/myuser
# Upload a file
put /etc/hostname
# Download a file
get test.txt /tmp/sftp-downloaded.txt
# Quit SFTP
quit
Test HTTPS/Web Interface
Open a web browser and navigate to:
https://localhost/Login
Note: You may see a security warning about the self-signed certificate. This is normal for initial setup.
Login with:
- Username:
myuser - Password:
MySecurePass123!
Use the web interface to:
- Browse folders
- Upload files
- Download files
- Create new folders
Step 5: Test File Operations
Let's verify that file operations work correctly:
# Create test files
echo "Test content 1" > /tmp/file1.txt
echo "Test content 2" > /tmp/file2.txt
# Test upload via SFTP (using port 2222 as configured above)
sftp myuser@localhost << EOF
cd /Home/myuser
put /tmp/file1.txt
put /tmp/file2.txt
ls
quit
EOF
# Verify files exist in the physical directory
ls -la /var/ftp/myuser/
# Test download via FTP
ftp localhost << EOF
myuser
MySecurePass123!
cd /Home/myuser
get file1.txt /tmp/downloaded1.txt
get file2.txt /tmp/downloaded2.txt
quit
EOF
# Verify downloads
cat /tmp/downloaded1.txt
cat /tmp/downloaded2.txt
Step 6: Add More Users and Test Groups
Let's create additional users and organize them with groups:
# Create additional users
completeftp user add alice
completeftp user add bob
# Set passwords (interactive prompts)
completeftp user set alice password
completeftp user set bob password
# Create a group
completeftp group add developers
# Add users to the group
completeftp group memberadd developers alice bob
# Create a group folder
sudo mkdir -p /var/ftp/developers
sudo chown completeftp:completeftp /var/ftp/developers
completeftp folder add /Developers OS --mapping=/var/ftp/developers
# Set group permissions
completeftp folder chown /Developers group developers
completeftp folder chmod /Developers group rwxd
Test Group Access
# Test alice can access the developers folder
sftp alice@localhost << EOF
cd /Developers
put /tmp/file1.txt
ls
quit
EOF
# Verify the file is there
ls -la /var/ftp/developers/
Step 7: Configure Basic Security
Let's improve security by enabling SSH key authentication:
# Generate SSH keys for alice (if not already done)
ssh-keygen -t ed25519 -f /tmp/alice_key -N ""
# Add the public key to alice's account
completeftp user key add alice "$(cat /tmp/alice_key.pub)"
# Test SSH key authentication (port 2222 as configured)
sftp -i /tmp/alice_key alice@localhost << EOF
ls
quit
EOF
Step 8: Monitor and Troubleshoot
Check Service Status
# Check CompleteFTP service
sudo systemctl status completeftp
# View recent logs
sudo journalctl -u completeftp --no-pager -n 50
# Monitor logs in real-time
sudo journalctl -u completeftp -f
Check Connections
# See active connections
sudo netstat -tlpn | grep completeftp
# Check listening ports
sudo ss -tlpn | grep completeftp
Test Connectivity
# Test FTP port
telnet localhost 21
# Test SFTP port
telnet localhost 22
# Test HTTPS
curl -k https://localhost/
Understanding the Setup
What We've Created
- User Account:
myuserwith password authentication - Home Directory:
/Home/myusermapped to/var/ftp/myuser - Shared Folder:
/Sharedfor common access - Group Structure:
developersgroup with members - Multiple Protocols: FTP, SFTP, and HTTPS access
File System Structure
CompleteFTP Virtual File System:
├── /Home/
│ ├── myuser/ → /var/ftp/myuser
│ ├── alice/ → /var/ftp/alice
│ └── bob/ → /var/ftp/bob
├── /Shared/ → /var/ftp/shared
└── /Developers/ → /var/ftp/developers
Common Issues and Solutions
Connection Refused
# Check if service is running
sudo systemctl status completeftp
# Check firewall
sudo ufw status # Ubuntu/Debian
sudo firewall-cmd --list-all # Red Hat
Permission Denied
# Check folder permissions
completeftp folder show /Home/myuser access
# Verify user group membership
completeftp group memberlist developers
Authentication Failed
# Check user exists and is enabled
completeftp user show myuser enabled
# Verify protocol is enabled
completeftp user show myuser sftpEnabled ftpEnabled
Next Steps
Now that you have a working CompleteFTP server, consider:
Security Hardening
- SSL Certificates: Install proper SSL certificates for production use
- SSH Keys: Configure SSH key authentication for all users
- Firewall Rules: Restrict access to specific IP ranges
- User Policies: Implement password policies and user quotas
Advanced Configuration
- Site Configuration: Create multiple sites for different purposes
- Advanced Folders: Set up cloud storage integration
- User Management: Implement user groups and permissions
- Monitoring: Set up logging and monitoring
Production Preparation
- License Activation: Activate for remote access
- Backup Strategy: Implement configuration and data backups
- Performance Tuning: Optimize for your specific use case
- Documentation: Document your configuration for team use
Reference Documentation
- Site Configuration - Configure server protocols and settings
- User Management - Advanced user configuration
- Folder Management - Virtual file system setup
- Group Management - User organization and permissions
- Keys and Certificates - Secure authentication setup
Summary
You've successfully:
- Created users with password authentication
- Set up folder structure with proper permissions
- Tested FTP, SFTP, and HTTPS connections
- Verified file upload and download operations
- Configured basic group-based access control
- Tested SSH key authentication
Your CompleteFTP server is now ready for basic use. Consider the next steps above to enhance security and functionality for your specific requirements.