Portainer is a lightweight management UI for Docker that allows you to easily manage your Docker containers, images, networks, and volumes. In this tutorial, we will show you how to install Portainer on Ubuntu Server latest.
Before we begin, you need to have the following:
The first step is to pull the Portainer image from Docker Hub. You can do this by running the following command:
sudo docker pull portainer/portainer-ce
This command will download the latest Portainer image and save it on your system.
Now that we have pulled the Portainer image, we can start Portainer by running the following command:
sudo docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce
This command will start the Portainer container in detached mode with the following options:
-d
: Run the container in detached mode.-p 9000:9000
: Map the container port 9000 to the host port 9000.--name portainer
: Name the container "portainer".--restart always
: Tell Docker to always restart the container if it exits unexpectedly.-v /var/run/docker.sock:/var/run/docker.sock
: Mount the Docker socket from the host into the container.Once Portainer is running, you can access it by opening a web browser and navigating to http://YOUR_SERVER_IP:9000
.
You should see the Portainer login page. Choose a username and password to create your admin account.
After logging in, you can use Portainer to manage your Docker environment. You can create new Docker containers, images, networks, and volumes, as well as manage the ones that already exist.
Congratulations! You have successfully installed and configured Portainer on Ubuntu Server latest. With Portainer, managing your Docker environment has never been easier.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!