Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Streisand sets up a new server running your choice of L2TP/IPsec, OpenConnect, OpenSSH, OpenVPN, Shadowsocks, sslh, Stunnel, a Tor bridge, and WireGuard. It also generates custom instructions for all of these services. At the end of the run you are given an HTML file with instructions that can be shared with friends, family members, and fellow activists.

Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402 (2 ratings)
Rated 5.0 out of 5
Subscribe to updates I use streisand

Statistics on streisand

Number of watchers on Github 13251
Number of open issues 59
Average time to close an issue 16 days
Main language Python
Average time to merge a PR 5 days
Open pull requests 39+
Closed pull requests 34+
Last commit over 1 year ago
Repo Created over 5 years ago
Repo Last Updated over 1 year ago
Size 2.87 MB
Organization / Authorstreisandeffect
Page Updated
Do you use streisand? Leave a review!
View open issues (59)
View streisand activity
View on github
Fresh, new opensource launches πŸš€πŸš€πŸš€
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating streisand for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)
What people are saying about streisand Leave a review
It makes it easy.

Streisand Logo

English, Franais, , | Mirror

Build Status Twitter


Silence censorship. Automate the effect.

The Internet can be a little unfair. It's way too easy for ISPs, telecoms, politicians, and corporations to block access to the sites and information that you care about. But breaking through these restrictions is tough. Or is it?

Introducing Streisand

  • A single command sets up a brand new Ubuntu 16.04 server running a wide variety of anti-censorship software that can completely mask and encrypt all of your Internet traffic.
  • Streisand natively supports the creation of new servers at Amazon EC2, Azure, DigitalOcean, Google Compute Engine, Linode, and Rackspaceβ€”with more providers coming soon! It also runs on any Ubuntu 16.04 server regardless of provider, and hundreds of instances can be configured simultaneously using this method.
  • The process is completely automated and only takes about ten minutes, which is pretty awesome when you consider that it would require the average system administrator several days of frustration to set up even a small subset of what Streisand offers in its out-of-the-box configuration.
  • Once your Streisand server is running, you can give the custom connection instructions to friends, family members, and fellow activists. The connection instructions contain an embedded copy of the server's unique SSL certificate, so you only have to send them a single file.
  • Each server is entirely self-contained and comes with absolutely everything that users need to get started, including cryptographically verified mirrors of all common clients. This renders any attempted censorship of default download locations completely ineffective.
  • But wait, there's more...

More Features

  • Nginx powers a password-protected and encrypted Gateway that serves as the starting point for new users. The Gateway is accessible over SSL, or as a Tor hidden service.
    • Beautiful, custom, step-by-step client configuration instructions are generated for each new server that Streisand creates. Users can quickly access these instructions through any web browser. The instructions are responsive and look fantastic on mobile phones.
    • The integrity of mirrored software is ensured using SHA-256 checksums, or by verifying GPG signatures if the project provides them. This protects users from downloading corrupted files.
    • All ancillary files, such as OpenVPN configuration profiles, are also available via the Gateway.
    • Current Tor users can take advantage of the additional services Streisand sets up in order to transfer large files or to handle other traffic (e.g. BitTorrent) that isn't appropriate for the Tor network.
    • A unique password, SSL certificate, and SSL private key are generated for each Streisand Gateway. The Gateway instructions and certificate are transferred via SSH at the conclusion of Streisand's execution.
  • Distinct services and multiple daemons provide an enormous amount of flexibility. If one connection method gets blocked there are numerous options available, most of which are resistant to Deep Packet Inspection.
    • All of the connection methods (including L2TP/IPsec and direct OpenVPN connections) are effective against the type of blocking Turkey has been experimenting with.
    • OpenConnect/AnyConnect, OpenSSH, OpenVPN (wrapped in stunnel), Shadowsocks, Tor (with obfsproxy and the obfs4 pluggable transport), and WireGuard are all currently effective against China's Great Firewall.
  • Every task has been thoroughly documented and given a detailed description. Streisand is simultaneously the most complete HOWTO in existence for the setup of all of the software it installs, and also the antidote for ever having to do any of this by hand again.
  • All software runs on ports that have been deliberately chosen to make simplistic port blocking unrealistic without causing massive collateral damage. OpenVPN, for example, does not run on its default port of 1194, but instead uses port 636, the standard port for LDAP/SSL connections that are beloved by companies worldwide.
    • L2TP/IPsec is a notable exception to this rule because the ports cannot be changed without breaking client compatibility

