Set up Ubuntu with ProxyField
- Open Settings → Network → Network Proxy and set it to Manual.
- Enter
gate.proxyfield.ioand7000in HTTP Proxy and HTTPS Proxy, and keep Ignore Hosts. - Load
https://api.ipify.orgin Firefox and enter your ProxyField username and password when the browser asks. - For the terminal, apt and snap, set the proxy URL in
/etc/environment,/etc/apt/apt.conf.d/95proxyandsnap set system(sections 2 to 4).
For apt, the same values in /etc/apt/apt.conf.d/95proxy:
Acquire::http::Proxy "http://<login>-country-us-city-new_york:<password>@gate.proxyfield.io:7000/";
Acquire::https::Proxy "http://<login>-country-us-city-new_york:<password>@gate.proxyfield.io:7000/";GNOME's own guide to the Network Proxy panel that Ubuntu desktop uses: Define proxy settings (GNOME Help).
What to buy for an Ubuntu server: rotating residential proxies for scrapers and data collection, mobile 5G/4G ($3.45/GB for 1 GB down to $2.45/GB) for checks of what phone users see, a dedicated ISP IP for a fixed address, and datacenter for bulk jobs on sites that accept it. Residential and mobile run over HTTP, HTTPS and SOCKS5 on gate.proxyfield.io:7000 with a username and password; with the IP allowlist, on the port you set up in the dashboard. Put the server's fixed public IPv4 on the allowlist and no password sits on disk.
| What you check before you buy | ProxyField |
|---|---|
| SOCKS5 | Yes, on the same host and port as HTTP and HTTPS, with UDP over SOCKS5 on residential |
| Access | Username and password, or an IP allowlist |
| Rotating or fixed | A new IP per request, sticky sessions from 30 s to 36 h, or a dedicated ISP IP for 30 days |
| Concurrency | Unlimited concurrent threads |
| Countries | 195+ countries, 21,000+ cities |
| Billing | Per GB, no subscription; the traffic never expires |
Labels can differ slightly between versions.
Which Ubuntu proxy setting reaches what
| Setting | Firefox, Chrome, GNOME apps | Terminal tools and Python (curl, wget, pip, git, requests) | apt | snap |
|---|---|---|---|---|
| Settings → Network → Network Proxy | yes | no | no | no |
/etc/environment or ~/.bashrc | apps started after the next login may read it | yes | no | no |
/ | no | no | yes | no |
snap set system proxy. | no | no | no | yes |
On this page 13 sections
1. Set the proxy in Ubuntu desktop settings
- Open Settings → Network.
Screenshot Ubuntu Settings, Network page with the Network Proxy row - Select Network Proxy (on 22.04, the gear next to it).
- Turn it on, or set Method / Configuration to Manual.
Screenshot Ubuntu Network Proxy dialog with Manual configuration - Enter
gate.proxyfield.ioand7000in HTTP Proxy and HTTPS Proxy. - In Ignore Hosts, keep
localhost, 127.0.0.0/8, ::1, and close the window; it saves at once. - Open Firefox and load
https://api.ipify.org. When the browser asks for the proxy's username and password, enter your ProxyField credentials. The page shows the proxy's IP.
To skip the login prompt, add your network's public IP to the allowlist in your ProxyField account and, in step 4, enter the port you set up in the dashboard instead of 7000. With the IP allowlist, the product, location and session are set per port in the dashboard.
The same setting from a terminal, with gsettings:
gsettings set org.gnome.system.proxy mode 'manual'
gsettings set org.gnome.system.proxy.http host 'gate.proxyfield.io'
gsettings set org.gnome.system.proxy.http port 7000
gsettings set org.gnome.system.proxy.https host 'gate.proxyfield.io'
gsettings set org.gnome.system.proxy.https port 7000
gsettings set org.gnome.system.proxy ignore-hosts "['localhost', '127.0.0.0/8', '::1']"gsettings set org.gnome.system.proxy mode 'none' turns it off.
2. A system-wide proxy for the terminal
Add plain KEY=value lines to /etc/environment with sudo nano /etc/environment, then log out and back in:
http_proxy="http://<login>:<password>@gate.proxyfield.io:7000"
https_proxy="http://<login>:<password>@gate.proxyfield.io:7000"
no_proxy="localhost,127.0.0.1,::1"
HTTP_PROXY="http://<login>:<password>@gate.proxyfield.io:7000"
HTTPS_PROXY="http://<login>:<password>@gate.proxyfield.io:7000"
NO_PROXY="localhost,127.0.0.1,::1"For your user only, put export lines in ~/.bashrc instead. Test with curl https://api.ipify.org. If your password contains @, : or /, percent-encode it in the URL (@ becomes %40): see proxy authentication. /etc/environment is readable by every user; on a shared machine, use the IP allowlist: drop <login>:<password>@ and use the port you set up in the dashboard instead of 7000. The details of each variable are on Linux proxy setup, and curl's own options on cURL with a proxy.
3. apt through the proxy
apt ignores both the desktop setting and your shell. Create /etc/apt/apt.conf.d/95proxy:
sudo tee /etc/apt/apt.conf.d/95proxy >/dev/null <<'EOF'
Acquire::http::Proxy "http://<login>:<password>@gate.proxyfield.io:7000/";
Acquire::https::Proxy "http://<login>:<password>@gate.proxyfield.io:7000/";
EOF
sudo apt updateDelete the file to stop. apt is simplest with the HTTP proxy shown here. Every package downloaded through the proxy counts as traffic, so for large upgrades on a machine that doesn't need another IP, let apt connect directly.
4. snap through the proxy
snapd runs as a service and reads its own setting:
sudo snap set system proxy.http="http://<login>:<password>@gate.proxyfield.io:7000"
sudo snap set system proxy.https="http://<login>:<password>@gate.proxyfield.io:7000"To remove the proxy from snap later, run this on its own:
sudo snap unset system proxy.http proxy.httpsOther services (Docker, your own) take Environment= lines in a systemd drop-in, as shown on Linux proxy setup.
5. Ubuntu Server, without a desktop
On a server there is no GNOME setting: use the apt file (section 3), snap (section 4) and systemd Environment= lines for services. /etc/environment (section 2) is readable by every user, so put no password in it: allowlist the server's IP in your ProxyField account and use http://gate.proxyfield.io:<port> without <login>:<password>@, where <port> is the port you set up in the dashboard, or keep the login only in root-only files such as the apt file or a systemd drop-in (sudo chmod 600).
Ubuntu Pro. The Pro client keeps its own proxy settings, which the apt file and the environment don't set. Set them with sudo pro config set http_proxy=http://<login>:<password>@gate.proxyfield.io:7000 and sudo pro config set https_proxy=http://<login>:<password>@gate.proxyfield.io:7000, and check with sudo pro config show (Canonical's Pro client proxy guide).
6. A Python scraper on an Ubuntu server
Python's requests takes the proxy as a URL with the login in it, or reads https_proxy from the environment (section 2) with no code change. Set up a virtual environment first: on Ubuntu 24.04, pip install outside one stops with error: externally-managed-environment.
sudo apt install python3-venv
python3 -m venv ~/scraper && source ~/scraper/bin/activate
pip install requests
export PF_LOGIN='<login>' PF_PASSWORD='<password>'import os
from urllib.parse import quote
import requests
login = quote(os.environ["PF_LOGIN"], safe="") # percent-encodes @, : and /
password = quote(os.environ["PF_PASSWORD"], safe="")
proxy = f"http://{login}-country-us:{password}@gate.proxyfield.io:7000"
resp = requests.get("https://api.ipify.org",
proxies={"http": proxy, "https": proxy}, timeout=30)
print(resp.status_code, resp.text) # 200 and the proxy's IP- One IP per worker. Give each worker its own sticky session, such as
{login}-country-us-session-worker3-ttl-600, so parallel jobs on one server keep separate IPs for 10 minutes; leave the session out for a new IP on every request. - SOCKS5.
pip install "requests[socks]"and usesocks5h://instead ofhttp://; the same login works. - As a service. Keep
PF_LOGINandPF_PASSWORDin a root-only file (sudo chmod 600 /etc/scraper.env) and load it withEnvironmentFile=/etc/scraper.envin the systemd unit, so the password is not in your code or inpsoutput. - No password at all. Allowlist the server's IP and use
http://gate.proxyfield.io:<port>, where<port>is the port you set up in the dashboard.
More on requests: Python requests with a proxy and Python proxies.
7. SOCKS5 on Ubuntu
The desktop's Socks Host field sends GNOME apps through a SOCKS5 proxy, but carries no login, so it works with your IP on the allowlist and the port you set up in the dashboard. In the terminal, export all_proxy="socks5h://<login>:<password>@gate.proxyfield.io:7000" works for curl and many tools, and proxychains4 covers programs that ignore it (sudo apt install proxychains4). SOCKS5 takes the same username and password, and residential proxies carry UDP over SOCKS5 (HTTP/3, QUIC). Ubuntu has no single setting that forces every program through SOCKS5. More on the protocol: SOCKS5 proxies.
8. Verify the proxy on Ubuntu
- Firefox:
https://api.ipify.orgshows the proxy's IP. - Terminal:
env | grep -i proxy, thencurl -s https://api.ipify.organdcurl -s https://ipinfo.io/json. - apt:
apt-config dump | grep -i proxyshows the proxy apt will use. - snap:
snap get system proxy. - To test proxy lines before you use them, use the proxy checker: up to 100 proxies per check; your list and results are not stored.
9. Turn the proxy off
Set Network Proxy to off (or Disabled) in Settings, remove the lines from /etc/environment and ~/.bashrc, delete /etc/apt/apt.conf.d/95proxy, and run sudo snap unset system proxy.http proxy.https. Log out and in so the environment clears.
Fix Ubuntu proxy errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Firefox works, the terminal doesn't | The desktop setting doesn't reach the terminal | Section 2 |
apt update hangs or fails | apt has no proxy file, or it has a typo | Section 3; check quotes and the trailing / |
| The browser or curl keeps asking for proxy credentials | The login was not sent, or a special character in the password broke the URL | Put <login>:<password>@ in the URL with @ written as %40, or use the IP allowlist instead of a login |
sudo commands skip the proxy | sudo resets the environment | sudo -E, or the apt and snap settings above |
| snap install times out | snapd has no proxy | Section 4 |
pip install fails with externally-managed-environment | Ubuntu 24.04 protects the system Python | Section 6: use a virtual environment |
| Chrome ignores the proxy | Started with its own flags, or a proxy extension is active | Remove the flag or extension; Chrome follows the GNOME setting by default |
| Some sites won't load | The site blocks the IP, or a restricted category | Some site categories are restricted to protect the network, including financial and government services |
Gateway error messages: 407 Proxy Authentication Required for a wrong login or password, an IP not on the allowlist or a malformed location, 402 Payment Required when no traffic is left and 502 Bad Gateway when no exit could be connected; a restricted site gets no separate response, and a 403 comes from the site itself. Status codes are explained in proxy errors. Our 24/7 live chat helps with setup and integration.
Which proxies to use on Ubuntu
| What you run | Proxy | Protocols | Access | Price |
|---|---|---|---|---|
| Scrapers and data collection | Rotating residential | HTTP, HTTPS, SOCKS5 | Username and password, or IP allowlist | $2.95/GB for 1 GB, from $1.95/GB |
| Checks of what phone users see | Mobile 5G/4G | HTTP, HTTPS, SOCKS5 | Username and password, or IP allowlist | $3.45/GB for 1 GB, from $2.45/GB |
| A fixed IP for a service that allowlists it | Dedicated ISP | HTTP, HTTPS, SOCKS5 | each IP's own login and password, from the list in your dashboard (ip:port:login:password) | from $2.29 per IP per 30 days |
| Bulk jobs on sites that accept datacenter IPs | Datacenter | $0.29/GB down to $0.22/GB |
For code on Ubuntu, see Python, Node.js and wget; for the browser alone, Firefox. Use ProxyField for lawful work within our acceptable use policy.
Get started
Start with the Easy Trial: 1 GB for $2.95, with no minimum purchase and no subscription. The traffic never expires and all purchases are final. See pricing per GB.
Ubuntu Proxy Setup FAQ
How do I set up a proxy on Ubuntu?
ProxyField proxies work on Ubuntu from $1.95/GB ($2.95 for 1 GB): in Settings → Network → Network Proxy, choose Manual and enter gate.proxyfield.io and port 7000 for HTTP and HTTPS. For the terminal, Python, apt and snap, add the proxy to /etc/environment, /etc/apt/apt.conf.d/ and snap set system.
Where are the proxy settings in Ubuntu desktop, and how do I add a proxy that needs a login?
In Settings → Network → Network Proxy (on 22.04, the gear next to it): choose Manual and enter the host and port, such as gate.proxyfield.io and 7000. GNOME's form has no username or password fields, so the browser asks for the login on the first page; to avoid the prompt, allowlist your IP in your ProxyField account and enter the port you set up in the dashboard instead. Terminal tools, apt and snap take the login in the proxy URL, http://<login>:<password>@gate.proxyfield.io:7000.
How do I run a Python scraper on an Ubuntu server through a residential proxy with a username and password?
Install requests in a virtual environment, then pass proxies={"http": url, "https": url} with url = "http://<login>-country-us:<password>@gate.proxyfield.io:7000" and a timeout; requests.get("https://api.ipify.org") should print the proxy's IP. Read the login from environment variables, percent-encode special characters (@ becomes %40), and give each worker its own -session-<id>-ttl-600 to keep separate IPs. With https_proxy set in the environment, requests uses it with no code change.
What kind of proxies should I buy for an Ubuntu server, and which providers support SOCKS5 and IP allowlisting?
Rotating residential proxies for scrapers and data collection, mobile for phone-network checks, a dedicated ISP IP for a fixed address, and datacenter for bulk jobs on sites that accept it. ProxyField's residential and mobile proxies support HTTP, HTTPS and SOCKS5 on gate.proxyfield.io, port 7000 with a username and password or the port you set up in the dashboard with an IP allowlist, unlimited concurrent threads and 195+ countries, from $1.95/GB. Allowlisting the server's fixed IPv4 keeps the password off the disk.
How do I set a system-wide proxy in Ubuntu?
Combine the desktop Network Proxy setting with http_proxy and https_proxy lines in /etc/environment, an apt proxy file and the snap setting. No single switch covers every program.
Do Ubuntu desktop proxy settings affect terminal apps?
No. GNOME's setting is read by browsers and desktop apps; curl, wget, pip, git and Python's requests read http_proxy and https_proxy from the environment. Set those in /etc/environment or ~/.bashrc.
How do I set a proxy in the Ubuntu terminal?
Run export http_proxy="http://<login>:<password>@gate.proxyfield.io:7000" and export https_proxy="$http_proxy" for the current terminal. Add them to ~/.bashrc to keep them.
How do I configure apt to use a proxy on Ubuntu?
Create /etc/apt/apt.conf.d/95proxy with Acquire::http::Proxy and Acquire::https::Proxy lines pointing at http://<login>:<password>@gate.proxyfield.io:7000/. Then run sudo apt update.
How do I set a proxy for snap on Ubuntu?
Run sudo snap set system proxy.http="http://<login>:<password>@gate.proxyfield.io:7000" and the same for proxy.https. snap get system proxy shows the result.
How do I enter a proxy username and password on Ubuntu?
Not in GNOME's form, which has no login fields: browsers ask for it on the first page. In the terminal, apt and snap, put it in the proxy URL as <login>:<password>@, with special characters percent-encoded, or allowlist your IP, skip the password and use the port you set up in the dashboard.
Show 12 more questionsShow fewer questions
Does Ubuntu support SOCKS5 proxies?
Yes: the desktop has a Socks Host field, terminal tools read all_proxy="socks5h://...", and proxychains covers the rest. The desktop field carries no login, so use the IP allowlist there, with the port you set up in the dashboard.
Can Ubuntu use SOCKS proxies everywhere?
Not with one setting. GNOME apps use Socks Host, many CLI tools use all_proxy, apt needs an HTTP proxy, and programs with no proxy support need proxychains.
What is the safest way to store proxy credentials on Ubuntu?
Avoid them: allowlist the machine's IP in your ProxyField account, and no password is stored. Otherwise keep them in files only you or root can read, such as ~/.bashrc or a systemd EnvironmentFile with chmod 600, not in world-readable /etc/environment or in your scraper's code.
How do I verify the proxy on Ubuntu?
Load https://api.ipify.org in Firefox and run curl -s https://api.ipify.org in a terminal; both should show the proxy's IP. snap get system proxy and env | grep -i proxy show the other settings.
Do the steps differ on Ubuntu 22.04 and 24.04?
Only on the desktop and for pip: 24.04 has a Network Proxy switch with a configuration menu, while 22.04 opens a dialog from a gear icon, and 24.04 needs a virtual environment for pip install. The terminal, apt and snap settings are the same on both.
Can I use proxies on Ubuntu Server without a desktop?
Yes: use /etc/environment for CLI tools, an apt proxy file, the snap setting, systemd Environment= lines for services and pro config set for the Ubuntu Pro client. Allowlisting the server's IP keeps passwords off the disk.
How do I run a proxy server on Ubuntu?
Install a proxy such as Squid or Tinyproxy with apt and point clients at the server. Its traffic still leaves from your server's own IP; for other IPs and locations, connect to a provider's gateway instead.
Can I use rotating proxies with Ubuntu?
Yes. Point any setting at ProxyField's gateway and each request gets a new IP; a session id in the username keeps one IP for 30 s to 36 h.
Will a proxy slow down my Ubuntu apt updates or downloads?
Each download takes one more hop, and every gigabyte through the proxy counts as traffic. Let apt connect directly unless the machine must reach mirrors from another IP.
Why use residential proxies instead of datacenter ones on Ubuntu?
For scraping and checks on sites that limit datacenter IPs: residential IPs from home ISPs pass where those don't. For bulk jobs on sites that accept datacenter IPs, datacenter proxies cost from $0.22/GB.
What is a proxy in Ubuntu?
A server that Ubuntu's apps send their traffic through, set in Network settings, the environment or a program's config. Sites then see the proxy's IP and location instead of the machine's.
How do I turn off the proxy in Ubuntu?
Switch Network Proxy off in Settings, remove the proxy lines from /etc/environment and ~/.bashrc, delete the apt proxy file, and run sudo snap unset system proxy.http proxy.https. Log out and in to clear the environment.