Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
FREEDOM251

Freedom251 › Blog › DevOps

How to Self-Host imgproxy With Docker on a VPS

By Freedom251 Team · · 11 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run imgproxy as a Docker container on a Linux VPS, keep its port private behind an HTTPS reverse proxy, and require signed URLs before exposing it to the internet. The open-source image handles common resizing and format conversions; careful source restrictions and resource limits are what make a small VPS deployment safe.

What imgproxy does

imgproxy is a standalone HTTP image-transformation server. Your application creates a specially structured URL containing the source image address and processing options. imgproxy fetches that source, applies operations such as resizing or cropping, and returns the resulting image for use in HTML, CSS, JavaScript, an API response, or a cached asset pipeline.

As an Amazon Associate I earn from qualifying purchases.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The project README calls Docker “the easiest and recommended way to run imgproxy.” A Docker deployment separates the transformer from your application and database, so you can update, restart, limit, and monitor it independently.

A practical production layout has four parts:

  • An application that generates imgproxy URLs.
  • An imgproxy container listening on port 8080 on an internal Docker network.
  • A reverse proxy that terminates TLS and forwards only approved requests to the container.
  • Object or local storage for originals and a cache layer for frequently requested derivatives.

imgproxy does not replace your image storage or URL-signing code. It transforms images on demand; your application remains responsible for deciding which source URLs and processing options users may request.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Prerequisites for a VPS deployment

Prepare these items before starting:

  • A supported Linux VPS with Docker Engine and the Docker CLI installed.
  • A DNS name pointing to the VPS.
  • An HTTPS certificate and a reverse proxy such as the one already used for your other services.
  • Network access from the VPS to the image origins that imgproxy must fetch.
  • A plan for storing originals and caching derivatives.
  • A protected method for supplying secrets, such as a root-readable environment file or your VPS provider’s secret mechanism.

The official project describes imgproxy as suitable for “a simple VPS,” but it does not publish a universal minimum RAM, CPU, or throughput figure. Image dimensions, formats, compression settings, source latency, and concurrent requests determine actual demand.

Install the official Docker image

Pull the image

For a first run, pull the public open-source image from GitHub Container Registry:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
docker pull ghcr.io/imgproxy/imgproxy:latest

The latest tag is convenient for evaluation. For production, select and record a specific release tag after reviewing its changelog, then update it deliberately rather than allowing an unattended tag change.

Run a first container

The project’s quick-start command publishes port 8080 and starts an interactive container:

docker run -p 8080:8080 -it ghcr.io/imgproxy/imgproxy:latest

With the container running, imgproxy listens on port 8080. This command is a smoke test, not a hardened internet-facing configuration: it has no persistent restart policy, no URL-signing secrets, and no TLS boundary.

Use a production-oriented container definition

For a durable service, create a dedicated network and run the container detached with a restart policy. Bind the service to the Docker network rather than publishing it on every VPS interface:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
docker network create imgproxy-net
docker run -d 
  --name imgproxy 
  --restart unless-stopped 
  --network imgproxy-net 
  --env-file /etc/imgproxy/imgproxy.env 
  ghcr.io/imgproxy/imgproxy:<pinned-release>

If your reverse proxy runs on the host instead of in Docker, bind port 8080 to localhost only:

docker run -d 
  --name imgproxy 
  --restart unless-stopped 
  -p 127.0.0.1:8080:8080 
  --env-file /etc/imgproxy/imgproxy.env 
  ghcr.io/imgproxy/imgproxy:<pinned-release>

Do not expose port 8080 directly to the public network when the reverse proxy can reach it over the private network. The official default bind is :8080; your firewall or Docker publishing rule should narrow that exposure.

Put HTTPS in front of imgproxy

Terminate TLS at your reverse proxy and forward requests to the private container. The public virtual host should accept only the hostname you assigned to imgproxy, redirect plain HTTP to HTTPS, and pass the original request path and query string unchanged.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

