# Installing Docker Docker is a service that allows you to quickly host containerized applications tailored for your hardware. # Running the Install Script [Docker](https://www.docker.com/) provides a convenient script for quickly installing their software and getting it ready.

You can find the [official Docker installation guide](https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script) on their website.

## Preparation First, we need to open our terminal to install a small application called *curl* that can be used to download files through the terminal. Enter this command and hit enter to automatically install the curl software: ```bash sudo apt-get install -y curl ```

You will be prompted to enter your password.

[![image.png](https://hub.subspace.services/uploads/images/gallery/2025-04/scaled-1680-/yk7image.png)](https://hub.subspace.services/uploads/images/gallery/2025-04/yk7image.png)[![image.png](https://hub.subspace.services/uploads/images/gallery/2025-04/scaled-1680-/v72image.png)](https://hub.subspace.services/uploads/images/gallery/2025-04/v72image.png)
## Installation Now, enter the following command to use *curl* to download the script that installs Docker and it's dependencies: ```bash curl -fsSL https://get.docker.com -o get-docker.sh ``` [![image.png](https://hub.subspace.services/uploads/images/gallery/2025-04/scaled-1680-/TZ7image.png)](https://hub.subspace.services/uploads/images/gallery/2025-04/TZ7image.png) Once the download is complete, you can enter this command to run the script we just downloaded: ```bash sh get-docker.sh ``` [![image.png](https://hub.subspace.services/uploads/images/gallery/2025-04/scaled-1680-/v8Eimage.png)](https://hub.subspace.services/uploads/images/gallery/2025-04/v8Eimage.png) The Docker setup process should proceed automatically and prompt you about further actions once it's finished. We do not need to follow these additional instructions. [![image.png](https://hub.subspace.services/uploads/images/gallery/2025-04/scaled-1680-/BTMimage.png)](https://hub.subspace.services/uploads/images/gallery/2025-04/BTMimage.png) We have successfully installed the Docker Container Engine on our server. # Graphic Card Integration Graphic cards handle images and videos much more efficiently than a traditional processor. While using Docker, some media services – such as [Plex](https://hub.subspace.services/books/media-servers/chapter/plex "Plex"), [Jellyfin](https://hub.subspace.services/books/media-servers/chapter/jellyfin "Jellyfin") or [Stash](https://hub.subspace.services/books/media-servers/chapter/stash "Stash") – will run much more efficiently if they have direct access to your graphics card. This process is different depending on the manufacturer of your graphics card. ## AMD/ATI You will need to install the ROCm software in order to use your graphics card within Docker. The process for [installing ROCm on Debian](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/quick-start.html#rocm-install-quick) is detailed in their documentation. Once installed, the graphics card can be attached to Docker containers. ## Intel Integrated graphics, like those in modern Intel processors, are innately available to Docker containers by providing access. ## Nvidia You will need to install the [Nvidia Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/index.html) in order to use your graphics card with Docker containers.

This requires that the [proprietary Nvidia drivers are installed](https://hub.subspace.services/books/software/page/graphics-card "Setting Up Your Graphics Card") and working correctly.

The process for [installing the required software](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) is detailed in their documentation. Once installed, the graphics card can be attached to Docker containers. # Creating Your First Container We will be installing [Portainer](https://www.portainer.io/), an open-source web application that makes it easy to manage Docker from your browser. [![Capture9.PNG](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/capture9.PNG)](https://hub.subspace.services/uploads/images/gallery/2025-03/capture9.PNG) ## Starting Portainer We are adding port 9000 which isn't used by default. This allows Portainer to be accessed through HTTP instead of HTTPS.

You can find the [official Portainer installation guide](https://docs.portainer.io/start/install-ce/server/docker/linux) on their website.

Using the terminal, we will issue the command to start our new Docker container: ```bash sudo docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /srv/portainer:/data portainer/portainer-ce ``` Docker will download the image and start the container. [![image.png](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/nyIimage.png)](https://hub.subspace.services/uploads/images/gallery/2025-03/nyIimage.png)Once the command has finished, we can verify that Portainer is operational by querying Docker's running containers: ```bash sudo docker ps ``` [![image.png](https://hub.subspace.services/uploads/images/gallery/2025-04/scaled-1680-/DX0image.png)](https://hub.subspace.services/uploads/images/gallery/2025-04/DX0image.png) The command should return our running Portainer container and show that it's available under four different ports. ## Creating an Admin Account In order to configure our instance of Portainer, we will need to open a web browser.

We recommend [Mozilla Firefox,](https://www.mozilla.org/en-US/firefox/) but [Google Chrome](https://www.google.com/chrome/) will also work.

Once the web browser is open, go to [http://localhost:9000/](http://localhost:9000/) to load Portainer. [![Capture.PNG](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/QSTcapture.PNG)](https://hub.subspace.services/uploads/images/gallery/2025-03/QSTcapture.PNG) Here, we are instructed to create an administrator account and set a secure password. This will be used in the future to login to Portainer.

**The account creation wizard will time-out if not completed quickly.** If this happens, restart Portainer with the command: *docker restart portainer*.

[![Capture2.PNG](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/jC5capture2.PNG)](https://hub.subspace.services/uploads/images/gallery/2025-03/jC5capture2.PNG) ## Adding Docker Once we have created an account, we will be able to select our Docker service. If everything is working as expected, you should be able to click 'Get Started' to use the local Docker service. [![Capture3.PNG](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/Q0jcapture3.PNG)](https://hub.subspace.services/uploads/images/gallery/2025-03/Q0jcapture3.PNG) This will bring you to a list of Docker installations that are available to Portainer.

You can use the [Portainer Agent](https://docs.portainer.io/admin/environments/add/docker/agent) to control Docker on additional servers.

[![Capture4.PNG](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/oADcapture4.PNG)](https://hub.subspace.services/uploads/images/gallery/2025-03/oADcapture4.PNG) Now, we can configure the name of our Docker server, for personal preference, as well as set the root IP address of our server so we can quickly access our services from Portainer. Select the pencil icon next to your "local" Environment. [![Capture7.PNG](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/capture7.PNG)](https://hub.subspace.services/uploads/images/gallery/2025-03/capture7.PNG) If you are unsure about the LAN IP address [we selected earlier](https://hub.subspace.services/books/software/page/networking "Static Network IP"), you can run the command below to obtain it: ```bash ip -o route show | grep default ``` [![image.png](https://hub.subspace.services/uploads/images/gallery/2025-02/scaled-1680-/rzDimage.png)](https://hub.subspace.services/uploads/images/gallery/2025-02/rzDimage.png) Once you have completed that, you can save the settings to apply them. When returning to the home screen, we can see that our settings were updated. [![Capture8.PNG](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/capture8.PNG)](https://hub.subspace.services/uploads/images/gallery/2025-03/capture8.PNG) Clicking on our Docker environment – named "Home Server" here – will pull up a list of our running containers. You can see the first and only one listed is our newly created Portainer installation. [![Capture9.PNG](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/capture9.PNG)](https://hub.subspace.services/uploads/images/gallery/2025-03/capture9.PNG) Clicking on "8000:8000" under assigned ports will open this port using your web browser. In this instance, it should open Portainer in a new tab. [![Capture8.PNG](https://hub.subspace.services/uploads/images/gallery/2025-03/scaled-1680-/capture8.PNG)](https://hub.subspace.services/uploads/images/gallery/2025-03/capture8.PNG)