Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


xpd

xpd

Geek of Coastguard
14115 posts

Uber Geek
+1 received by user: 4574

Retired Mod
ID Verified
Trusted
Lifetime subscriber

#310977 4-Dec-2023 16:55
Send private message

Trying to setup SmokePing at home using Ubuntu Server. Installation is fine, SP is running, but my issue is that I cannot update the config files.

 

If I try via visudo, the files appear blank - but when saved, they appear as new files with the same filename - wt_f.

 

Try via WinSCP, and get access denied upon trying to save - due to root permissions etc. 

 

Tried setting up a new user with complete root access but this does not appear to work either.

 

 

 

Suggestions ?

 

My Linux experience is just above beginner ;)

 

 





XPD / Gavin

 

LinkTree

 

 

 


Create new topic
michaelmurfy
meow
13579 posts

Uber Geek
+1 received by user: 10910

Moderator
ID Verified
Trusted
Lifetime subscriber

  #3168060 4-Dec-2023 17:08
Send private message

Would recommend diving into Docker instead.

 

So basically, install Docker then use the docker-compose method on here: https://docs.linuxserver.io/images/docker-smokeping/ 

 

Essentially:
Install docker - https://docs.docker.com/engine/install/ubuntu/ 
Give permission to your user (sudo adduser username docker)
In your home folder - create a new directory (mkdir ~/smokeping)
cd ~/smokeping
mkdir config
mkdir data

 

Then edit docker-compose.yaml (see the above linuxserver.io URL for the docker-compose file) taking note of the volumes replacing /path/to/smokeping/ with /home/username/smokeping/ as an example.

 

 

Build it - docker compose up --build -d

 

Then you'll note in your ~/smokeping/config/ you'll have your configuration there.

 

docker ps to list all running containers.
docker compose restart to restart the container (from within the ~/smokeping folder) when you make any changes.

 

Then use Cloudflare Zero Trust Tunnel to expose it to the internet if you want to (no need to forward any ports) else Smokeping will be made available on port 80 on the default installation. If you wish to replace this with another port then modify your docker-compose to match (eg 8080:80 to expose it on 8080 instead).

 

To facilitate auto updates just simply run this to spawn a Watchtower container: 

 

docker run -d --name watchtower --restart always -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower

 

This method allows you to run many things on one host. It is more secure, easier to keep up to date and with Cloudflare Zero Trust Tunnel this allows you to expose services with less risk (this is a free service).





Michael Murphy | https://murfy.nz
Referral Links: Quic Broadband (use R122101E7CV7Q for free setup)

Are you happy with what you get from Geekzone? Please consider supporting us by subscribing.
Opinions are my own and not the views of my employer.




Firesphere
23 posts

Geek
+1 received by user: 30


  #3168061 4-Dec-2023 17:08
Send private message

Assuming you have a standard installation set up, with SmokePing via apt, I'd say, try editing with

 

sudo vi /etc/smokeping/configfile-you-want-to-edit

 

You can use nano as well, probably, instead of vi. Some people prefer nano, others prefer vi(m)

 

visudo is not "vi in sudo mode", by the way, visudo is for editing the sudoers file itself, so maybe that's where the oddity comes from with the same named files?


jlittle
200 posts

Master Geek
+1 received by user: 76

ID Verified
Subscriber

  #3168081 4-Dec-2023 17:33
Send private message

Firesphere:

visudo is not "vi in sudo mode", by the way, visudo is for editing the sudoers file itself


Maybe "sudoedit" or "sudo -e" was the intention... This is safer than running an editor as root; one generally doesn't know what files an editor modify, especially a GUI editor. A copy is made, you edit the copy, then on save the new version is copied over the target.
Set EDITOR to your editor of choice:
```
export EDITOR=nano
```




Regards, John Little




BadCo
109 posts

Master Geek
+1 received by user: 29


  #3168098 4-Dec-2023 18:56
Send private message

michaelmurfy:

Would recommend diving into Docker instead.


So basically, install Docker then use the docker-compose method on here: https://docs.linuxserver.io/images/docker-smokeping/ 


Essentially:
Install docker - https://docs.docker.com/engine/install/ubuntu/ 
Give permission to your user (sudo adduser username docker)
In your home folder - create a new directory (mkdir ~/smokeping)
cd ~/smokeping
mkdir config
mkdir data


Then edit docker-compose.yaml (see the above linuxserver.io URL for the docker-compose file) taking note of the volumes replacing /path/to/smokeping/ with /home/username/smokeping/ as an example.


Build it - docker compose up --build -d


Then you'll note in your ~/smokeping/config/ you'll have your configuration there.


docker ps to list all running containers.
docker compose restart to restart the container (from within the ~/smokeping folder) when you make any changes.


Then use Cloudflare Zero Trust Tunnel to expose it to the internet if you want to (no need to forward any ports) else Smokeping will be made available on port 80 on the default installation. If you wish to replace this with another port then modify your docker-compose to match (eg 8080:80 to expose it on 8080 instead).


To facilitate auto updates just simply run this to spawn a Watchtower container: 


docker run -d --name watchtower --restart always -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower


This method allows you to run many things on one host. It is more secure, easier to keep up to date and with Cloudflare Zero Trust Tunnel this allows you to expose services with less risk (this is a free service).



I second this and the great explanation. This is the way.

xpd

xpd

Geek of Coastguard
14115 posts

Uber Geek
+1 received by user: 4574

Retired Mod
ID Verified
Trusted
Lifetime subscriber

  #3168107 4-Dec-2023 19:02
Send private message

Yeah, been down docker route, had hit and miss with it, keen to use more. However the PC I had it running on happily, has been packed away for a house move and no way I can find it in the masses of boxes :D

 

Thought Id give SmokePing a try on VBox for now :D I'll try some of the above suggestions, and if no go, wait until Ive got my docker PC out :D

 

 





XPD / Gavin

 

LinkTree

 

 

 


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.