HI Folks,
Total novice to the Container scene, so would like to use Portainer to look after my containers.
Problem is once I have loaded Portainer, I am unable to access it through the GUI. So I think I am missing some thing in the setting up of it. Have the internal link load a password for the admin, but it comes up with an error message.
Can anyone do me a walk through for CS for Portainer?
Thanks.
Dwight1379
Portainer setup
-
- Starting out
- Posts: 24
- Joined: Tue Nov 24, 2020 6:11 am
Portainer setup
Happy Owner of a TS-H973AX
4 off 4TB WD red spinners,
2 off 2TB WD Red SSD,
Cache 2 off WD 1TB Black U.2. Where there's a will there's a way!
4 off 4TB WD red spinners,
2 off 2TB WD Red SSD,
Cache 2 off WD 1TB Black U.2. Where there's a will there's a way!
-
- New here
- Posts: 7
- Joined: Sat Jun 25, 2016 10:48 pm
Re: Portainer setup
Hi Dwight1379,
How do you have installed portainer (from qnapclub) ?
What is your message error ?
Regards
nasaes
How do you have installed portainer (from qnapclub) ?
What is your message error ?
Regards
nasaes
-
- Starting out
- Posts: 14
- Joined: Tue May 10, 2016 6:12 am
Re: Portainer setup
This is how I do it for my NAS:
1. I created a shared folder named "portainer" in FileStation. You don't have to do this. But I wanted a persistent volume where Portainer's data would be stored and that I could easily access, just in case.
2. Open ContainerStation.
3. Click "Create" in ContainerStation.
4. Click "Create Application". All this is actually just QNAP's UI/frontend for Docker Compose.
5. Enter a name where it says "Application name". I just call everything the name of the app plus the name of my NAS. For example, "Portainer453".
6. In the YAML field, enter the Portainer template for Docker Compose. Here's mine as an example:
In case it's not obvious, a # is a comment. I added those so I can remember what certain lines mean. I don't use HTTPS, so I have the line with port 9443 commented out. If you do use HTTPS, you could uncomment the # at the beginning of the line to use it.
Under volumes, I'm pointing Docker to the shared folder I created named "portainer" in Step 1. You'll know it's working if after you start Portainer it fills up with files and directories.
If you use my example, be really careful with the spacing/syntax. Docker can be picky with that stuff. One way to double-check if you've got obvious mistakes is to click the "Validate YAML" button.
7. Click "Create".
8. If everything works, you're almost done. ContainerStation will create the Docker container and start it. You should then be able to access it via your NAS address and port 9000. For example, if your NAS is at 192.168.1.50, you would visit: http://192.168.1.50:9000. In case it's not absolutely clear, you want to use YOUR NAS IP. 192.168.1.50 is just one I made up as an example.
9. Complete the Portainer setup. Enter a username and password, then click "Create user".
10. This step is just informational. In my Compose template the comment "#Portainer TS-453 #Home->Environments->Local: Set Public IP" is there as a reminder to set a Public IP. That way when you click on links from running containers where it says "Published Ports" it will open the application at the Public IP you choose instead of trying to use a default internal IP. So that way 192.168.1.50:5000 will open instead of 127.0.0.1:5000 (as an example) .
11. Click "Environments" in the Portainer sidebar.
12. Click "local".
13. Where it says "Public IP", enter the IP address of your NAS. Such as 192.168.1.50, using the above example from step 8.
14. Click "Update environment".
To create your first Stack/Container, click "Home" in the Portainer sidebar, then click "local".
"Stacks" are equivalent to ContainerStation's "Create Application", but better. An easy way to create Docker containers using Docker Compose templates.
Learning how to use Portainer is something you'll just have to lookup tutorials for separately, but IMO Portainer is easier to use than ContainerStation. So I just have ContainerStation start Portainer automatically, and then create everything else as a Portainer Stack.
One big benefit to Portainer is that it has a built-in option to "Recreate" a container and "Pull the latest image" at the same time. This means you can update containers in one step instead of the usual process of deleting the container. Deleting the old Docker image. And then recreating the container with the latest image.
1. I created a shared folder named "portainer" in FileStation. You don't have to do this. But I wanted a persistent volume where Portainer's data would be stored and that I could easily access, just in case.
2. Open ContainerStation.
3. Click "Create" in ContainerStation.
4. Click "Create Application". All this is actually just QNAP's UI/frontend for Docker Compose.
5. Enter a name where it says "Application name". I just call everything the name of the app plus the name of my NAS. For example, "Portainer453".
6. In the YAML field, enter the Portainer template for Docker Compose. Here's mine as an example:
Code: Select all
#Portainer TS-453 #Home->Environments->Local: Set Public IP
version: '3'
services:
portainer:
image: portainer/portainer-ce
container_name: portainer453
ports:
- 9000:9000 #http UI.
# - 9443:9443 #https UI.
# - 8000:8000/tcp #Optional and is only required if you plan to use the Edge compute features with Edge agents.
volumes:
- /share/portainer:/data
- /etc/TZ:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
security_opt:
- no-new-privileges:true
restart: unless-stopped
Under volumes, I'm pointing Docker to the shared folder I created named "portainer" in Step 1. You'll know it's working if after you start Portainer it fills up with files and directories.
If you use my example, be really careful with the spacing/syntax. Docker can be picky with that stuff. One way to double-check if you've got obvious mistakes is to click the "Validate YAML" button.
7. Click "Create".
8. If everything works, you're almost done. ContainerStation will create the Docker container and start it. You should then be able to access it via your NAS address and port 9000. For example, if your NAS is at 192.168.1.50, you would visit: http://192.168.1.50:9000. In case it's not absolutely clear, you want to use YOUR NAS IP. 192.168.1.50 is just one I made up as an example.
9. Complete the Portainer setup. Enter a username and password, then click "Create user".
10. This step is just informational. In my Compose template the comment "#Portainer TS-453 #Home->Environments->Local: Set Public IP" is there as a reminder to set a Public IP. That way when you click on links from running containers where it says "Published Ports" it will open the application at the Public IP you choose instead of trying to use a default internal IP. So that way 192.168.1.50:5000 will open instead of 127.0.0.1:5000 (as an example) .
11. Click "Environments" in the Portainer sidebar.
12. Click "local".
13. Where it says "Public IP", enter the IP address of your NAS. Such as 192.168.1.50, using the above example from step 8.
14. Click "Update environment".
To create your first Stack/Container, click "Home" in the Portainer sidebar, then click "local".
"Stacks" are equivalent to ContainerStation's "Create Application", but better. An easy way to create Docker containers using Docker Compose templates.
Learning how to use Portainer is something you'll just have to lookup tutorials for separately, but IMO Portainer is easier to use than ContainerStation. So I just have ContainerStation start Portainer automatically, and then create everything else as a Portainer Stack.
One big benefit to Portainer is that it has a built-in option to "Recreate" a container and "Pull the latest image" at the same time. This means you can update containers in one step instead of the usual process of deleting the container. Deleting the old Docker image. And then recreating the container with the latest image.
Last edited by cecoates on Sat Nov 26, 2022 4:21 am, edited 1 time in total.
-
- Starting out
- Posts: 24
- Joined: Tue May 14, 2019 9:53 am
Re: Portainer setup
@cecoates
Thank you - that worked out great for me although I could not get step 10 to work, would give my an error when I ran the check.
Thank you - that worked out great for me although I could not get step 10 to work, would give my an error when I ran the check.