> ## Documentation Index
> Fetch the complete documentation index at: https://tunnelfleet.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# WireGuard on Ubuntu

> Connect to a TunnelFleet WireGuard server from Ubuntu Linux.

<Steps>
  <Step title="Install WireGuard tools">
    ```bash theme={null}
    sudo apt update
    sudo apt install wireguard
    ```
  </Step>

  <Step title="Download your config">
    From TunnelFleet, download the user's `.conf` file to your Ubuntu machine.
  </Step>

  <Step title="Install the config">
    ```bash theme={null}
    sudo install -o root -g root -m 600 ~/Downloads/your-tunnel.conf /etc/wireguard/wg0.conf
    ```

    Adjust the source path and interface name (`wg0`) as needed.
  </Step>

  <Step title="Start the tunnel">
    ```bash theme={null}
    sudo wg-quick up wg0
    ```
  </Step>

  <Step title="Optional: start on boot">
    ```bash theme={null}
    sudo systemctl enable wg-quick@wg0
    ```
  </Step>
</Steps>

## Verify

```bash theme={null}
sudo wg show
curl ifconfig.me
```

## Stop the tunnel

```bash theme={null}
sudo wg-quick down wg0
```

## Troubleshooting

| Issue                         | Fix                                                        |
| ----------------------------- | ---------------------------------------------------------- |
| `wg-quick: command not found` | Install the `wireguard` package                            |
| Permission errors             | Config must be readable by root; mode `600` is recommended |
| No handshake                  | Check UDP 51820 outbound and server firewall               |
| Resolving DNS fails           | Confirm the `[Interface]` `DNS` line in the profile        |
