OpenSnell

Installation

One-line installer for Linux + systemd, manual builds for everything else.

One-line server installer (Linux + systemd)

bash <(curl -fsSL https://s.ee/opensnell)

The interactive installer:

  • Lets you pick between OpenSnell (default, GPLv3, all-platform), the official Surge snell-server v5.0.1, or the official Surge snell-server v6.0.0b4 (closed-source, Linux only). For the v6 option and what changed, see Snell v6.
  • Generates a random PSK with openssl if you leave it blank.
  • Picks an unused random port in 10000–60000 if you leave the port blank.
  • Writes /etc/snell/snell-server.conf, installs a systemd unit (snell-server.service), opens the port in UFW / firewalld if either is active, and starts the service.
  • Re-run with reconfigure, update, uninstall, start, stop, restart, status, or info — see ./install.sh help.

Installing the alpha channel

The alpha branch tracks experimental features ahead of stable release (currently: library-level multi-user server mode, TUN inbound, fake-IP DNS, and tcp-brutal CC — none of which the official Surge snell-server ships). CI publishes a rolling pre-release tagged alpha on every push to that branch; the installer can pull from it via --alpha:

bash <(curl -fsSL https://s.ee/opensnell) install --alpha

The channel is persisted to /etc/snell/.install_meta, so subsequent update runs stay on alpha without re-passing the flag. To switch back to the stable channel, run install again without the flag.

Alpha builds carry the same on-the-wire compatibility guarantees as stable (full interop with Surge snell-server v5.0.1 is part of CI), but the extra features above are not yet part of the official Snell spec and may be removed or reshaped without warning. Use on production systems at your own risk.

Docker / Docker Compose

The server image is published to GHCR as ghcr.io/missuo/opensnell-server and is multi-arch (linux/amd64 and linux/arm64). All configuration is supplied via SNELL_* environment variables — the container's entrypoint materializes snell-server.conf from them at start. If SNELL_PSK is left blank, a random PSK is generated on first start and printed to the container logs.

compose.yaml
services:
  snell-server:
    image: ghcr.io/missuo/opensnell-server:latest
    container_name: snell-server
    restart: unless-stopped
    ports:
      - "2333:2333/tcp"
      - "2333:2333/udp"
    environment:
      SNELL_LISTEN: "0.0.0.0:2333"
      SNELL_PSK: ""           # leave blank to auto-generate
      SNELL_OBFS: "off"
      SNELL_UDP: "true"
      SNELL_QUIC: "true"
      SNELL_IPV6: "true"
      SNELL_TFO: "false"
      # SNELL_EGRESS_INTERFACE: "eth0"
      # SNELL_DNS: "1.1.1.1, 8.8.8.8"
docker compose up -d
docker compose logs snell-server   # grab the auto-generated PSK if you left it blank

Or with plain docker run:

docker run -d --name snell-server --restart unless-stopped \
  -p 2333:2333/tcp -p 2333:2333/udp \
  -e SNELL_PSK=your-shared-secret \
  ghcr.io/missuo/opensnell-server:latest

Tagged releases are available as :1.0.3, :1.0, :1, etc. See Server configuration for the meaning of each SNELL_* knob — the mapping is 1:1 with the ini keys.

The image only ships the server. The client is intended to run on the user's own machine and is distributed as a raw binary via the GitHub releases page.

Build from source

go build -o snell-server ./cmd/snell-server
go build -o snell-client ./cmd/snell-client

Or fetch directly with go install:

go install github.com/missuo/opensnell/cmd/snell-server@latest
go install github.com/missuo/opensnell/cmd/snell-client@latest

Minimal systemd unit

If you're not using the installer but want systemd supervision:

[Unit]
Description=OpenSnell server
After=network.target

[Service]
ExecStart=/usr/local/bin/snell-server -c /etc/snell/snell-server.conf
Restart=on-failure
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target

Next steps

On this page