Installing acme.sh and getting a verbose control flow output

After SSHing to my shared hosting (Namecheap) non-root user-account, I ran basically this:

cd "$web_application_root_dir"/downloadtest`
curl https://get.acme.sh

I got this:

#!/usr/bin/env sh

#GitHub - acmesh-official/get.acme.sh: get.acme.sh

_exists() {
cmd="$1"
if [ -z "$cmd" ] ; then
echo "Usage: _exists cmd"
return 1
fi
if type command >/dev/null 2>&1 ; then
command -v $cmd >/dev/null 2>&1
else
type $cmd >/dev/null 2>&1
fi
ret="$?"
return $ret
}

if [ -z "$BRANCH" ]; then
BRANCH="master"
fi

#format "email=my@example.com"
_email="$1"

if [ "$_email" ]; then
shift
_email="--$(echo "$_email" | tr '=' ' ')"
fi

_url="https://raw.githubusercontent.com/acmesh-official/acme.sh/$BRANCH/acme.sh"

_get=""

if _exists curl && [ "${ACME_USE_WGET:-0}" = "0" ]; then
_get="curl -L"
elif _exists wget ; then
_get="wget -O -"
else
echo "Sorry, you must have curl or wget installed first."
echo "Please install either of them and try again."
exit 1
fi

if ! $_get "$_url" | sh -s -- --install-online $_email "$@"; then
echo "Install error"
echo "中国大陆用户请参考:"
echo "Install in China · acmesh-official/acme.sh Wiki · GitHub"
fi

This doesn't make sense to me primarily because curl and wget are already available for my non root user account.

Anyways, I then tried this instead:

curl https://get.acme.sh | sh

I got this:

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
103 1032 0 1032 0 0 3005 0 --:--:-- --:--:-- --:--:-- 7267
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 216k 100 216k 0 0 234k 0 --:--:-- --:--:-- --:--:-- 295k
[Thu Nov 23 21:10:40 EST 2023] Installing from online archive.
[Thu Nov 23 21:10:40 EST 2023] Downloading https://github.com/acmesh-official/acme.sh/archive/master.tar.gz
[Thu Nov 23 21:10:40 EST 2023] Extracting master.tar.gz
[Thu Nov 23 21:10:40 EST 2023] It is recommended to install socat first.
[Thu Nov 23 21:10:40 EST 2023] We use socat for standalone server if you use standalone mode.
[Thu Nov 23 21:10:40 EST 2023] If you don't use standalone mode, just ignore this warning.
[Thu Nov 23 21:10:40 EST 2023] Installing to /home/MY_WONDERFUL_USER_NAME/.acme.sh
[Thu Nov 23 21:10:40 EST 2023] Installed to /home/MY_WONDERFUL_USER_NAME/.acme.sh/acme.sh
[Thu Nov 23 21:10:41 EST 2023] Installing alias to '/home/MY_WONDERFUL_USER_NAME/.bashrc'
[Thu Nov 23 21:10:41 EST 2023] OK, Close and reopen your terminal to start using acme.sh
[Thu Nov 23 21:10:41 EST 2023] Installing cron job
[Thu Nov 23 21:10:42 EST 2023] Good, bash is found, so change the shebang to use bash as preferred.
[Thu Nov 23 21:10:45 EST 2023] OK

I just want one SSL certificate for a mediawiki website, is "socat" relevant for me?
What is this "standalone mode"? I mean, standalone of what? As my server environment is shared hosting, I dobut it relates to me but please do opine on this.

Would it be decent to say that I have installed acme.sh successfully?

Check here:

and here:

4 Likes

Moved to Help from Client Dev

3 Likes

I already ran the command:

curl https://get.acme.sh | sh

As this is a shared server environment, I don't have a root user there. Thus, I carefully ask:
How could I safely remove acme.sh in case I want to try to install it via one of the two ways you shared?

We are not the general support forum for acme.sh. Bruce has already provided you the links to its github where such questions are better directed.

We would certainly help if you had problems using it to get a Let's Encrypt cert. But, asking about install or how ideally to setup some script is better directed at their github

Also, I haven't seen any evidence you actually use it with Let's Encrypt certs. By default acme.sh uses certs from ZeroSSL. You must specifically request LE certs and I haven't seen you do that.

We are a helpful community but you have to help too by reading the docs for the products you chose.

6 Likes

Please check here https://github.com/acmesh-official/acme.sh/blob/master/acme.sh#L6837 to see the available command options, I suggest looking at the --uninstall option.

showhelp() {
  _initpath
  version
  echo "Usage: $PROJECT_ENTRY <command> ... [parameters ...]
Commands:
  -h, --help               Show this help message.
  -v, --version            Show version info.
  --install                Install $PROJECT_NAME to your system.
  --uninstall              Uninstall $PROJECT_NAME, and uninstall the cron job.
6 Likes

Hello Mike and thank you for trying to help me !

I thought that this forum covers the acme.sh software as well. Obviously, I was wrong. My aplogies and I will avoid ffrom creating more original posts about it here.

Up until reading your comment I didn't know that acme.sh doesn't use Let's Encrypt certifications by default (I assumed it is).

One more thing, I read the "help" tag post structure carefully but figured that my last questions are too broad to include a domain. As you know, in general, rules can have exceptions so I thought these could have did due to their broadness :slight_smile:

1 Like
3 Likes

I used to create Let's Encrypt SSL certificates with Certbot on Digital Ocean droplets a few years back and I should be back to do so again.
Man how simple it is with Certbot on a good IaaS or VPS.

Thanks.

2 Likes

I guess you forgot we covered this in a previous thread with you

And it appears near the top of the instructions for acme.sh itself. You really should do some more background reading about the tools you are using

6 Likes

I guess you forgot we covered this in a previous thread with you

I don’t recall that; you are welcome to give an example or a few examples but anyway, have you thought about the option that I missed some datum or even data or didn't figure something out by mistake or by some natural cause? That might have been the case.

And it appears near the top of the instructions for acme.sh itself. You really should do some more background reading about the tools you are using

I hope that you have said this only in the context of this post here or two or more recent relevant posts here because you don't know me personally or even about me in general and I have made it quite clear several times that I know almost nothing about SSL certifications and was very careful in my premises and questions about that topic here.

You can believe me are not that in general I read enough about software I am using and may not want to become an expert on SSL certification or any other computing field which is a computing field quite far from Bash-HTML-JavaScript-CSS-CMSs or simply webmastering, which is my field of expertise.

A non-cynical (not non-sarcastic, non-cynical) approach, could help.

I believe that I understand your frustrations and I'm hoping that you understand ours. We are a relatively small community of volunteer helpers who try to provide polite, correct, and timely advice to those struggling to acquire and utilize Let's Encrypt certificates. Due to the depth and volume of conversations we handle here, we must sometimes encourage those seeking our assistance to "learn to fish" rather than expending considerable amounts of our limited energy "pointing out and catching the fish". Sometimes we lose our patience a bit, myself included, as you've seen in your other thread about CertSage. Sorry about that. You appear to me to be someone who understands fundamental web technologies from the knowledgeable information in several of your posts. Given that you learned all that, I don't think it's a big stretch to kindly request that you read some basic certificate fundamentals and software-usage-related information as certificates are, in our view, rather key to fundamental (e.g. secure) functionality of many web technologies across the globe. Admittedly, reaching a certain level of understanding can be a bit daunting at first, but we promise it's not all that bad because all of us here have been through it, mostly of our own learning. :slightly_smiling_face:

6 Likes

I thank you for the kind words and I agree with most of this and I also think that in general we should teach how to solve a problem instead of just solving it (for someone else), but as you know, often there are two or more approaches to solve a problem ("two or more tools to get the job done").

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.