When both services use Docker, attach the reverse-proxy container to imgproxy-net and proxy to http://imgproxy:8080. When the proxy runs directly on the VPS, proxy to http://127.0.0.1:8080. Allow inbound TCP 443, restrict TCP 8080 to localhost or the Docker bridge, and keep the container’s administrative access on your normal SSH path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set sensible proxy timeouts for the largest transformations you actually permit. A timeout that is too short produces failed requests during legitimate large conversions; one that is unlimited lets stalled origins consume workers indefinitely. Preserve client IP information in the proxy’s standard forwarded headers so your logs can distinguish callers, while remembering that those headers are only trustworthy when inserted by your own proxy.

Configure secrets and request authentication

Sign every processing URL

Set IMGPROXY_KEY and IMGPROXY_SALT in the container environment. URL signing is disabled by default, but the documentation highly recommends enabling it in production. Your application uses the same key and salt to generate a signature for each URL; imgproxy rejects a URL whose signature does not match.

Keep both values out of source control, image URLs intended for public reuse, shell history, and ordinary support tickets. Make /etc/imgproxy/imgproxy.env readable only by the account that manages the service, and rotate the values by deploying a new container and updating the URL generator together. Existing links signed with the old values stop working after the rotation.

Authenticate the caller when needed

Set IMGPROXY_SECRET when a trusted proxy or application must authenticate requests with an Authorization: Bearer ... header. This is separate from URL signing: signing proves that the URL was generated by a party holding the key and salt, while the bearer secret authenticates the HTTP caller. Use both when you need protection against URL tampering and direct access to the endpoint.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not log bearer tokens, key, salt, or complete signed URLs if those URLs grant access to private originals. Redact authorization headers and consider removing query strings from access logs after retaining the fields needed for troubleshooting.

Restrict which images imgproxy may fetch

Use an explicit source allowlist

Set IMGPROXY_ALLOWED_SOURCES to the host or path prefixes that imgproxy is permitted to retrieve. Keep the list narrow: include only your object-storage endpoint, media domain, or other origins that your application actually uses.

Always include a trailing slash in each host prefix. The documentation warns that leaving it out can allow a crafted user-information URL to match the wrong host. Treat the slash as a security requirement, not a formatting preference.

Review private-address access

Check these controls before opening the service to untrusted callers:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord | 6.35mm Jack, Durable Design, Stage and Home Studio Use, Low Noise Shielded Electric Cord for Bass, Keyboard, Amp, Mixer
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
  • IMGPROXY_ALLOW_PRIVATE_SOURCE_ADDRESSES
  • IMGPROXY_ALLOW_LOOPBACK_SOURCE_ADDRESSES
  • IMGPROXY_ALLOW_LINK_LOCAL_SOURCE_ADDRESSES

Private, loopback, and link-local destinations can expose cloud metadata services, internal dashboards, databases, or other network-only endpoints. Leave access disabled unless a documented internal workflow requires it, and then constrain the allowlist and network routes so the exception cannot become a general SSRF primitive.

Validate URL generation in your application

Do not let a browser submit arbitrary source URLs and processing options to your signing endpoint. Accept an image identifier or an approved asset record, resolve it server-side to an allowlisted origin, validate requested dimensions and formats, and sign only the normalized URL. Reject unexpected schemes, hosts, ports, and credentials before signing.

Limit resource consumption

A transformation service can be abused without a software vulnerability: an attacker can request huge dimensions, expensive filters, many animation frames, or slow redirects until CPU, memory, file descriptors, bandwidth, or disk fills. Configure limits for the workload you intend to support:

  • Maximum source-image resolution.
  • Maximum source file size.
  • Maximum number or depth of redirects.
  • Maximum animation frames processed from animated inputs.
  • Maximum dimensions of the generated result.

