Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
VGSources
Blog

How to Install and Host Portainer on a VPS

A practical guide to hosting Portainer CE on a VPS: prerequisites, Docker and Compose commands, port meanings, HTTPS, firewall choices, upgrades and Swarm differences.
Length10 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Portainer CE as a Docker container on your VPS, persist its database in the portainer_data volume, and open the interface at https://<server-ip-or-fqdn>:9443. Port 8000 is optional for Edge Agent tunnel features; ordinary management of Docker running on the same VPS does not require it.

This guide covers prerequisites, a standalone installation, Compose, TLS choices, firewall exposure, updates, Agent compatibility, and why Docker Swarm is a separate deployment path.

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.

What Portainer does on a VPS

Portainer Server is a web-based management layer that runs in Docker. It connects to the local Docker engine through the Unix socket and gives you a browser interface for containers, images, volumes, networks, stacks, and related engine resources. On a single VPS, the normal design is one Portainer Server container connected to that VPS’s local Docker engine.

Portainer can also manage remote or Edge environments through Agents. Those environments add networking and compatibility considerations that do not apply to a basic, single-host installation. Start with the standalone deployment unless the VPS is intentionally part of a Docker Swarm cluster.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

The persistent state is in Portainer’s /data directory. Mounting the named volume portainer_data at that path preserves Portainer’s database and configuration when the container is recreated for an upgrade or recovery.

Prerequisites and host checks

A working Docker engine

The official Linux procedure requires the latest version of Docker installed and working. Check it before installing Portainer:

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

Both commands should return normally. If Docker is stopped, inaccessible, or only partially installed, fix that first; Portainer cannot manage an engine it cannot reach.

Sudo access and the Docker socket

You need sudo access on the VPS. The standard container connects to /var/run/docker.sock, the Unix socket used by a rootful Docker engine. The installation command therefore mounts that socket read/write into the container. Treat access to the socket as administrative access to Docker: anyone who can control Portainer should be considered able to control containers and data on the host.

SELinux and rootless Docker limitations

The documented setup assumes Docker runs as root and that SELinux is disabled unless the Portainer container is run privileged. Rootless Docker has limitations with this arrangement. If your VPS uses rootless mode or enforcing SELinux, validate the required socket permissions and security policy before relying on the standard command; do not assume the rootful instructions will behave identically.

DNS, firewall and administrative access

Decide whether you will initially connect by VPS address or by a DNS name. Ensure your firewall policy allows the endpoint you choose, while keeping Docker’s own daemon and socket private. The basic command publishes Portainer’s application ports; cloud firewall rules, host firewall rules, DNS records, and any reverse proxy remain your responsibility.

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

Standalone Docker or Docker Swarm?

These are different topologies, not two commands for the same installation. Use the standalone method for one VPS running one Docker engine. Use the Swarm method only when the host is a deliberately configured Swarm manager in a cluster.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Aspect Standalone VPS Docker Swarm
Topology One host and its local Docker engine Cluster with manager and worker nodes
Deployment command docker run or Docker Compose docker stack deploy using a stack manifest
Port requirement highlighted by the guide 9443 for the UI; 8000 is optional for Edge tunnel features Manager-worker communication on port 9001, in addition to the services used by the cluster
Agent placement One local Server container; remote Agents only when you add remote environments One Portainer Server and a global Agent service across the cluster
Operational complexity Lowest; suitable for a single VPS Higher; requires Swarm mode, manager administration and cluster networking

A single VPS does not gain anything from deploying the Swarm stack merely because Portainer supports Swarm. Swarm introduces cluster state and communication requirements; it is appropriate when you already operate a multi-node Swarm or have a specific reason to orchestrate services that way.

Portainer’s ports and what each one means

Port Purpose Required for a basic local installation?
9443 HTTPS web interface for Portainer Server Yes
8000 TCP tunnel server used by Edge Agent tunnel features No, unless you use those Edge features
9000 Legacy HTTP interface that can still be enabled for compatibility No
9001 Manager-worker communication in the documented Swarm deployment No for standalone Docker

Portainer’s current default is HTTPS on 9443. Port 8000 is not a second web interface and is not needed to manage containers on the same VPS. Port 9000 is a legacy HTTP option, not the preferred endpoint for a new installation. Port 9001 belongs to the Swarm deployment’s cluster communication requirements, not to a normal one-host setup.

Install Portainer CE with Docker

1. Create persistent storage

Create the named volume before starting the container:

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

Docker stores the volume independently of the Portainer container. Do not replace this mount with an unplanned temporary directory if you want upgrades and redeployments to retain Portainer’s database.

