# Gladys on Ubuntu server mini-PC: first steps and debugging

**URL:** <https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020>\
**Category:** Configuration\
**Created:** [July 27, 2024, 6:21pm UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020 "2024-07-27T18:21:16Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmar](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/46a35a/32.png) [@dmar](https://community.gladysassistant.com/u/dmar)\
**Post date:** [July 27, 2024, 6:21pm UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020/1 "2024-07-27T18:21:16Z")

</div>

Hello everyone,  
I’m opening a thread (another one…) about my Gladys installation on a mini PC. I want to build a “pilot” setup in an outbuilding of a large house, before possibly extending it to the whole house (alarm, lighting…). Not very familiar with Linux systems and coding, I’m giving it a go! 😃

I bought a Lenovo ThinkCentre M700 mini PC on Leboncoin (4GB RAM, some i5, 250GB SSD) and a Sonoff Zigbee dongle. Very energy-efficient and not heating up, it will be installed in a closet.

 ![20240727_184127](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/d/9/d93f1ac319eab4048cb8188e586e548bdc58588e.jpeg)

For installing Ubuntu Server 24.04 LTS, I based myself on this excellent video [https://youtu.be/zs2zdVPwZ7E?si=Dk7-02h-jmhxb88k](https://youtu.be/zs2zdVPwZ7E?si=Dk7-02h-jmhxb88k). The image is written to a small USB stick using [Rufus](https://rufus.ie/fr/). **The installation must be done without plugging in the Sonoff dongle!**

After reboot, I lock the IP on my Livebox’s control panel and connect to my server from my Windows computer using Powershell: `ssd user@gladys`.

Ubuntu by default suggests updating preinstalled packages: `apt list --upgradable sudo apt-get update sudo apt-get upgrade`.

Then I start following @pierre-gilles’s excellent tutorial on the site and YouTube. `curl -sSL https://get.docker.com | sh`

Setting up non-root access for my user:  
`sudo apt-get install -y uidmap`  
`sudo apt-get install docker-ce-rootless-extras`  
`dockerd-rootless-setuptool.sh install`  
`sudo loginctl enable-linger user`  
`sudo systemctl enable docker.service`  
`sudo systemctl enable containerd.service`

Then continuing the tutorial with the two big installation commands for the Gladys & WatchTower containers. Then… nothing… I try to access Gladys at its IP in my browser: nothing!

What could be some ways to get it working?

Thanks in advance for your help, I hope the beginning of my approach can help beginners!

dmar  
🙂

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [July 27, 2024, 8:57pm UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020/2 "2024-07-27T20:57:45Z")

</div>

Good evening,

Did the commands to install Gladys return an error for you?

What does the command `docker ps -a` return (lists the created containers)?

What does the command `docker logs gladys` return (logs from the gladys container)?

---

<div class="post-metadata">

**Author:** ![dmar](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/46a35a/32.png) [@dmar](https://community.gladysassistant.com/u/dmar)\
**Post date:** [July 30, 2024, 6:45am UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020/3 "2024-07-30T06:45:11Z")

</div>

Hello cicoub13, thanks for your message.  
To my knowledge, there was no error during the installation.

Here is the output of the commands:  
`docker ps -a`

> CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES  
> 4d810c80d507 gladysassistant/gladys «&nbsp;docker-entrypoint.s…&nbsp;» 2 days ago Exited (255) 2 days ago 80/tcp jovial\_agnesi  
> 46f395860381 hello-world «&nbsp;/hello&nbsp;» 2 days ago Exited (0) 2 days ago determined\_shannon  
> 6ba731e5e6c4 containrrr/watchtower «&nbsp;/watchtower --clean…&nbsp;» 2 days ago Up Less than a second (health: starting) 8080/tcp watchtower  
> e6df1476485e hello-world «&nbsp;/hello&nbsp;» 2 days ago Exited (0) 2 days ago peaceful\_keldysh  
> 202d1f85d4a6 gladysassistant/gladys:v4 «&nbsp;docker-entrypoint.s…&nbsp;» 2 days ago Created gladys

So I deduce that there are two images in Docker: gladysassistant/gladys and  
gladysassistant/gladys:v4? Watchtower is there as well.

However the command `docker logs gladys` outputs nothing…

![console](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/4/e/4e0aaf9e02ef5b989036a786a059f6a1b824d9c9.png)

It looks like Gladys is not responding?

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [July 30, 2024, 7:22am UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020/4 "2024-07-30T07:22:55Z")

</div>

Yes, there is indeed a version of Gladys that needs to be removed  
`docker rm jovial_agnesi`

Very strange that there are no logs. Can you restart the container and rerun the logs command?

`docker restart gladys`  
`docker logs gladys`

---

<div class="post-metadata">

**Author:** ![dmar](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/46a35a/32.png) [@dmar](https://community.gladysassistant.com/u/dmar)\
**Post date:** [July 30, 2024, 9:10am UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020/5 "2024-07-30T09:10:00Z")

</div>

Removing the other Gladys version worked. I ran `docker ps -a` to check and it no longer appears.

The restart command doesn’t work:

> Error response from daemon: Cannot restart container gladys: error while creating mount source path ‹&nbsp;/var/lib/gladysassistant&nbsp;›: mkdir /var/lib/gladysassistant: permission denied

I don’t have the rights…? I thought I had taken the necessary steps to configure my docker daemon profile. As a result the logs command still doesn’t work.

I tried running the command as root (I’d rather avoid that access, I’m not proficient enough to venture into anything that could break everything). `sudo docker restart gladys`

> Error response from daemon: No such container: gladys

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [July 30, 2024, 9:53am UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020/6 "2024-07-30T09:53:20Z")

</div>

You do have the rights to run `docker` commands 👍  
I think that creating the gladys container didn’t work because mounting the volume is impossible (lack of permissions).  
Can you make sure that the folder `/var/lib/gladysassistant` belongs to you (or that you have permissions on it)?

(Since you started the container from your user, root doesn’t know it, that’s normal)

---

<div class="post-metadata">

**Author:** ![dmar](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/46a35a/32.png) [@dmar](https://community.gladysassistant.com/u/dmar)\
**Post date:** [July 30, 2024, 10:25am UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020/7 "2024-07-30T10:25:02Z")

</div>

If I managed to navigate correctly to the file hierarchy, there is no gladysassistant directory in `/var/lib`

> dmar@gladys:/var/lib$ pwd  
> /var/lib  
> dmar@gladys:/var/lib$ ls  
> app-info command-not-found dpkg landscape os-prober private snapd ubuntu-advantage unattended-upgrades vim  
> apport containerd fwupd libuuid PackageKit python sudo ubuntu-drivers-common update-manager xml-core  
> apt dbus git logrotate pam sgml-base swcatalog ubuntu-release-upgrader update-notifier  
> boltd dhcpcd grub man-db plymouth shells.state systemd ucf upower  
> cloud docker ieee-data misc polkit-1 shim-signed tpm udisks2 usb\_modeswitch

(Moving around the file hierarchy for dummies [https://youtu.be/jgcXclSXnVo?si=Jybom0pq31P\_INBd](https://youtu.be/jgcXclSXnVo?si=Jybom0pq31P_INBd)).

Is reinstalling enough to get everything back to normal? (Like reinstalling a .exe over a buggy program on Windows.)

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [July 30, 2024, 1:25pm UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020/8 "2024-07-30T13:25:11Z")

</div>

I don’t think the tutorial is intended to run Docker in user mode (and not as root).

The following two commands let you create the directory and change its owner (to yourself).

`sudo mkdir /var/lib/gladysassistant`  
`sudo chown dmar:dmar /var/lib/gladysassistant/`

Once the directory has been created, you can restart Gladys

`docker restart gladys`

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [August 5, 2024, 10:03am UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020/9 "2024-08-05T10:03:50Z")

</div>

@dmar did you manage to set up Gladys in the end ?

Indeed, the tutorial is designed to run Gladys as root. If you don’t run the container as root, there are several things you’ll have to handle :

- Ensure the container keeps running if you log out of the user session
- Allow the non-root user to run a program on port 80
- To check, but not sure that everything like USB ports / Bluetooth scanning / network scanning will work correctly (I haven’t tested it, I admit)

---

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [August 19, 2024, 9:18am UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020/10 "2024-08-19T09:18:52Z")

</div>

Hi,

Do you want me to add information to the tutorial I wrote on the forum for [installing Gladys on a mini PC](https://community.gladysassistant.com/t/installer-gladys-sur-un-mini-pc/7791)?

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [August 19, 2024, 12:51pm UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020/11 "2024-08-19T12:51:21Z")

</div>

My pleasure 🙂

---

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [August 20, 2024, 7:55am UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020/12 "2024-08-20T07:55:22Z")

</div>

What do you want me to add, and at which step?

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [August 23, 2024, 7:01am UTC](https://community.gladysassistant.com/t/gladys-sur-serveur-ubuntu-mini-pc-premiers-pas-et-debogages/9020/13 "2024-08-23T07:01:29Z")

</div>

Ah I don’t know I thought you had something in mind