imgproxy checks image type and dimensions to reduce unwanted resource use and image-bomb risk. Choose limits from real product requirements: a thumbnail service may need only small results, while a publishing workflow may require larger originals. Reject over-limit requests early and return a clear client error rather than allowing an expensive transformation to begin.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave IMGPROXY_ALLOW_SECURITY_OPTIONS disabled unless callers cannot tamper with processing URLs. The documentation warns that security options can bypass restrictions or enable denial-of-service behavior. Likewise, keep Pro cache-bypass controls disabled unless you have a controlled reason to let callers evade caching.

Keep SVG sanitization enabled. Its default is true; change it only after reviewing the security implications of the SVG content you accept and the clients that will display it.

Choose between the open-source image and Pro

The open-source image is MIT licensed, publicly available from GitHub Container Registry, and hosted on infrastructure you choose and pay for. Pro customers receive access to a private Docker registry. The practical decision is feature coverage, not a mandatory hosting platform: both editions can be operated on your VPS, but Pro adds capabilities that some workflows require.

Capability or concern Open-source edition Pro edition
Core resizing, cropping, and rotating Included Included, with additional Pro capabilities
Watermarking Included Advanced watermarking available
Filters and smart cropping Included Included
Common output formats JPEG, PNG, GIF, WebP, AVIF, and JPEG XL Includes the open-source format coverage
Metadata stripping and PNG quantization Included Included
Automatic quality by file size Included Included, with advanced compression options
Video, PDF, and Photoshop previews Not listed for the open-source edition Available
Object detection Not listed for the open-source edition Available
GIF-to-MP4 conversion Not listed for the open-source edition Available
SVG minification and best-format selection Not listed for the open-source edition Available
Registry access Public image on GitHub Container Registry Private Docker registry for customers
License and hosting responsibility MIT license; you select and pay for hosting Commercial terms; you still operate the service on your infrastructure

Choose the open-source edition when your pipeline needs ordinary raster transformations, modern web formats, metadata removal, smart cropping, and quality controls. Evaluate Pro when you need document or video previews, object detection, advanced watermarking or compression, animated-image conversion, SVG minification, or automatic best-format selection. Confirm the exact feature and licensing terms for the release you intend to deploy before committing a production workflow.

Store configuration safely

Keep non-secret settings in version-controlled deployment files and secrets in a protected environment file or secret manager. A minimal environment file might contain the signing values, authorization secret, source allowlist, and your selected limits:

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
IMGPROXY_KEY=<hex-key>
IMGPROXY_SALT=<hex-salt>
IMGPROXY_SECRET=<bearer-secret>
IMGPROXY_ALLOWED_SOURCES=<approved-source-prefixes>

The angle-bracket values above are descriptions, not literal settings. Generate strong random values with your operating system’s secret generator, then substitute the resulting values without surrounding documentation markers. Do not place secrets in a Dockerfile, image layer, public compose file, or monitoring label.

Use a pinned image tag and document the tag, environment revision, reverse-proxy configuration, and rollback tag together. Test a replacement container with the same settings before removing the previous one so a failed upgrade does not leave the endpoint unavailable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Understand VPS sizing without guessing

No authoritative universal RAM, CPU, minimum VPS size, or guaranteed throughput figure is published for this deployment. A single 100-pixel thumbnail and a multi-megapixel AVIF conversion have very different costs, and concurrency multiplies those costs.

Measure your own workload with representative originals and the largest transformations you will permit. Vary concurrency until latency, memory use, and error rates resemble production. Record at least:

  • CPU utilization and throttling during steady traffic and bursts.
  • Resident memory and container memory pressure while decoding and encoding large images.
  • p95 and p99 transformation latency, separated from source-fetch latency.
  • Peak simultaneous transformations and queueing at the reverse proxy.
  • Source bandwidth, generated-image bandwidth, and cache-hit ratio.
  • Disk usage if you maintain a local derivative cache.

When comparing VPS plans, consider CPU architecture, memory available at peak transformation load, network latency to source storage, bandwidth and egress pricing, and whether the cache is local or backed by object storage. A plan that looks inexpensive can become costly when every cache miss crosses a high-latency region or incurs substantial outbound transfer.

Operate and monitor the service

Use structured logs

