Skip to content

Deployment Overview of Outline on Server

Prerequisites and Basic Requirements

The deployment of Outline requires a server running the Ubuntu operating system. The installation process necessitates root privileges to execute system-level commands and manage Docker containers. The following components must be available:

  • Operating System: Ubuntu
  • Privileges: Root access (sudo or direct root login)
  • Network: Access to the internet to download the installation script and Docker images
  • Ports: Port 8080 is utilized internally for the Outline server proxy pass

File and Directory Structure

The deployment establishes specific directories and files to manage the application and its reverse proxy configuration. The key locations include:

  • /root/install_outline.sh: The downloaded installation script for Outline.
  • /root/outline_api_key.txt: A secure file storing the generated API key and server IP address.
  • /root/nginx/: The directory containing the Docker Compose configuration for the reverse proxy.
  • /root/nginx/compose.yml: The Docker Compose file defining the Nginx and Certbot services.
  • /data/nginx/user_conf.d/: The directory containing custom Nginx configuration files for specific host keys.
  • /data/nginx/nginx-certbot.env: The environment file containing configuration variables for the Nginx container.
  • /etc/letsencrypt/: The mount point for SSL certificates managed by Certbot.

Application Installation Process

The Outline application is installed using an official installation script provided by the developers. The process involves downloading the script and executing it to set up the server environment.

  1. Install the curl package to enable script downloading.
  2. Download the installation script from the official Jigsaw repository to /root/install_outline.sh.
  3. Execute the script using the command /root/install_outline.sh.
  4. 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 deployment utilizes Docker to run the Nginx reverse proxy and Certbot for SSL certificate management. The container configuration is defined in a Docker Compose file located at /root/nginx/compose.yml.

The nginx service is configured with the following parameters: - Image: jonasal/nginx-certbot:latest - Restart Policy: unless-stopped - Network Mode: host - Environment Variables: - CERTBOT_EMAIL: Set to [email protected] - Additional variables are loaded from /data/nginx/nginx-certbot.env - Volumes: - nginx_secrets: Mounted to /etc/letsencrypt for certificate storage. - /data/nginx/user_conf.d: Mounted to /etc/nginx/user_conf.d for custom configurations.

To start the containers, the command docker compose up -d is executed within the /root/nginx directory.

Proxy Servers

A reverse proxy is implemented using Nginx with integrated Certbot support to handle SSL/TLS termination. The proxy configuration is customized to forward traffic to the Outline server.

  • Proxy Target: Traffic is forwarded to http://127.0.0.1:8080.
  • Configuration File: The specific proxy pass rule is added to the file located at /data/nginx/user_conf.d/{prefix}{server_id}.hostkey.in.conf.
  • Location Block: The proxy_pass directive is inserted immediately after the location / { block in the configuration file.
  • SSL Management: Certbot automatically manages SSL certificates, storing them in the nginx_secrets volume.

Starting, Stopping, and Updating

The Docker containers for the proxy server are managed using Docker Compose commands executed from the /root/nginx directory.

  • Start: Run docker compose up -d to start the services in detached mode.
  • Stop: Run docker compose down to stop and remove the containers.
  • Update: To update the container images, pull the latest version of the jonasal/nginx-certbot image and restart the services using docker compose up -d.

The Outline server itself is managed by the installation script and runs as a background service; specific service management commands for Outline are handled by the underlying system service manager configured during the initial script execution.

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