Deploying Outline Server
Introduction
Outline is an open-source VPN solution developed by Jigsaw, a technology incubator within Google. Designed for simplicity and security, Outline makes it easy to create and share VPN access without the complexity of traditional VPN configurations. The server runs Shadowsocks, providing encrypted proxy connections that are difficult to detect and block.
Outline consists of two components: the Outline Manager for server administration and the Outline Client for connecting. The Manager generates access keys that users import into the Client app, enabling VPN access with a single click. This design makes Outline ideal for journalists, activists, and organizations that need secure internet access in restrictive environments.
Key highlights of Outline:
- Easy Setup: Deploy a VPN server in minutes
- One-Click Access: Share access keys that configure clients automatically
- Cross-Platform: Clients for Windows, macOS, Linux, iOS, and Android
- Shadowsocks Protocol: Encrypted, resistant to detection and blocking
- No Logs: Designed with privacy in mind, minimal data retention
- Open Source: Fully auditable codebase
- Data Limits: Optional per-key data limits for fair usage
- Multiple Keys: Create separate access keys for different users
- Self-Hosted: Full control over your VPN infrastructure
- Free: No licensing costs or subscription fees
This guide walks through deploying Outline Server on Klutch.sh using Docker, creating access keys, and distributing VPN access to users.
Why Deploy Outline on Klutch.sh
Deploying Outline on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh automatically builds and deploys your VPN server. Push to GitHub, and your server deploys without manual intervention.
Persistent Configuration: Attach persistent volumes for server configuration and access keys. Your VPN setup survives container restarts.
Reliable Uptime: Your VPN server runs 24/7 with consistent availability.
Geographic Options: Choose deployment regions for optimal latency or to access region-specific content.
Scalable Resources: Allocate bandwidth and resources based on expected usage.
Custom Domains: Optionally use custom domains for management access.
Privacy: Keep your VPN infrastructure under your control.
Prerequisites
Before deploying Outline on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Outline configuration
- Basic familiarity with Docker and containerization concepts
- Outline Manager application (for server management)
- Outline Client for testing connections
Understanding Outline Architecture
Outline uses a simple architecture:
Shadowsocks Server: Handles encrypted proxy connections from clients using the Shadowsocks protocol.
Management API: HTTPS API for creating and managing access keys, secured with TLS certificates.
Outline Manager: Desktop application that communicates with the Management API to administer the server.
Outline Client: Applications for various platforms that connect to the server using access keys.
Preparing Your Repository
Create a GitHub repository containing your Dockerfile and configuration.
Repository Structure
outline-deploy/├── Dockerfile├── .dockerignore└── README.mdCreating the Dockerfile
Create a Dockerfile for Outline:
FROM quay.io/outline/shadowbox:stable
# Create persistent data directoryRUN mkdir -p /opt/outline
# Outline uses these ports:# - 8080: Management API (HTTPS)# - 443: Default Shadowsocks port (can vary)EXPOSE 8080EXPOSE 443
# Persisted state directoryENV SB_STATE_DIR=/opt/outline/persisted-state
# Use the default entrypointEnvironment Variables Reference
| Variable | Description |
|---|---|
SB_STATE_DIR | Directory for persisted server state |
SB_API_PORT | Management API port (default: 8080) |
SB_API_PREFIX | API URL prefix |
SB_CERTIFICATE_FILE | Custom TLS certificate path |
SB_PRIVATE_KEY_FILE | Custom TLS private key path |
Deploying Outline on Klutch.sh
Follow these steps to deploy your Outline VPN server:
- Port 8080: Management API (HTTPS)
- Port 443: Shadowsocks connections (or custom port)
- View deployment logs
- Look for the API URL with the unique prefix
- Note the certificate fingerprint
- Save these for the Outline Manager
- Click “Add a server”
- Select “Set up Outline anywhere”
- Paste the management URL
- Verify the certificate fingerprint
- Connect to your server
Push Your Repository to GitHub
Initialize and push your repository:
git initgit add Dockerfile .dockerignore README.mdgit commit -m "Initial Outline Server configuration"git remote add origin https://github.com/yourusername/outline-deploy.gitgit push -u origin mainCreate a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project named “outline” or “vpn”.
Create a New App
Within your project, create a new app. Connect your GitHub account and select the repository containing your Outline Dockerfile.
Configure Network Traffic
Configure ports for your deployment:
Note: Outline may require TCP/UDP passthrough. Verify Klutch.sh supports the required network configuration.
Attach Persistent Volumes
Add persistent storage:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/opt/outline/persisted-state | 1 GB | Server state and access keys |
Deploy Your Application
Click Deploy to start the build process.
Retrieve Management Credentials
After deployment, access the container logs to find the Management API URL and credentials:
Connect Outline Manager
Open Outline Manager:
Using Outline Manager
Creating Access Keys
Generate keys for users:
- Open Outline Manager
- Select your server
- Click “Add key”
- Name the key (e.g., “John’s Phone”)
- Copy or share the access link
Sharing Access Keys
Distribute VPN access:
- Generate an access key
- Click “Share” on the key
- Copy the access link
- Send to the user securely
The access link contains everything needed to configure the client.
Managing Data Limits
Set per-key data limits:
- Click on a key in the Manager
- Click the data limit setting
- Set a monthly limit (e.g., 10 GB)
- Save the limit
Renaming Keys
Identify keys easily:
- Click on a key
- Click the name to edit
- Enter a descriptive name
- Save
Revoking Access
Remove user access:
- Find the key in Outline Manager
- Click the delete button
- Confirm deletion
- The key is immediately invalidated
Client Setup
Installing Outline Client
Download the Outline Client:
- Official Downloads
- Windows, macOS, Linux, iOS, Android
Connecting with an Access Key
Use an access key:
- Open Outline Client
- Click “Add server” or the + button
- Paste the access link
- The server is added and connected automatically
Managing Connections
Client features:
- Connect/disconnect with one tap
- Multiple server support
- Auto-reconnect on network changes
- Traffic statistics
Advanced Configuration
Custom Ports
Use non-standard ports:
- Modify the Dockerfile to expose different ports
- Configure Shadowsocks to use the custom port
- Update firewall rules accordingly
Custom Domain
Use your domain for the management API:
- Configure DNS to point to your server
- Provide custom TLS certificates
- Update the API URL in Outline Manager
Metrics and Monitoring
Monitor server usage:
- Outline Manager shows per-key data usage
- View total server bandwidth
- Monitor active connections
Security Best Practices
Access Key Management
- Create individual keys for each user
- Use descriptive names for easy management
- Regularly audit active keys
- Delete unused keys promptly
Server Security
- Keep the server image updated
- Monitor for unusual traffic patterns
- Use data limits to prevent abuse
- Review logs periodically
Communication Security
- Share access links securely
- Avoid posting keys publicly
- Use encrypted channels for distribution
- Consider key expiration for temporary access
Use Cases
Personal VPN
Use Outline for personal privacy:
- Secure public WiFi connections
- Access region-restricted content
- Bypass network restrictions
Organization VPN
Provide team access:
- Create keys for each team member
- Set appropriate data limits
- Revoke access when members leave
Journalism and Activism
Protect communications:
- Distribute keys to trusted contacts
- Evade network censorship
- Maintain anonymous connections
Troubleshooting Common Issues
Cannot Connect to Server
Symptoms: Outline Client fails to connect.
Solutions:
- Verify server is running
- Check port accessibility
- Ensure access key is valid
- Try a different network
Manager Cannot Connect
Symptoms: Outline Manager shows connection error.
Solutions:
- Verify API URL is correct
- Check certificate fingerprint matches
- Ensure port 8080 is accessible
- Review server logs
Slow Connections
Symptoms: VPN connection is slow.
Solutions:
- Check server resource allocation
- Verify bandwidth is not limited
- Try connecting to a different port
- Check for network congestion
Keys Not Working
Symptoms: New keys fail to connect.
Solutions:
- Verify key was generated successfully
- Check server is reachable
- Ensure client app is updated
- Regenerate the key if needed
Additional Resources
- Outline Official Website
- Outline Server GitHub Repository
- Outline Client GitHub Repository
- Shadowsocks Protocol
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Deploying Outline on Klutch.sh provides a simple, secure VPN solution that you control. With easy access key distribution and cross-platform clients, Outline makes VPN access accessible to everyone.
The combination of persistent storage for server state, reliable uptime, and flexible network configuration makes Klutch.sh suitable for hosting Outline. Whether protecting personal browsing or providing secure access for an organization, your self-hosted VPN gives you privacy and control.
Generate access keys, share them with your users, and enjoy secure, encrypted internet access anywhere.