Urgent.News

What's breaking now, across thousands of outlets.

Tech

How to Deploy a Full-Stack App on a VPS with Peon

Deploying a full-stack application on a VPS gives you control over your infrastructure without locking your application into a managed cloud platform. You can run your frontend, backend, database, and supporting services on your own Linux server while keeping your hosting costs predictable. How to Deploy a Full-Stack App on a VPS with Peon The challenge is that traditional VPS deployment often…

Deploying a full-stack application on a Virtual Private Server (VPS) offers control over the infrastructure without being tied to a managed cloud platform. This allows running frontend, backend, database, and supporting services on one Linux server while keeping hosting costs predictable. However, traditional VPS deployment often involves configuring SSH access, Docker, reverse proxies, SSL certificates, domains, environment variables, and deployment scripts manually.

Peon simplifies this process by connecting to a Linux server over SSH, provisioning the deployment environment, and allowing deployment of applications from Git with a streamlined developer experience.

To deploy a full-stack application on a VPS using Peon, Git, Docker, Nixpacks, Traefik, and Peon, follow these steps:

1. Prepare your full-stack application:

Ensure that your application works locally. A typical project structure might include frontend and backend code, a configuration file, and a README.

2. Push your application to GitHub:

If your application isn't already in Git, initialize it and push it to a GitHub repository. This repository will serve as the source for Peon's deployment.

3. Create a VPS:

Provision a Linux VPS with at least 1 GB RAM for a small application, depending on the application size, database, traffic, and number of services. You can choose any Linux VPS provider, such as DigitalOcean.

4. Create an SSH key:

Generate an SSH key pair for Peon to connect to your VPS. Make sure not to commit the private key to your Git repository or include it in your application.

5. Add the SSH key to Peon:

In your Peon dashboard, create a new SSH/private key by pasting your private key. Give the key a recognizable name and save it.

6. Add your VPS to Peon:

In Peon, add your server details, such as the server name, IP address, port, user (root), and the SSH key created in the previous step. Peon will validate the connection and provision the server.

7. Connect GitHub to Peon:

Finally, connect your GitHub repository to Peon. This lets Peon deploy applications directly from Git repositories. Once connected, you can implement a push-to-deploy workflow, where changes to the repository trigger automatic deployments.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Monday 24 August →