How to Set Up Outline VPN with Docker
Set up your own Outline VPN server on a Linux VPS with Docker: install Docker, run the Outline install script, open the ports and connect with Outline Manager.
Outline is an open-source VPN from Jigsaw that runs as Docker containers on your own server. You manage it with the Outline Manager desktop app and share access keys with your users, who connect with the Outline Client. This guide sets up an Outline VPN server on a Linux VPS.
What you need
- A Linux VPS with root or sudo access, such as a StealthRDP Linux VPS.
- A local computer with Outline Manager installed (Windows, macOS or Linux).
- Use of a VPN must follow your local law and the StealthRDP use of service terms.
Install Docker
Outline runs in Docker. If Docker is not installed, install it with Docker's convenience script:
curl -fsSL https://get.docker.com | sudo sh
sudo systemctl enable --now dockerCheck that Docker is running:
sudo systemctl status dockerThe output must show active (running). If you skip this step, the Outline install script offers to install Docker for you.
Run the Outline install script
Open Outline Manager, choose Set up Outline anywhere, and copy the install command it shows. At the time of writing, it is:
sudo bash -c "$(wget -qO- https://raw.githubusercontent.com/OutlineFoundation/outline-apps/master/server_manager/install_scripts/install_server.sh)"Run it on the server. The script creates secret keys and starts two containers: shadowbox (the VPN server) and watchtower (which keeps it updated).
Open the firewall ports
When the script finishes, it prints the two ports it uses:
- a management port (TCP), used by Outline Manager;
- an access key port (TCP and UDP), used by VPN clients.
If you use ufw, allow both, replacing the numbers with the ones the script printed:
sudo ufw allow 12345/tcp
sudo ufw allow 23456/tcp
sudo ufw allow 23456/udpConnect Outline Manager
The script ends with a line like this:
{ "apiUrl": "https://[your-server-ip]:12345/xxxxxxxx", "certSha256": "xxxxxxxx" }Copy the whole line into Outline Manager and click Done.
Keep this line private. Anyone with it can manage your server.
Share access keys
Outline Manager creates a first key called My access key. Create one key per person, click Share, and send the key. Each user installs the Outline Client on their device and adds the key to connect.
Troubleshooting
- Outline Manager cannot connect: check that the management port is open in every firewall and that the
shadowboxcontainer is running withsudo docker ps. - Clients connect but have no internet: check that the access key port is open for both TCP and UDP.