Services Provided

  • L2TP/IPsec using Libreswan and xl2tpd
    • A randomly chosen pre-shared key and password are generated.
    • Windows, macOS, Android, and iOS users can all connect using the native VPN support that is built into each operating system without installing any additional software.
  • Monit
    • Monitors process health and automatically restarts services in the unlikely event that they crash or become unresponsive.
  • OpenSSH
    • Windows and Android SSH tunnels are also supported, and a copy of the keypair is exported in the .ppk format that PuTTY requires.
    • Tinyproxy is installed and bound to localhost. It can be accessed over an SSH tunnel by programs that do not natively support SOCKS and that require an HTTP proxy, such as Twitter for Android.
    • An unprivileged forwarding user and SSH keypair are generated for sshuttle and SOCKS capabilities.
  • OpenConnect / Cisco AnyConnect
    • OpenConnect (ocserv) is an extremely high-performance and lightweight VPN server that also features full compatibility with the official Cisco AnyConnect clients.
    • The protocol is built on top of standards like HTTP, TLS, and DTLS, and it's one of the most popular and widely used VPN technologies among large multi-national corporations.
    • This means that in addition to its ease-of-use and speed, OpenConnect is also highly resistant to censorship and is almost never blocked.
  • OpenVPN
    • Self-contained unified .ovpn profiles are generated for easy client configuration using only a single file.
    • Both TCP and UDP connections are supported.
    • Client DNS resolution is handled via Dnsmasq to prevent DNS leaks.
    • TLS Authentication is enabled which helps protect against active probing attacks. Traffic that does not have the proper HMAC is simply dropped.
  • Shadowsocks
    • The high-performance libev variant is installed. This version is capable of handling thousands of simultaneous connections.
    • A QR code is generated that can be used to automatically configure the Android and iOS clients by simply taking a picture. You can tag '' on that concrete wall, or you can glue the Shadowsocks instructions and some QR codes to it instead!
    • AEAD support is enabled using ChaCha20 and Poly1305 for enhanced security and improved GFW evasion.
    • The simple-obfs plugin is installed to provide robust traffic evasion on hostile networks (especially those implementing quality of service (QOS) throttling).
  • sslh
    • Sslh is a protocol demultiplexer that allows Nginx, OpenSSH, and OpenVPN to share port 443. This provides an alternative connection option and means that you can still route traffic via OpenSSH and OpenVPN even if you are on a restrictive network that blocks all access to non-HTTP ports.
  • Stunnel
    • Listens for and wraps OpenVPN connections. This makes them look like standard SSL traffic and allows OpenVPN clients to successfully establish tunnels even in the presence of Deep Packet Inspection.
    • Unified profiles for stunnel-wrapped OpenVPN connections are generated alongside the direct connection profiles. Detailed instructions are also generated.
    • The stunnel certificate and key are exported in PKCS #12 format so they are compatible with other SSL tunneling applications. Notably, this enables OpenVPN for Android to tunnel its traffic through SSLDroid. OpenVPN in China on a mobile device? Yes!
  • Tor
    • A bridge relay is set up with a random nickname.
    • Obfsproxy is installed and configured with support for the obfs4 pluggable transport.
    • A BridgeQR code is generated that can be used to automatically configure Orbot for Android.
  • UFW
    • Firewall rules are configured for every service, and any traffic that is sent to an unauthorized port will be blocked.
  • unattended-upgrades
    • Your Streisand server is configured to automatically install new security updates.
  • WireGuard
    • Linux users can take advantage of this next-gen, simple, kernel-based, state-of-the-art VPN that also happens to be ridiculously fast and uses modern cryptographic principles that all other highspeed VPN solutions lack.


Please read all installation instructions carefully before proceeding.

Important Clarification

Streisand is based on Ansible, an automation tool that is typically used to provision and configure files and packages on remote servers. Streisand automatically sets up another remote server with the VPN packages and configuration.

Streisand will spin up and deploy another server on your chosen hosting provider when you run on your home machine (e.g. your laptop). Usually, you do not run Streisand on the remote server as by default this would result in the deployment of another server from your server and render the first server redundant (whew!).

In some circumstances advanced users may opt to use the local provisioning mode to have the system running Streisand/Ansible configure itself as a Streisand server. This is a configuration mode best reserved for when it isn't possible to install Ansible on your home machine or when your connection to a cloud provider is too unreliable for Ansible's SSH connections.


