Who this is for: System Owner / Admin deploying Task Session on a VPS (DigitalOcean, Vultr, Hetzner, Linode, AWS Lightsail) or a dedicated server with SSH access.
Goal: Set up a complete server environment and install Task Session from scratch — including web server, PHP, MySQL, SSL, and the application itself. This guide assumes you have root or sudo access to a fresh Linux server and are comfortable working in a terminal.
A VPS or dedicated server gives you full control over performance, security, and configuration. This is the recommended setup for agencies with 10 or more users, teams that need fine-grained control over SMTP and OAuth integrations, or organisations handling sensitive client data. Task Session is only 10 MB and runs efficiently even on the smallest VPS plans.
Before You Begin
You will need the following before starting:
- A VPS or dedicated server running Ubuntu 22.04 LTS or Ubuntu 24.04 LTS (this guide uses Ubuntu commands — Debian, AlmaLinux, and Rocky Linux follow similar steps with minor differences).
- Root or sudo access via SSH.
- A registered domain name pointed to your server’s IP address (A record configured in your DNS settings).
- Your Task Session download ready (ZIP file from your account at tasksession.com/account).
- Your Task Session licence key (from your purchase confirmation or account page).
If you are using a managed VPS platform like Cloudways, RunCloud, or ServerPilot, those platforms handle the server stack for you — you can skip directly to the application installation steps (Step 5 onward) and use their control panel to create databases and manage PHP.
Server Stack Overview
Task Session requires a standard LAMP or LEMP web stack. This guide covers both options:
| Component | LAMP Stack | LEMP Stack |
|---|---|---|
| Operating System | Ubuntu 22.04 / 24.04 LTS | Ubuntu 22.04 / 24.04 LTS |
| Web Server | Apache 2.4+ (with mod_rewrite) | Nginx 1.18+ |
| Database | MySQL 8.0 or MariaDB 10.6+ | MySQL 8.0 or MariaDB 10.6+ |
| PHP | PHP 8.1 or 8.2 (with required extensions) | PHP 8.1 or 8.2 (with PHP-FPM) |
| SSL | Let’s Encrypt (Certbot) | Let’s Encrypt (Certbot) |
Choose Apache if you want the simplest setup with .htaccess support out of the box. Choose Nginx if you want better performance under concurrent connections and are comfortable writing server configuration blocks. Both work equally well with Task Session.
Step 1: Connect to Your Server and Update
Open your terminal and connect to your server via SSH:
ssh root@your-server-ip
If you are using a non-root user with sudo privileges, connect with that user and prefix commands with sudo as needed.
Update the system packages before installing anything:
apt update && apt upgrade -y
Step 2: Install the Web Server
Choose one of the two options below. Do not install both Apache and Nginx on the same server.
Option A: Install Apache
apt install apache2 -y
Enable the required Apache modules:
a2enmod rewrite headers ssl
systemctl restart apache2
Verify Apache is running:
systemctl status apache2
You should see “active (running)” in the output. Visit your server’s IP address in a browser — you should see the Apache default page.
Option B: Install Nginx
apt install nginx -y
Verify Nginx is running:
systemctl status nginx
Visit your server’s IP address in a browser — you should see the Nginx welcome page.
Step 3: Install PHP 8.2 and Required Extensions
Add the PHP repository and install PHP 8.2 with all extensions required by Task Session:
apt install software-properties-common -y
add-apt-repository ppa:ondrej/php -y
apt update
For Apache (mod_php)
apt install php8.2 php8.2-mysql php8.2-mbstring php8.2-curl php8.2-gd php8.2-xml php8.2-zip php8.2-intl php8.2-fileinfo php8.2-bcmath libapache2-mod-php8.2 -y
Restart Apache to load the PHP module:
systemctl restart apache2
For Nginx (PHP-FPM)
apt install php8.2-fpm php8.2-mysql php8.2-mbstring php8.2-curl php8.2-gd php8.2-xml php8.2-zip php8.2-intl php8.2-fileinfo php8.2-bcmath -y
Verify PHP-FPM is running:
systemctl status php8.2-fpm
Verify PHP Installation
Check the installed PHP version and extensions:
php -v
php -m
Confirm the version shows 8.2.x and the extensions list includes pdo_mysql, mbstring, openssl, curl, gd, json, fileinfo, zip, and intl.
Configure PHP Settings
Edit the PHP configuration to set recommended values for Task Session. The file location depends on your setup:
- Apache:
/etc/php/8.2/apache2/php.ini - Nginx (PHP-FPM):
/etc/php/8.2/fpm/php.ini
Open the file with a text editor:
nano /etc/php/8.2/apache2/php.ini
Find and update the following values:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 120
memory_limit = 256M
max_input_vars = 3000
Save the file and restart the relevant service:
- Apache:
systemctl restart apache2 - Nginx:
systemctl restart php8.2-fpm
Step 4: Install and Configure MySQL
Install MySQL Server:
apt install mysql-server -y
Run the security script to set a root password and remove insecure defaults:
mysql_secure_installation
Follow the prompts:
- Set a strong root password.
- Remove anonymous users — Yes.
- Disallow root login remotely — Yes.
- Remove test database — Yes.
- Reload privilege tables — Yes.
Create the Task Session Database and User
Log in to MySQL:
mysql -u root -p
Run the following commands (replace your_strong_password with an actual strong password):
CREATE DATABASE tasksession_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'tasksession_user'@'localhost' IDENTIFIED BY 'your_strong_password';
GRANT ALL PRIVILEGES ON tasksession_db.* TO 'tasksession_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Write down these four details for the install wizard:
- Database Host:
localhost - Database Name:
tasksession_db - Database Username:
tasksession_user - Database Password: The password you set above.
Using MariaDB instead: If you prefer MariaDB, install it with apt install mariadb-server -y and follow the same steps. The commands for creating databases and users are identical.
Step 5: Configure the Virtual Host
A virtual host tells your web server which directory to serve when someone visits your domain. You need to create one for Task Session.
Apache Virtual Host
Create a new configuration file:
nano /etc/apache2/sites-available/tasksession.conf
Paste the following configuration (replace yourdomain.com with your actual domain):
<VirtualHost *:80>
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/tasksession
<Directory /var/www/tasksession>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/tasksession_error.log
CustomLog ${APACHE_LOG_DIR}/tasksession_access.log combined
</VirtualHost>
Save the file, then enable the site and disable the default:
a2ensite tasksession.conf
a2dissite 000-default.conf
systemctl reload apache2
Nginx Server Block
Create a new configuration file:
nano /etc/nginx/sites-available/tasksession
Paste the following configuration (replace yourdomain.com with your actual domain):
server {
listen 80;
server_name yourdomain.com www.yourdomain.com;
root /var/www/tasksession;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
client_max_body_size 64M;
}
Enable the site and remove the default:
ln -s /etc/nginx/sites-available/tasksession /etc/nginx/sites-enabled/
rm /etc/nginx/sites-enabled/default
nginx -t
systemctl reload nginx
The nginx -t command tests the configuration for syntax errors. If it reports “test is successful,” you can safely reload. If it reports errors, review the configuration file for typos.
Step 6: Upload and Extract Task Session
Create the installation directory and set ownership:
mkdir -p /var/www/tasksession
Upload the Task Session ZIP file to your server. You have two options:
Option A: Upload via SCP from Your Local Machine
Run this command from your local terminal (not on the server):
scp /path/to/tasksession.zip root@your-server-ip:/var/www/tasksession/
Option B: Upload via SFTP
Use an SFTP client like FileZilla, Cyberduck, or WinSCP. Connect to your server, navigate to /var/www/tasksession/, and upload the ZIP file.
Once uploaded, extract the archive on the server:
cd /var/www/tasksession
apt install unzip -y
unzip tasksession.zip
If the ZIP extracts into a subfolder, move the contents up:
mv tasksession-folder/* /var/www/tasksession/
rm -rf tasksession-folder tasksession.zip
Set correct ownership and permissions:
chown -R www-data:www-data /var/www/tasksession
find /var/www/tasksession -type d -exec chmod 755 {} \;
find /var/www/tasksession -type f -exec chmod 644 {} \;
The www-data user is the default web server user on Ubuntu. If your server uses a different user (check with ps aux | grep apache or ps aux | grep nginx), replace www-data accordingly.
Step 7: Install SSL with Let’s Encrypt
SSL is required for production use of Task Session, and mandatory for Google Login (OAuth), Google Drive integration, and secure payment gateway communication.
Install Certbot:
apt install certbot -y
For Apache
apt install python3-certbot-apache -y
certbot --apache -d yourdomain.com -d www.yourdomain.com
For Nginx
apt install python3-certbot-nginx -y
certbot --nginx -d yourdomain.com -d www.yourdomain.com
Follow the prompts:
- Enter your email address (for renewal notifications).
- Agree to the terms of service.
- When asked about redirecting HTTP to HTTPS, select the option to redirect all traffic to HTTPS (recommended).
Certbot automatically configures your virtual host for HTTPS and sets up auto-renewal. Verify the renewal process works:
certbot renew --dry-run
If the dry run succeeds, your SSL certificate will auto-renew before it expires.
Verify SSL is working: Visit https://yourdomain.com in your browser. You should see a padlock icon in the address bar.
Step 8: Run the Install Wizard
Open your browser and navigate to:
https://yourdomain.com/install/
The Task Session install wizard will guide you through the final configuration:
- Requirements Check: The wizard scans PHP version, extensions, file permissions, and writable directories. If you followed the steps above, everything should pass.
- Database Configuration: Enter the database credentials you created in Step 4: host (
localhost), database name (tasksession_db), username (tasksession_user), and the password. - System Configuration: Set your site title, site URL (including
https://), timezone, currency, and language (English, Spanish, Italian, or French). - Create Admin Account: Enter your name, email, and a strong password. This is the primary admin account with full access to everything in Task Session.
- Installation Complete: The wizard creates all database tables and configures the application. Do not close the browser until you see the success confirmation.
Step 9: Delete the /install/ Folder (Critical)
Do this immediately. Task Session’s official documentation explicitly warns that leaving the /install/ folder accessible is a serious security risk.
rm -rf /var/www/tasksession/install
Verify: Visit https://yourdomain.com/install/ in your browser. You should see a 404 error. If the wizard still loads, the folder was not deleted — run the command again and check the path.
Step 10: Log In and Verify
Visit https://yourdomain.com and log in with the admin credentials you created during the wizard. Once logged in, verify:
- The admin dashboard loads without errors.
- The browser shows a padlock icon (SSL active).
- Your site title, timezone, and currency are correct in Settings.
- You can navigate to all sections: Projects, Tasks, Clients, Invoicing, Files, Chat, Notes, and Settings.
- Visiting
https://yourdomain.com/install/returns a 404.
Server Hardening
Since you have full control of the server, take these additional steps to secure your environment.
Enable the Firewall
UFW (Uncomplicated Firewall) is pre-installed on Ubuntu. Configure it to allow only the traffic Task Session needs:
ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
ufw status
This allows SSH (port 22), HTTP (port 80), and HTTPS (port 443) while blocking all other inbound traffic. If you use a non-standard SSH port, replace 22 with your port number.
Secure SSH Access
- Disable root login over SSH: Edit
/etc/ssh/sshd_config, setPermitRootLogin no, and restart SSH withsystemctl restart sshd. Use a regular user with sudo privileges instead. - Use SSH key authentication: Generate an SSH key pair on your local machine (
ssh-keygen), copy the public key to the server (ssh-copy-id user@your-server-ip), then disable password authentication in/etc/ssh/sshd_configby settingPasswordAuthentication no. - Change the default SSH port (optional): Change
Port 22to a non-standard port in/etc/ssh/sshd_config. Update your firewall rules accordingly.
Install Fail2Ban
Fail2Ban monitors log files and temporarily bans IP addresses that show malicious behaviour (e.g., repeated failed login attempts):
apt install fail2ban -y
systemctl enable fail2ban
systemctl start fail2ban
The default configuration protects SSH. You can add custom jails for Apache or Nginx if needed.
Enable Automatic Security Updates
apt install unattended-upgrades -y
dpkg-reconfigure --priority=low unattended-upgrades
This ensures your server automatically installs critical security patches for the operating system and installed packages.
Setting Up Automated Backups
On a VPS or dedicated server, backups are your responsibility. Set up automated backups for both the database and application files.
Database Backups with Cron
Create a backup script:
nano /root/backup-tasksession.sh
Add the following content (replace the password with your actual database password):
#!/bin/bash
BACKUP_DIR="/root/backups"
DATE=$(date +%Y%m%d_%H%M%S)
mkdir -p $BACKUP_DIR
# Database backup
mysqldump -u tasksession_user -p'your_strong_password' tasksession_db > $BACKUP_DIR/db_$DATE.sql
# Application files backup
tar -czf $BACKUP_DIR/files_$DATE.tar.gz /var/www/tasksession
# Delete backups older than 14 days
find $BACKUP_DIR -type f -mtime +14 -delete
Make the script executable and schedule it to run daily:
chmod +x /root/backup-tasksession.sh
crontab -e
Add this line to run the backup every day at 2:00 AM:
0 2 * * * /root/backup-tasksession.sh
Server Snapshots
In addition to file-level backups, use your VPS provider’s snapshot feature for full-server backups:
- DigitalOcean: Enable weekly backups in Droplet settings (adds a small percentage to your monthly cost), or create manual snapshots before updates.
- Vultr: Enable automatic backups in Server settings, or create manual snapshots.
- Hetzner: Enable backups in Cloud Console, or create manual snapshots.
- AWS Lightsail: Create manual snapshots from the instance management page.
Always create a server snapshot before applying Task Session updates. If an update causes issues, you can restore the entire server to its pre-update state in minutes.
Configuring SMTP on a VPS
Many VPS providers block port 25 (standard SMTP) by default to prevent spam. This means you usually cannot send email directly from the server. Instead, configure Task Session to send emails through an external SMTP service:
- Amazon SES: Low cost, high deliverability, integrates well with AWS infrastructure.
- Mailgun: Developer-friendly API and SMTP, generous free tier.
- Postmark: Focused on transactional email with excellent deliverability.
- Gmail SMTP / Google Workspace: Works for smaller teams. Use smtp.gmail.com on port 587 with TLS.
- Microsoft 365: If your organisation uses Microsoft email.
Configure the SMTP details in Task Session’s admin panel under email settings. After configuring, send a test email to verify delivery and check that it does not land in spam.
For full instructions, see: Configure Email / SMTP.
Performance Optimisation
Task Session is lightweight (10 MB) and performs well on minimal resources. However, if you are serving a larger team or want to squeeze more performance from your server, consider these optimisations:
Enable PHP OPcache
OPcache stores precompiled PHP bytecode in memory, significantly reducing page load times:
nano /etc/php/8.2/apache2/php.ini
Find the OPcache section and set:
opcache.enable=1
opcache.memory_consumption=128
opcache.max_accelerated_files=10000
opcache.revalidate_freq=60
Restart Apache or PHP-FPM after making changes.
MySQL Tuning
For servers with 1 GB of RAM or more, adjust MySQL settings in /etc/mysql/mysql.conf.d/mysqld.cnf:
innodb_buffer_pool_size = 256M
innodb_log_file_size = 64M
max_connections = 100
Restart MySQL: systemctl restart mysql
Enable Gzip Compression
Compressing responses reduces bandwidth and improves load times.
Apache: Enable mod_deflate (usually enabled by default):
a2enmod deflate
systemctl restart apache2
Nginx: Add to your server block or http block in /etc/nginx/nginx.conf:
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
gzip_min_length 256;
Recommended VPS Specifications
| Team Size | Recommended VPS | Estimated Monthly Cost |
|---|---|---|
| 1–10 users | 1 vCPU, 1 GB RAM, 25 GB SSD | $5–$6/month |
| 10–30 users | 2 vCPU, 2 GB RAM, 50 GB SSD | $10–$12/month |
| 30–100 users | 2 vCPU, 4 GB RAM, 80 GB SSD | $20–$24/month |
| 100+ users | 4 vCPU, 8 GB RAM, 160 GB SSD | $40–$48/month |
These are approximate specifications. Task Session itself uses minimal resources — the primary factors that drive your requirements are the number of concurrent users, the volume of uploaded files, and your database size.
Using a Managed VPS Panel
If you prefer not to manage the server stack manually, managed VPS platforms handle Apache/Nginx, PHP, MySQL, and SSL configuration through a visual control panel. The most common options are:
- Cloudways: Deploys on DigitalOcean, Vultr, AWS, or Google Cloud. Handles server configuration, SSL, backups, and monitoring. Create a PHP application, configure the database through their panel, then upload Task Session and run the installer.
- RunCloud: Connects to any VPS provider. Provides a web-based panel for managing PHP versions, databases, SSL, and deployment. Free tier available.
- ServerPilot: Connects to any VPS. Manages Apache, PHP, MySQL, and SSL. Simple interface focused on PHP application hosting.
- GridPane: WordPress-focused but supports PHP applications. Handles server stacks, SSL, and backups on any VPS provider.
When using a managed panel, skip Steps 2 through 7 of this guide and use the panel’s interface to create a site/application, configure the database, and enable SSL. Then upload Task Session files and proceed with the install wizard (Step 8).
Complete Command Summary
For reference, here is the full sequence of commands for an Apache-based installation on Ubuntu 22.04/24.04:
# Update system
apt update && apt upgrade -y
# Install Apache
apt install apache2 -y
a2enmod rewrite headers ssl
systemctl restart apache2
# Install PHP 8.2 and extensions
apt install software-properties-common -y
add-apt-repository ppa:ondrej/php -y
apt update
apt install php8.2 php8.2-mysql php8.2-mbstring php8.2-curl php8.2-gd php8.2-xml php8.2-zip php8.2-intl php8.2-fileinfo php8.2-bcmath libapache2-mod-php8.2 -y
# Install MySQL
apt install mysql-server -y
mysql_secure_installation
# Create database (run inside mysql -u root -p)
# CREATE DATABASE tasksession_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
# CREATE USER 'tasksession_user'@'localhost' IDENTIFIED BY 'your_strong_password';
# GRANT ALL PRIVILEGES ON tasksession_db.* TO 'tasksession_user'@'localhost';
# FLUSH PRIVILEGES;
# EXIT;
# Create site directory and upload files
mkdir -p /var/www/tasksession
# Upload tasksession.zip via SCP or SFTP, then:
cd /var/www/tasksession
apt install unzip -y
unzip tasksession.zip
# Set permissions
chown -R www-data:www-data /var/www/tasksession
find /var/www/tasksession -type d -exec chmod 755 {} \;
find /var/www/tasksession -type f -exec chmod 644 {} \;
# Configure Apache virtual host
# (create /etc/apache2/sites-available/tasksession.conf as shown above)
a2ensite tasksession.conf
a2dissite 000-default.conf
systemctl reload apache2
# Install SSL
apt install certbot python3-certbot-apache -y
certbot --apache -d yourdomain.com -d www.yourdomain.com
# Enable firewall
ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
# Run the install wizard at https://yourdomain.com/install/
# Then delete the install folder:
rm -rf /var/www/tasksession/install
What to Do Next
Your Task Session instance is now installed on your VPS or dedicated server. The next steps are:
- Complete the Post-Install Security Checklist to finalise security settings within Task Session.
- Configure branding, SMTP email, and payment gateways.
- Add your team members and onboard your first client.