imgproxy supports pretty, structured, json, and gcp log formats. Use a human-readable format while diagnosing a new installation, then choose structured or JSON output for aggregation. Capture status code, processing time, source host, output format, and request outcome while redacting secrets and sensitive query strings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Alert on the failure modes that matter

  • Container restarts or an unhealthy container.
  • Rising source-fetch failures, DNS errors, timeouts, and redirect rejections.
  • Increases in 4xx responses caused by invalid signatures, disallowed sources, or exceeded limits.
  • 5xx responses, out-of-memory kills, and sustained CPU saturation.
  • Latency increases that coincide with cache misses or a slow origin.
  • Disk, bandwidth, and file-descriptor exhaustion on the VPS.

Keep a simple synthetic check that requests one small, signed image through the public HTTPS hostname. A second check can exercise a representative larger transformation from an approved source. Synthetic checks detect certificate, DNS, reverse-proxy, container, and signing failures that host-level metrics cannot see.

Plan updates and rollback

Pull the new pinned image, start it with the existing environment and network settings, and verify health, signatures, source restrictions, and output formats before switching traffic. Retain the previous image tag for rollback. Never replace a working tag with latest during an incident; reproducible tags make the cause of a regression identifiable.

Troubleshoot common deployment problems

The browser cannot connect

Confirm DNS resolves to the VPS, TCP 443 is allowed, the certificate covers the hostname, and the reverse proxy can reach the container. From the VPS, test the private listener rather than opening port 8080 publicly. If the proxy is in Docker, verify that both containers share imgproxy-net; if it runs on the host, verify the localhost binding and firewall rules.

Every request returns an invalid-signature error

Check that the application and container use the same key and salt, that the URL is signed after its path and processing options are finalized, and that a proxy or framework has not changed escaping or query parameters. Rotate only after correcting the generator; rotating values immediately invalidates all previously generated URLs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The source is rejected

Compare the normalized source URL with IMGPROXY_ALLOWED_SOURCES. Check scheme, hostname, port, path prefix, and the required trailing slash. Also verify that DNS resolves to an address permitted by your private, loopback, and link-local address policy.

Large images time out or the container is killed

Inspect memory and CPU during decoding and encoding, then lower source-size or dimension limits, reduce permitted concurrency, or move the workload to a larger VPS. Check origin latency and reverse-proxy timeouts before assuming imgproxy itself is failing. Do not simply remove limits: that converts a capacity problem into an abuse risk.

Animated or SVG inputs behave unexpectedly

Verify that the requested format and operation are supported by the edition you run, confirm animation-frame limits, and keep SVG sanitization enabled. If a workflow needs a Pro-only conversion or preview, an open-source container will not provide a configuration switch that creates that capability.

When self-hosting is the right choice

A VPS deployment is a good fit when you need control over source access, URL policy, retention, network placement, and operational costs, and you are prepared to maintain Docker, TLS, monitoring, and upgrades. It is less attractive when you cannot monitor resource exhaustion, protect signing secrets, or provide reliable connectivity to the source images.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start with the open-source image and a narrow, signed use case. Add formats or transformations only when a product requirement demands them, and size the VPS from measured peak behavior rather than a generic specification. That approach keeps the public endpoint small, the attack surface understandable, and the migration path to Pro clear if advanced features become necessary.

Frequently Asked Questions

Is port 8080 supposed to be public?

No. Keep imgproxy on the Docker network or bind it to localhost, and expose only the HTTPS reverse proxy to the internet.

Does the open-source edition require a hosting subscription?

No. The open-source image is MIT licensed and publicly available; you choose and pay for the VPS, bandwidth, storage, and operations yourself.

Can I use unsigned URLs for a private deployment?

Signing is disabled by default, but it is highly recommended in production. Enable IMGPROXY_KEY and IMGPROXY_SALT, and add bearer authentication when your proxy or application also needs caller authentication.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

DevOpsDockerimage optimizationimgproxyself-hostingSSRF protectionVPS

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.