Complete all of these tasks on your local home machine.

  • Streisand requires a BSD, Linux, or macOS system. As of now, Windows is not supported. All of the following commands should be run inside a Terminal session.
  • Python 2.7 is required. This comes standard on macOS, and is the default on almost all Linux and BSD distributions as well. If your distribution packages Python 3 instead, you will need to install version 2.7 in order for Streisand to work properly.
  • Make sure an SSH public key is present in ~/.ssh/

    • SSH keys are a more secure alternative to passwords that allow you to prove your identity to a server or service built on public key cryptography. The public key is something that you can give to others, whereas the private key should be kept secret (like a password).
    • To check if you already have an SSH public key, please enter the following command at a command prompt.

      ls ~/.ssh

    • If you see an file, then you have an SSH public key.

    • If you do not have an SSH key pair, you can generate one by using this command and following the defaults:


    • If you'd like to use an SSH key with a different name or in a non-standard location, please enter 'yes' when asked if you'd like to customize your instance during installation.

    • Please note: You will need these keys to access your Streisand instance over SSH. Please keep them for the lifetime of the Streisand server.

  • Install Git.

    • On Debian and Ubuntu

      sudo apt-get install git

    • On Fedora

      sudo yum install git

    • On macOS (via Homebrew)

      brew install git

  • Install the pip package management system for Python.

    • On Debian and Ubuntu (also installs the dependencies that are necessary to build Ansible and that are required by some modules)

      sudo apt-get install python-paramiko python-pip python-pycurl python-dev build-essential

    • On Fedora

      sudo yum install python-pip

    • On macOS

      sudo easy_install pip sudo pip install pycurl

  • Install Ansible.

    • On macOS (via Homebrew)

      brew install ansible

    • On BSD or Linux (via pip)

      sudo pip install ansible markupsafe

  • Install the necessary Python libraries for your chosen cloud provider. If you are using the advanced local provisioning mode or the existing server mode you can skip this section.

    • Amazon EC2

      sudo pip install boto boto3

    • Azure

      sudo pip install ansible[azure]

    • DigitalOcean

      sudo pip install dopy==0.3.5

    • Google

      sudo pip install apache-libcloud>=1.17.0

    • Linode

      sudo pip install linode-python

    • Rackspace Cloud

      sudo pip install pyrax

    • Important note if you are using a Homebrew-installed version of Python you should also run these commands to make sure it can find the necessary libraries:

      mkdir -p ~/Library/Python/2.7/lib/python/site-packages echo '/usr/local/lib/python2.7/site-packages' > ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth


  1. Clone the Streisand repository and enter the directory.

    git clone && cd streisand

  2. Execute the Streisand script.


  3. Follow the prompts to choose your provider, the physical region for the server, and its name. You will also be asked to enter API information.

  4. Once login information and API keys are entered, Streisand will begin spinning up a new remote server.

  5. Wait for the setup to complete (this usually takes around ten minutes) and look for the corresponding files in the 'generated-docs' folder in the Streisand repository directory. The HTML file will explain how to connect to the Gateway over SSL, or via the Tor hidden service. All instructions, files, mirrored clients, and keys for the new server can then be found on the Gateway. You are all done!

Running Streisand to Provision Localhost (Advanced)

If you can not run Streisand in the normal manner (running from your client home machine/laptop to configure a remote server) Streisand supports a local provisioning mode. Simply choose Localhost (Advanced) from the menu after running ./streisand.

Note: Running Streisand against localhost can be a destructive action! You will be potentially overwriting configuration files and must be certain that you are affecting the correct machine.

Running Streisand on Other Providers (Advanced)

You can also run Streisand on a new Ubuntu 16.04 server. Dedicated hardware? Great! Esoteric cloud provider? Awesome! To do so, simply choose Existing Server (Advanced) from the menu after running ./streisand and provide the IP address of the existing server when prompted.

The server must be accessible using the $HOME/id_rsa SSH Key, and root is used as the connecting user by default. If your provider requires you to SSH with a different user than root (e.g. ubuntu) specify the ANSIBLE_SSH_USER environmental variable (e.g. ANSIBLE_SSH_USER=ubuntu) when you run ./streisand.

Note: Running Streisand against an existing server can be a destructive action! You will be potentially overwriting configuration files and must be certain that you are affecting the correct machine.

Noninteractive Deployment (Advanced)

Alternative scripts and configuration file examples are provided for noninteractive deployment, in which all of the required information is passed on the command line or in a configuration file.

Example configuration files are found under global_vars/noninteractive. Copy and edit the desired parameters, such as providing API tokens and other choices, and then run the appropriate script.

To deploy a new Streisand server:

  deploy/ \
    --provider digitalocean \
    --site-config global_vars/noninteractive/digitalocean-site.yml

To run the Streisand provisioning on the local machine:

  deploy/ \
    --site-config global_vars/noninteractive/local-site.yml

To run the Streisand provisioning against an existing server:

  deploy/ \
    --ip-address \
    --ssh-user root \
    --site-config global_vars/noninteractive/digitalocean-site.yml

Upcoming Features

  • Easier setup.

If there is something that you think Streisand should do, or if you find a bug in its documentation or execution, please file a report on the Issue Tracker.

