Skip to content

Quickstart/Installation

Get Started with LocalCloud: Securely Deploy Your First Project in Minutes

LocalCloud streamlines your deployment process using Git, eliminating the need to learn new commands or configuration files. This guide will walk you through installing LocalCloud on virtually any cloud, bare metal, or on-premise server.

Preparing for Your First Project Deployment

What You Need:

Server Requirements:

  • A new server (VPS, Public Cloud, Dedicated Server, etc.) with a public IP, SSH access, and Ubuntu 22.04.
  • We recommend using LocalCloud’s fully managed servers or providers like Scaleway, OVH, or DigitalOcean for a simpler and more affordable experience compared to AWS, GCP, or Azure.

Domain Setup:

  • A custom domain and access to its DNS records.

Docker:

Deploy Your Web Project in 5 Simple Steps

1. DNS Configuration:

  • Update the DNS A record with your server's public IP address. This is usually done on the website where you purchased your domain.
    • For instance, if your server's IP is 153.111.51.139 and your domain is project.com, set an A record like lighthouse.project.com -> 153.111.51.139. Replace these with your actual IP and domain.

2. Server Access:

  • SSH into your server:
ssh root@<ip_of_your_server>

3. LocalCloud Agent Installation:

  • Run the following command to install the LocalCloud agent (replace <your_domain> with your actual domain, e.g., lighthouse.project.com):
curl <https://localcloud.dev/install> | sh -s -- -d <your_domain>

Note: is used for adding new servers and local machines, as well as handling webhooks from Bitbucket, GitHub, etc. Format it without http or https (e.g., lighthouse.project.com or agent.domain.com).

4. Finalizing Installation:

  • Once the LocalCloud agent completes the server setup, run:
localcloud

5. Deploying Your Project:

  • Choose "New Service/App" to deploy a web project. Follow the simple 3-step guide provided.
  • For LocalCloud CLI installation on local machines or adding a new server, select "Servers/Local Machines."

What LocalCloud Installs/Sets Up on a Server:

  • VPN: Nebula overlay network for secure connections.
  • Proxy Server & Load Balancer: Caddy Server with automatic TLS certificates (HTTPS/WSS).
  • Web Application Firewall (WAF): OWASP-recommended ruleset for attack mitigation.
  • Rate Limiter: Protect apps and services against DDoS attacks.
  • Docker: Container management.
  • iptables & ufw: Network security rules.
  • Container Registry: No need for an external container registry.
  • Redis: Data management across servers.
  • LocalCloud Agent: Core functionality.

Rate Limiter Setup (Experimental)

To set rate limits for your project:

  1. SSH into a server and add the rate_limit section to /etc/caddy/Caddyfile.
  2. Example for a web app at app.domain.com:
app.domain.com {
    coraza_waf {
        load_owasp_crs
        directives `
            Include @coraza.conf-recommended
            Include @crs-setup.conf.example
            Include @owasp_crs/*.conf
            SecRuleEngine On
        `
    }

    rate_limit {
        zone dynamic {
            key    {remote_host}
            events 2
            window 15s
        }
        log_key
    }

    reverse_proxy * 192.168.202.1:6000
}

  1. Reload Caddy after adding the rate_limit section:
caddy reload -c /etc/caddy/Caddyfile

For full documentation on configuring a rate limiter, visit the Caddy Rate Limiter documentation.

Need help? Our support team is here for you. Reach out at hey@localcloud.dev