Menu

Infrastructure & Maintenance

Server Deployment

Server deployment for Laravel and MERN stack apps on DigitalOcean, Hostinger and other VPS or shared hosting: Nginx or Apache, SSL, queue workers, firewall and CI/CD, set up by hand and documented. I've deployed Laravel apps for clients and teams since 2023, including Snipe-IT on DigitalOcean.

I put Laravel and MERN stack apps on production servers and make sure they stay up. That covers the server, the web server, SSL, queue workers, the firewall and the deploy pipeline, all set up by hand for your app instead of through a control panel.

I'm a full stack developer in Pakistan who works with Laravel in production every day, so I know where first deployments go wrong: a 403 or 404 right after the first push, a 500 error that never shows up locally, a queue worker that stops without telling anyone. Tell me what you run and where you want it hosted through the contact form, and I'll say what the work involves and how long it takes.

What every deployment includes

  • Server setup from a fresh Ubuntu install, or a cleanup of your existing server
  • Nginx or Apache configured for your app and domain
  • Free Let's Encrypt SSL with automatic renewal
  • PHP-FPM and OPcache set up for production
  • Your production .env configured and locked down
  • Supervisor for queue workers, and cron for the Laravel scheduler
  • A UFW firewall with only the ports you need open
  • Fail2ban against SSH brute-force attempts
  • A written summary of every change I made

Optional extras: a deploy pipeline, Redis for cache and sessions, several apps on one VPS, MongoDB, or a move from one host to another.

Laravel deployment on a VPS

For a Laravel app I build the LEMP stack from scratch, write an Nginx server block for your domain, match PHP-FPM to your PHP version, install dependencies with production flags and fix storage and cache permissions. I run config, route and view caching because they cost nothing and speed up every request. Supervisor keeps queue workers alive after crashes and reboots. A dead worker fails silently, and you only notice when a customer's email never arrives. I also add security headers in Nginx, such as X-Frame-Options, X-Content-Type-Options and Referrer-Policy.

The same process is written out step by step in my guide to deploying Laravel on a VPS, if you'd like to try it yourself first.

MERN stack deployment

MERN apps fail in different places. The usual problem is Node.js started straight from an SSH session, so the backend dies when the session closes. I run Express.js under PM2, which restarts it after a crash or reboot and keeps logs, and I put Nginx in front as a reverse proxy so traffic on ports 80 and 443 reaches Node. The React build is served by Nginx or sits on the same domain, depending on your setup. For MongoDB I either configure Atlas access or install a local instance with authentication and a locked bind address.

I used this setup on my own open source MERN stack agile board, which runs on a VPS behind an Apache reverse proxy.

Where I deploy

Laravel on DigitalOcean

Most of my deployments are on DigitalOcean Droplets. I start with Ubuntu 22.04, add a non-root sudo user, turn off root SSH login and set up UFW before anything else. I've also used Managed Databases and Spaces with Laravel. For Snipe-IT v6 on DigitalOcean, server response times dropped 35%.

Hostinger VPS

A good low-cost option for solo projects and early startups. I've deployed several Laravel apps on Hostinger's Ubuntu plans, and the setup matches DigitalOcean.

AWS EC2 and Lightsail

EC2 with proper security groups and Elastic IPs, S3 for files and RDS for MySQL. Lightsail suits smaller apps that need AWS without the full EC2 setup.

cPanel and shared hosting

Harder, but workable. The trouble is nearly always the same four things: the wrong document root, the wrong PHP version, Composer missing from the path, and symlinks for the public folder. If your host gives SSH access, I can usually get Laravel running.

Deploy pipelines (CI/CD)

If you deploy often, manual SSH becomes a bottleneck. I set up GitHub Actions or Bitbucket Pipelines to run on every push to main. It pulls the latest code, runs migrations, clears caches and restarts queue workers. It's optional and adds time to the job, but it pays off for teams that ship more than once a week.

Server errors I fix

  • A 403 or 404 right after deployment: usually the web server root isn't pointing at Laravel's public folder, or the Nginx location rules are missing.
  • A 500 error on the server that never happens locally: permissions on storage and bootstrap/cache, a missing .env or APP_KEY, or a PHP extension that exists locally but not on the server.
  • A Node.js app that goes down at random: PM2 isn't running it, or it isn't saved to survive reboots. The fix is pm2 startup and pm2 save.
  • SSL is installed but the browser says "not secure": mixed content behind a proxy. The app needs to trust the proxy and force HTTPS.
  • The database works locally but not on the server: the MySQL bind address blocks the connection, or the host in .env should be 127.0.0.1 instead of localhost.
  • The deploy pipeline fails: the SSH key isn't in authorized_keys, a path is wrong, or a step is waiting for input.

How we work together

  • One-time deployment: fixed scope and price. Most standard deployments take 4 to 8 hours.
  • Emergency fix: production is down. I respond within a few hours during Pakistan working hours (PKT, UTC+5).
  • Monthly support: server changes, security patches and uptime monitoring for teams that want someone on call.

Paid work runs through Upwork, which protects payment for both of us. To start, I need your domain, access to the server or hosting account, your code repository and a short note on the stack.

What I don't do

I don't change application code during a deployment. If bugs are blocking launch, that is separate work, which I can do under maintenance and bug fixing or as part of a full stack web development project. I also don't use Forge, Ploi or similar tools. I configure the server directly, so you end up with a setup you can read and maintain.

Get your app live

If your app is built and needs to go live, or your current server is a mess you're afraid to touch, send the details through the contact form or message me on Upwork. I reply within 24 hours. You can see examples of my work on the portfolio page and the rest of what I offer on the services page.

Common questions about this service

Most standard deployments take 4 to 8 hours. A server with several apps, a pipeline or a migration from another host takes longer, and I give an estimate before starting.

Yes. I can audit and clean up a server you already run, or start fresh on a new one, whichever is safer for your app.

Yes. These are the most common first-deployment errors. They usually come from the web server root, file permissions or a missing .env value, and I can trace the cause from the server logs.

Yes, if your host gives SSH access. I fix the document root, PHP version and Composer problems that usually block Laravel there.

No. I configure the server directly and write down every change, so you aren’t dependent on a third-party tool.

Your domain, access to the server or hosting account, your code repository and a short note on the stack (Laravel, MERN or both).
Category

Infrastructure & Maintenance


Interested in this service for your project?

Get a Quote
Also available on Upwork Profile

Ready to build something great?

Tell me about your project and I'll get back with a plan within 24 hours.