# How do I reinstall LetsEncrypt files on a new computer?

**URL:** <https://community.nginx.org/t/how-do-i-reinstall-letsencrypt-files-on-a-new-computer/5916>\
**Category:** NGINX\
**Tags:** lets-encrypt\
**Created:** [August 12, 2025, 6:08pm UTC](https://community.nginx.org/t/how-do-i-reinstall-letsencrypt-files-on-a-new-computer/5916 "2025-08-12T18:08:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ManagerServerRose](https://drob5swvtjqxg.cloudfront.net/user_avatar/community.nginx.org/managerserverrose/32/452_2.png) [@ManagerServerRose](https://community.nginx.org/u/ManagerServerRose)\
**Post date:** [August 12, 2025, 6:08pm UTC](https://community.nginx.org/t/how-do-i-reinstall-letsencrypt-files-on-a-new-computer/5916/1 "2025-08-12T18:08:56Z")

</div>

I’ve changed computers. I had backups of nginx.conf & the files in sites-available. After installing nginx and certbot on the new computer, I copied nginx.conf and the appropriate files (which contain the LetsEncrypt references) to sites-available and created the links to them in sites-enabled. I’ve tried running “nginx -t” but it has problems with nginx.conf presumably due to the LetsEncrypt files being missing. How do I reinstall the LetsEncrypt files on the new computer?

---

<div class="post-metadata">

**Author:** ![alessandro](https://drob5swvtjqxg.cloudfront.net/user_avatar/community.nginx.org/alessandro/32/4836_2.png) [@alessandro](https://community.nginx.org/u/alessandro)\
**Post date:** [August 12, 2025, 10:20pm UTC](https://community.nginx.org/t/how-do-i-reinstall-letsencrypt-files-on-a-new-computer/5916/2 "2025-08-12T22:20:10Z")

</div>

Hey @ManagerServerRose! This seems more like a LetsEncrypt question. I would suggest asking in their forum. If you don’t have access to the original certs, my go to solution would be to get a new set of certs by going through certbot again, but the folks over at LetsEncrypt might have better suggestions than I 🙂

---

<div class="post-metadata">

**Author:** ![ManagerServerRose](https://drob5swvtjqxg.cloudfront.net/user_avatar/community.nginx.org/managerserverrose/32/452_2.png) [@ManagerServerRose](https://community.nginx.org/u/ManagerServerRose)\
**Post date:** [August 13, 2025, 11:15am UTC](https://community.nginx.org/t/how-do-i-reinstall-letsencrypt-files-on-a-new-computer/5916/3 "2025-08-13T11:15:27Z")

</div>

Thanks. The problem was having certbot lines in the 2 virtual server files I removed them and ran “cerbot –nginx -d [johnrose.mywire.org](http://johnrose.mywire.org) -d [roseserver.mywire.org](http://roseserver.mywire.org)” which created the appropriate LetsEncrypt files and put lines referencing them in the 2 Virtual Host files. However, “nginx -t” gave:  
manager@Server:~$ sudo nginx -t  
2025/08/13 12:02:03 [warn] 43701#43701: conflicting server name “” on 0.0.0.0:80, ignored  
2025/08/13 12:02:03 [warn] 43701#43701: conflicting server name “[roseserver.mywire.org](http://roseserver.mywire.org)” on 0.0.0.0:80, ignored  
2025/08/13 12:02:03 [warn] 43701#43701: conflicting server name “” on [::]:80, ignored  
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok  
nginx: configuration file /etc/nginx/nginx.conf test is successful

Should the 2 Virtual Host files be different in some way in order to avoid this problem?

PS I’ve attached the 2 files, with .txt added to their filenames.

[roseserver.mywire.org.txt](https://community.nginx.org/uploads/short-url/3sSXy082YBcTOUrKoDZtd7VPSyQ.txt) (1.3 KB)

[johnrose.mywire.org.txt](https://community.nginx.org/uploads/short-url/vDmWPV4PHDU0lG38YMHfbQXfscB.txt) (1.2 KB)

---

<div class="post-metadata">

**Author:** ![alessandro](https://drob5swvtjqxg.cloudfront.net/user_avatar/community.nginx.org/alessandro/32/4836_2.png) [@alessandro](https://community.nginx.org/u/alessandro)\
**Post date:** [August 13, 2025, 1:12pm UTC](https://community.nginx.org/t/how-do-i-reinstall-letsencrypt-files-on-a-new-computer/5916/4 "2025-08-13T13:12:08Z")

</div>

Yup! You want to avoid having multiple server blocks (a.k.a. vHosts) in NGINX listening on the same port using the same server name. In this case you do not define a `listen` directive in the first server block, so NGINX defaults to port 80:

```auto
server {
  server_name roseserver.mywire.org;
  root /home/manager/www/html;
...

```

You then have a different code block where you listen on port 80 and use the same server name:

```auto
server {
  server_name roseserver.mywire.org;
  listen 80;
}

```

Each server block needs to have a unique combination of listening port and server name.

While at it, you also have some blocks that you really don’t need. This block here does nothing so you can probably get rid of it:

```auto
server {
  listen 80;
  listen [::]:80;
}

```

---

<div class="post-metadata">

**Author:** ![system](https://drob5swvtjqxg.cloudfront.net/user_avatar/community.nginx.org/system/32/19_2.png) [@system](https://community.nginx.org/u/system)\
**Post date:** [August 20, 2025, 1:12pm UTC](https://community.nginx.org/t/how-do-i-reinstall-letsencrypt-files-on-a-new-computer/5916/5 "2025-08-20T13:12:55Z")

</div>

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