Deployment Overview of OutlineVPN on Server¶
Prerequisites and Basic Requirements¶
The following requirements must be met before deploying OutlineVPN on the server:
-
Operating System: Ubuntu (implied by package manager usage in installation tasks).
-
Privileges: Root access is required to execute installation scripts and manage Docker containers.
-
Domain: The server must be configured to resolve the
hostkey.inzone. -
Ports: Port 8080 is used internally for the OutlineVPN manager, while ports 80 and 443 are required for the Nginx proxy and SSL termination.
FQDN of the Final Panel¶
The OutlineVPN management panel is accessible via the following Fully Qualified Domain Name (FQDN) format:
OutlineVPN<Server ID>.hostkey.in
The service listens on the standard HTTP/HTTPS ports managed by the Nginx proxy.
File and Directory Structure¶
The deployment utilizes the following directory structure for configuration, data, and certificates:
-
/root/nginx/: Contains the Docker Compose configuration for the proxy. -
/root/install_outline.sh: The installation script downloaded from the official repository. -
/root/outline_api_key.txt: Stores the generated API key and server IP address. -
/data/nginx/user_conf.d/: Contains custom Nginx configuration files for the specific server instance. -
/data/nginx/nginx-certbot.env: Environment file for the Nginx-Certbot container. -
/etc/letsencrypt/: Mount point for SSL certificates managed by the Docker volumenginx_secrets.
Application Installation Process¶
The OutlineVPN server is installed using the official installation script provided by Jigsaw. The process involves the following steps:
-
Install the
curlpackage using the system package manager. -
Download the installation script from
https://raw.githubusercontent.com/Jigsaw-Code/outline-server/master/src/server_manager/install_scripts/install_server.shto/root/install_outline.sh. -
Execute the script with root privileges:
-
Upon successful execution, the script outputs the API key and server IP, which are automatically saved to
/root/outline_api_key.txt.
Docker Containers and Their Deployment¶
The reverse proxy and SSL certificate management are handled by Docker containers defined in a Compose file.
Docker Compose Configuration¶
The configuration file is located at /root/nginx/compose.yml. It defines a single service named nginx using the jonasal/nginx-certbot:latest image.
Service Parameters¶
| Parameter | Value |
|---|---|
| Image | jonasal/nginx-certbot:latest |
| Restart Policy | unless-stopped |
| Network Mode | host |
| Email for Certbot | [email protected] |
| Environment File | /data/nginx/nginx-certbot.env |
Volume Mounts¶
-
nginx_secrets: Mounted to/etc/letsencryptinside the container (external volume). -
/data/nginx/user_conf.d: Mounted to/etc/nginx/user_conf.dinside the container.
Deployment Command¶
To start the proxy services, execute the following command from the configuration directory:
This command is executed from the/root/nginx directory. Proxy Servers¶
Nginx acts as the reverse proxy for the OutlineVPN manager, handling SSL termination via Certbot.
Configuration Details¶
-
Proxy Target: The Nginx configuration forwards traffic to the OutlineVPN manager running locally on port 8080.
-
Configuration File: The specific server configuration is located at
/data/nginx/user_conf.d/OutlineVPN<Server ID>.hostkey.in.conf. -
Routing Rule: The
location /block contains the directiveproxy_pass http://127.0.0.1:8080;. -
SSL: Certificates are automatically managed by the
nginx-certbotcontainer and stored in thenginx_secretsvolume.
Permission Settings¶
The following permissions are applied to critical files and directories:
-
/root/nginx/: Mode0755, owned byroot:root. -
/root/nginx/compose.yml: Mode0644, owned byroot:root. -
/root/outline_api_key.txt: Mode0600, owned byroot. -
/root/install_outline.sh: Mode0755.
Location of Configuration Files and Data¶
Key configuration and data files are stored in the following locations:
-
Docker Compose:
/root/nginx/compose.yml -
Nginx Custom Config:
/data/nginx/user_conf.d/OutlineVPN<Server ID>.hostkey.in.conf -
Certbot Environment:
/data/nginx/nginx-certbot.env -
API Credentials:
/root/outline_api_key.txt -
SSL Certificates: Managed within the Docker volume
nginx_secrets(mounted at/etc/letsencryptin the container).
Available Ports for Connection¶
The following ports are utilized by the deployment:
-
8080: Internal port for the OutlineVPN Manager API (proxied by Nginx).
-
80: HTTP traffic for the Nginx proxy (used for SSL redirection and Let's Encrypt validation).
-
443: HTTPS traffic for the Nginx proxy (secure access to the OutlineVPN Manager).
Starting, Stopping, and Updating¶
The proxy services are managed via Docker Compose.
Start Services¶
To start the Nginx and Certbot containers:
Stop Services¶
To stop the containers:
Update Services¶
To update the containers to the latest image version: