Skip to content

Deployment Overview of OutlineVPN on Server

Prerequisites and Basic Requirements

To successfully deploy OutlineVPN, the following system prerequisites must be met:

  • Operating System: Ubuntu (supported by the provided installation scripts).

  • Privileges: Root or sudo access is required to execute installation scripts and manage Docker containers.

  • Domain: The application is configured for the hostkey.in zone.

  • Packages: The system must have curl installed or capable of installing it via apt.

FQDN of the Final Panel

The application is accessible via the following Fully Qualified Domain Name (FQDN) format:

  • FQDN: <OutlineVPN>Server ID.hostkey.in

  • Port: The service is exposed through standard HTTP/HTTPS ports managed by the Nginx reverse proxy.

File and Directory Structure

The deployment utilizes the following directory locations for configurations, data, and scripts:

  • Nginx Configuration Directory: /root/nginx/

  • Docker Compose File: /root/nginx/compose.yml

  • Nginx User Configuration: /data/nginx/user_conf.d/OutlineVPN<Server ID>.hostkey.in.conf

  • SSL Certificates Volume: Mounted at /etc/letsencrypt inside the Nginx container, linked to the host volume nginx_secrets.

  • Outline Installation Script: /root/install_outline.sh

  • API Key Storage: /root/outline_api_key.txt

Application Installation Process

OutlineVPN is installed using the official installation script provided by Jigsaw. The process involves the following steps:

  1. Install required system packages using the apt package manager:

    apt update && apt install -y curl
    

  2. Download the official Outline installation script:

    curl -O https://raw.githubusercontent.com/Jigsaw-Code/outline-server/master/src/server_manager/install_scripts/install_server.sh
    

  3. Save the script to /root/install_outline.sh and set executable permissions:

    chmod 755 /root/install_outline.sh
    

  4. Execute the installation script:

    /root/install_outline.sh
    

  5. Upon completion, the Outline API key and server IP are automatically saved to /root/outline_api_key.txt.

Docker Containers and Their Deployment

A reverse proxy container is deployed using Docker Compose to handle SSL termination and routing.

  • Container Name: nginx

  • Image: jonasal/nginx-certbot:latest

  • Restart Policy: unless-stopped

  • Network Mode: host

  • Configuration File Location: /root/nginx/compose.yml

To start the proxy container, navigate to the configuration directory and run:

cd /root/nginx
docker compose up -d

Proxy Servers

The deployment utilizes Nginx with Certbot for SSL management.

  • SSL Provider: Let's Encrypt (managed via Certbot inside the Docker container).

  • Contact Email: [email protected] (configured in the container environment).

  • Routing: The Nginx container proxies traffic to the Outline application running on the host.

  • Proxy Destination: Traffic is forwarded to http://127.0.0.1:8080 for the location / block.

  • Environment Variables: Loaded from /data/nginx/nginx-certbot.env.

The Nginx configuration specifically updates the proxy pass directive in the location file:

location / {
    proxy_pass http://127.0.0.1:8080;
}

Permission Settings

File and directory permissions are set as follows during the deployment:

Path Owner Group Mode
/root/nginx root root 0755
/root/nginx/compose.yml root root 0644
/root/install_outline.sh root root 0755
/root/outline_api_key.txt root root 0600

Available Ports for Connection

The following ports are utilized by the deployment:

  • Port 8080: Internal port used by the Outline application, proxied via Nginx.

  • Port 80 and 443: Standard HTTP/HTTPS ports managed by the Nginx reverse proxy for external access and SSL handshakes.

Starting, Stopping, and Updating

Management of the Nginx proxy container is handled via Docker Compose commands.

  • Start/Restart:

    cd /root/nginx
    docker compose up -d
    

  • Stop:

    cd /root/nginx
    docker compose down
    

  • Update: To update the Nginx container image, pull the latest version and restart:

    cd /root/nginx
    docker compose pull
    docker compose up -d
    

Note: The Outline VPN application itself is managed by the service installed via /root/install_outline.sh. Specific service commands for Outline (e.g., systemctl status outline) depend on the default behavior of the installer script, which typically integrates with the system service manager.

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×