# Goal

Resolve common errors when clients cannot connect to your server.

## Symptoms

- `Connecting failed. Failed to connect to server`
- `Connection refused by server`
- Server console shows `Could not start resource` or license key warnings

## Steps

1. **Verify server is listening**
   ```bash
   sudo ss -tulpn | grep 30120
   ```
   Ensure both TCP and UDP are open.
2. **Check license key**
   - Confirm `sv_licenseKey` is set in `server.cfg`
   - Generate keys at [keymaster.fivem.net](https://keymaster.fivem.net)
3. **Inspect firewall**
   ```bash
   sudo ufw allow 30120/tcp
   sudo ufw allow 30120/udp
   ```
4. **Review server logs**
   Look for missing resources or database errors in the console.

## Verification

- Clients reach the `Connecting to server` screen without errors
- No `connection refused` messages in console

## See also

- [Linux Install](../getting-started/linux-install)
- [Jobs](../core-concepts/jobs)
- [Cfx.re Connection Guide](https://docs.fivem.net/docs/server-manual/troubleshooting/#networking)

## Next steps

If issues persist, capture full server logs and search [Cfx.re QBCore topics](https://forum.cfx.re/search?q=qbcore) before asking with a reproducible report.