Core Contributors

  • Jay Carlson (@nopdotcom)
  • Nick Clarke (@nickolasclarke)
  • Joshua Lund (@jlund)
  • Ali Makki (@alimakki)
  • Daniel McCarney (@cpu)
  • Corban Raun (@CorbanR)


Jason A. Donenfeld deserves a lot of credit for being brave enough to reimagine what a modern VPN should look like and for coming up with something as good as WireGuard. He has our sincere thanks for all of his patient help and high-quality feedback.

We are grateful to Trevor Smith for his massive contributions. He suggested the Gateway approach, provided tons of invaluable feedback, made everything look better, and developed the HTML template that served as the inspiration to take things to the next level before Streisand's public release.

Huge thanks to Paul Wouters of The Libreswan Project for his generous help troubleshooting the L2TP/IPsec setup.

Starcadian's 'Sunset Blood' album was played on repeat approximately 300 times during the first few months of work on the project in early 2014.

streisand open issues Ask a question     (View All Issues)
  • almost 3 years Can't download certificate in Safari.
  • almost 3 years FYI: L2TP/IPsec VPN might not work on Android 6.x/7.x due to SHA-2
  • almost 3 years Shadowsocks CLI fails to connect through GFW on Manjaro Linux
  • almost 3 years Many Connectivity Issues
  • almost 3 years Libreswan compilation error - using all cores
  • almost 3 years Deployed server not coping with IP change
  • almost 3 years [Issues] Shadowsocks OTA
  • almost 3 years Please upgrade shadowsocks-ng to 1.3.1
  • almost 3 years Install on Ubuntu 14.04 in 2016
  • almost 3 years Installation taking over 3 hours, no end in sight
  • almost 3 years Shadowsock "UDP forwarding" problem
  • almost 3 years Mirror Streisand across other public git repositories
  • almost 3 years AnyConnect SSL protocol in favor to Stunnel+OpenVPN
  • almost 3 years Error using stunnel on Android
  • almost 3 years Making a Streisand server resilient to blocking China
  • almost 3 years Is it possible to create use streisand to create a raspbian image?
  • almost 3 years add apt-transport-https to prereqs
  • almost 3 years Shadowsocks on Ubuntu 16.04 armhf doesn't install
  • almost 3 years `xmlto` dependency for libreswan installs texlive
  • almost 3 years Add SmartDNS technology
  • almost 3 years Qubes OS and Streisand
  • almost 3 years Make sure distribution warning is shown on Ubuntu 16.10
  • almost 3 years Shadowsocks - DNS Leak
  • almost 3 years streisand fails to install openvpn role
  • almost 3 years [question] OPENVPN profile for multiple endpoint
  • almost 3 years Locked out of server after Streisand-install "No matching mac found"
  • almost 3 years [feature request] including ZeroTier
  • about 3 years Fresh server doesn't respond to L2TP
  • about 3 years Other Provider Issues
  • about 3 years Update for HostHatch
streisand open pull requests (View All Pulls)
  • made some tasks asynchronous to speed up deployment
  • Add information on upgrading Streisand
  • Openvpn UDP configurations
  • Create option to use FQDN for streisand server certificates
  • Fixes issue #355
  • Add badges
  • Use environment variable as default for DO token
  • [AWS] Add autorecover alarm
  • Add documentation on verifying certificate authority
  • Create and reference streisand-users mailing list
  • `pycurl required for this module` error on OS X also
  • Update AWS auto-recovery conditions
  • Proof of concept Docker run based install.
  • UFW: open udp port for Shadowsocks.
  • Uses default values in template to avoid "undefined variable" errors
  • Update monitrc.j2: don't monitor for non-installed softwares
  • Vagrant dev env support & basic end-to-end service tests
  • Update torrc.j2
  • Streisand CI tests
  • Modular
  • Specify GRUB2 kernel by default when deploying via Linode
  • cloud provider: add Exoscale support
  • Ensure DNS requests are sent down the VPN on Ubuntu
  • Update
  • added templates, partial fix of #656
  • Adding docker support
  • Update venv builder for upstream module changes, more compatibility
  • Split up the README into multiple pieces, to ease translation and edits
  • Gateway: generate a custom `openssl.cnf` to make certs taste better
  • Update LibreSwan to v3.23
  • Clean up pkcs12 locations
  • Update README-fr
  • Some systems have pip2.7/python2.7, but no pip2/python2.
  • Updated Readme to include more information about SSH Keys
  • Add OpenVPN tlscrypt support
  • One more place python2 -> python2.7 matters
  • Add OpenConnect GUI instructions for MacOS
  • Enable TCP BBR congestion control
streisand questions on Stackoverflow (View All Questions)
  • Why streisand vpn script doesn't change my country?(but change ip)
streisand list of languages used
Other projects in Python