2. Start the Portainer CE container

The official standalone command publishes the HTTPS UI and the optional Edge tunnel, mounts the Docker socket, mounts persistent data, and configures automatic restart:

docker run -d 
  -p 8000:8000 
  -p 9443:9443 
  --name portainer 
  --restart=always 
  -v /var/run/docker.sock:/var/run/docker.sock 
  -v portainer_data:/data 
  portainer/portainer-ce:sts

The portainer/portainer-ce:sts image tag in this command selects Portainer CE’s short-term-support stream. Keep the command or Compose file you used; the image tag, published ports, socket mount and data volume must be reproduced when you recreate the container.

3. Confirm that Docker started it

docker ps

You should see a running container named portainer. If it is absent, inspect the container’s output:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
docker ps -a
docker logs portainer

Common causes of an immediate exit include a Docker engine that is not running, a port already occupied by another service, an inaccessible socket, or a security policy blocking the mount.

Use Docker Compose instead

Compose is useful when you want the deployment represented as a file that can be reviewed and recreated. Download Portainer’s official CE Compose file and start it:

curl -L https://downloads.portainer.io/ce-sts/portainer-compose.yaml -o portainer-compose.yaml
docker compose -f portainer-compose.yaml up -d

The supplied Compose definition maps 9443:9443, can map 8000:8000, mounts /var/run/docker.sock, and uses the named portainer_data volume. Before running it, read the file and confirm that its volume and port mappings match the exposure you intend. If you do not use Edge tunnel features, avoid publishing an unnecessary 8000 mapping.

Run Compose from a directory you protect as an administrative deployment directory. Keep the file available for later upgrades so you can compare changes rather than accidentally recreating Portainer with a different volume or port configuration.

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

Open Portainer for the first time

Use the VPS address, not localhost

From your own computer, browse to:

https://<server-ip-or-fqdn>:9443

Replace the placeholder with the VPS’s reachable IP address or DNS name. A documentation example using localhost applies only when the browser is running on the Docker host itself; it is not the address to type when Portainer is on a remote VPS.

Understand the certificate warning

By default, Portainer generates a self-signed SSL certificate for port 9443. A browser therefore warns that the certificate is not trusted by the normal public certificate authorities. On a first, controlled setup, verify that you reached the correct VPS and proceed only if the connection is expected. Do not treat the warning as proof that the endpoint is safe.

Create the initial administrator

Complete Portainer’s first-run setup in the browser and choose strong credentials. Because the account controls Docker resources, protect it like a server administrator account. The self-signed certificate can later be replaced with a certificate you provide during installation or configure through Portainer’s interface.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Choose a practical HTTPS exposure model

Model Certificate ownership Firewall exposure Hostname experience
Direct access to 9443 Portainer initially uses its generated self-signed certificate; you can provide a personal certificate during installation or through the UI 9443 must be reachable from the administrator’s network Uses the VPS address or a DNS name with an explicit :9443 port
DNS and reverse proxy in front The proxy can own the public certificate while forwarding to Portainer’s HTTPS service Expose the proxy’s public HTTPS endpoint and restrict direct access to 9443 according to your policy Can present a normal HTTPS hostname without an explicit nonstandard port

A reverse proxy is a deployment choice outside the basic Portainer container command. If you use one, configure DNS to point at the proxy, issue and renew the certificate there, and ensure the proxy can reach Portainer on the private network path you selected. If you connect directly, keep 9443 protected by your VPS and cloud firewall rules and use a DNS name if you want a stable address.

Do not publish port 9000 just to avoid the certificate warning. It is an HTTP compatibility option, whereas 9443 is the HTTPS endpoint enabled by default since CE 2.9 and BE 2.10.

Verify connectivity and diagnose failures

The page does not load

  • Run docker ps and confirm that the portainer container is running.
  • Check docker logs portainer for startup errors.
  • Confirm that the VPS firewall and any cloud security group permit 9443 from your administration network.
  • Check for a port conflict with ss or the host’s service manager if Docker reports that binding 9443 failed.
  • Use the VPS IP directly to separate DNS problems from Portainer problems.

The browser shows a certificate error

That is expected with the generated self-signed certificate. Verify the address and VPS identity, then either continue for a controlled administrative connection or install a trusted certificate through your chosen certificate and proxy arrangement.

Port 8000 appears closed

That does not indicate a failed local installation. Port 8000 serves the TCP tunnel used by Edge Agent features. Local management through the VPS’s Docker socket works without it. Only publish and permit 8000 when your Edge design requires the tunnel.

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

Portainer cannot see Docker resources

Check that the container was started with -v /var/run/docker.sock:/var/run/docker.sock and that the socket exists on the host. Rootless Docker and SELinux policies can change the permissions and confinement assumptions of the standard command. Correct those host-level conditions rather than recreating the container repeatedly.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Update Portainer without losing stacks

Stacks and Portainer’s configuration depend on the data in portainer_data. Recreating the container is safe only when the replacement mounts that same volume at /data.

Before changing the image

  1. Record the current deployment: image tag, published ports, restart policy, socket mount, data volume and any Compose file.
  2. Read the release notes and check the replacement image you intend to use.
  3. Test the upgrade path on a non-critical system first. Portainer recommends this because releases can change behavior while adding features and fixes.
  4. Back up Portainer’s configuration before updating when your edition provides backup and restore support, and separately protect any application data stored in the Docker volumes managed through Portainer.
  5. Plan a maintenance window and make sure you can reach the VPS through an independent administrative channel if the web UI is temporarily unavailable.

Recreate a standalone container while retaining data

For a Docker-run installation, pull the replacement image, stop the current container, remove only the container, and run the replacement with the same volume and required mappings:

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
docker pull portainer/portainer-ce:sts
docker stop portainer
docker rm portainer

docker run -d 
  -p 8000:8000 
  -p 9443:9443 
  --name portainer 
  --restart=always 
  -v /var/run/docker.sock:/var/run/docker.sock 
  -v portainer_data:/data 
  portainer/portainer-ce:sts

Do not delete the portainer_data volume during this process. Removing the container is different from removing its named volume; the latter discards the persistent Portainer database.

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

Updating a Compose deployment

Keep the same Compose file and volume declaration, update the image reference as directed by the release documentation, then recreate the service with Compose. Confirm that the resulting service still mounts portainer_data:/data and publishes the ports you actually need. Inspect the service status and logs before signing in.

Update Agents after the Server

When you manage remote or Edge environments, update the Portainer Server first and the Agents afterward. Portainer specifically recommends this order because Agent compatibility can be affected by release changes. After each Agent update, confirm that the environment reconnects and that the expected Docker resources remain visible.

When Edge Agents and port 8000 are relevant

Agents are separate from the local socket connection used by a standalone VPS. They are useful when Portainer Server manages remote or Edge environments. The 8000 mapping in the standard command exposes Portainer’s TCP tunnel server for Edge tunnel features; it does not replace the local Docker socket and does not make ordinary local management more secure.

If your design includes Edge devices, document which systems initiate connections, which firewall directions are permitted, and whether a reverse proxy or network boundary sits in front of Portainer. Test an Agent connection after Server upgrades, then update Agents in the recommended order.

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

Deploying Portainer on Docker Swarm

Use the Swarm guide only after the VPS is part of a configured Docker Swarm. The documented path requires Swarm mode, a manager node, manager-worker communication on port 9001, downloading a stack manifest, and running docker stack deploy. It deploys one Portainer Server and a global Agent service across the cluster.

This model changes where services run and how they are administered. A Swarm manager must be able to communicate with workers, and firewall rules must allow the cluster’s required traffic. A lone VPS that is not intentionally operating a cluster should use the standalone Docker command or Compose instead; installing the Swarm stack adds complexity without solving a single-host requirement.

Operational checklist for a hosted VPS

  • Docker is installed, running and reachable with the permissions used by the deployment.
  • The portainer_data volume exists and is mounted at /data.
  • The Docker socket mount is present when using local-engine management.
  • Port 9443 is reachable only from the networks that need administrative access.
  • Port 8000 is published only when Edge tunnel features require it.
  • Port 9000 remains disabled unless a documented legacy integration needs HTTP.
  • The self-signed certificate warning is understood, or a trusted certificate is configured.
  • The exact deployment file and image tag are recorded for recovery.
  • Backups and a tested restore path exist before upgrades on important systems.
  • Portainer Server upgrades are tested before production and are completed before Agent upgrades.
  • Swarm is used only when the VPS belongs to an intentionally managed cluster.

Bottom line

For one VPS, create portainer_data, run Portainer CE against the local Docker socket, publish HTTPS on 9443, and browse to the VPS address with that port. Keep the data volume whenever you recreate the container. Add port 8000 only for Edge tunnel requirements, use a trusted certificate or reverse proxy when the service is internet-facing, and reserve the Swarm procedure for an actual multi-node Swarm.

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.

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 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.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

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.