# Installation fails on new server

**URL:** https://meta.discourse.org/t/installation-fails-on-new-server/236485
**Category:** Self-hosting
**Created:** [August 17, 2022, 11:42pm UTC](https://meta.discourse.org/t/installation-fails-on-new-server/236485 "2022-08-17T23:42:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![GuidoD](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/guidod/32/292621_2.png) [@GuidoD](https://meta.discourse.org/u/GuidoD)
#### Post date: [August 17, 2022, 11:42pm UTC](https://meta.discourse.org/t/installation-fails-on-new-server/236485/1 "2022-08-17T23:42:33Z")

</div>

I am trying to install a new discourse instance on a new root server with Ubuntu 22.04  
Our “old” server crashed today with major hardware failure so our hosting provider had to setup a new server. (I do have the discourse backup file from last night that I wanted then to reload into the newly setup instance.)

I am following these steps:

> <https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md#5-install-discourse>

But the installation fails with the following error:

```plaintext
x86_64 arch detected.
Ensuring launcher is up to date
Pulling from origin
Launcher is up-to-date
2.0.20220720-0049: Pulling from discourse/base
Digest: sha256:7ff397003c78b64c9131726756014710e2e67568fbc88daad846d2b368a02364
Status: Image is up to date for discourse/base:2.0.20220720-0049
docker.io/discourse/base:2.0.20220720-0049
exec /usr/local/bin/gem: exec format error
cd /pups && git pull && git checkout v1.0.3 && /pups/bin/pups --stdin
fatal: not a git repository (or any of the parent directories): .git
bootstrap failed with exit code 128
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

```

But already the start of **discourse-setup** does show several errors.  
Looks like the script is not working correctly with the German version of the Ubuntu operating system.  
The errors are the lines with `$avail_mem` and that is because the memory cannot be determined.  
Your script is looking for `Mem:` but in the German Ubuntu it is `Speicher:` when `free -m --si` is executed.  
Same with `Swap:` which is `Auslager:` in the German version.

I have not seen any hint, that the OS has to be the English version in order to install Discourse. 😉

```plaintext
root@h2951329:/var/discourse# ./discourse-setup
./discourse-setup: Zeile 166: [: : Ganzzahliger Ausdruck erwartet.
./discourse-setup: Zeile 185: [: : Ganzzahliger Ausdruck erwartet.
./discourse-setup: Zeile 194: [: : Ganzzahliger Ausdruck erwartet.
The configuration file containers/app.yml already exists!

. . . reconfiguring . . .

Saving old file as app.yml.2022-08-18-011427.bak
Stopping existing container in 5 seconds or Control-C to cancel.
x86_64 arch detected.
app was not started !
./discourse-doctor may help diagnose the problem.

./discourse-setup: Zeile 166: [: : Ganzzahliger Ausdruck erwartet.
Found GB of memory and 4 physical CPU cores
./discourse-setup: Zeile 265: [: : Ganzzahliger Ausdruck erwartet.
./discourse-setup: Zeile 269: [: : Ganzzahliger Ausdruck erwartet.
./discourse-setup: Zeile 273: 256 * : Syntaxfehler: Operator erwartet (fehlerverursachendes Zeichen ist "* ")

```

So I modified **discourse-setup** and replaced `Mem:` with `Speicher:`and `Swap:` with `Auslager:` and then discourse-setup did run fine without errors:

```plaintext
root@h2951329:/var/discourse# ./discourse-setup
The configuration file containers/app.yml already exists!

. . . reconfiguring . . .

Saving old file as app.yml.2022-08-18-013238.bak
Stopping existing container in 5 seconds or Control-C to cancel.
x86_64 arch detected.
app was not started !
./discourse-doctor may help diagnose the problem.

Found 33GB of memory and 4 physical CPU cores
setting db_shared_buffers = 4096MB
setting UNICORN_WORKERS = 8
containers/app.yml memory parameters updated.

```

but the rebuild is still failing:

```plaintext
Configuration file at containers/app.yml updated successfully!

Updates successful. Rebuilding in 5 seconds.
Building app
x86_64 arch detected.
Ensuring launcher is up to date
Pulling from origin
Launcher is up-to-date
2.0.20220720-0049: Pulling from discourse/base
Digest: sha256:7ff397003c78b64c9131726756014710e2e67568fbc88daad846d2b368a02364
Status: Image is up to date for discourse/base:2.0.20220720-0049
docker.io/discourse/base:2.0.20220720-0049
exec /usr/local/bin/gem: exec format error
cd /pups && git pull && git checkout v1.0.3 && /pups/bin/pups --stdin
fatal: not a git repository (or any of the parent directories): .git
bootstrap failed with exit code 128
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

```

So any help on this problem is appreciated.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [August 18, 2022, 9:16am UTC](https://meta.discourse.org/t/installation-fails-on-new-server/236485/2 "2022-08-18T09:16:44Z")

</div>

> [@GuidoD](#):
>
> I have not seen any hint, that the OS has to be the English version in order to install Discourse. 😉

This is not my forte, but I’ve asked around and I think it does have to be run in English. Though I think you can do something with LANG=C to disable localization and makes all coreutils output english - [linux - LANG=C is in a number of the /etc/init.d/\* scripts. What does LANG=C do and why do you need to set LANG=C. - Super User](https://superuser.com/a/334803)

---

<div class="post-metadata">

### Author: ![GuidoD](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/guidod/32/292621_2.png) [@GuidoD](https://meta.discourse.org/u/GuidoD)
#### Post date: [August 18, 2022, 1:04pm UTC](https://meta.discourse.org/t/installation-fails-on-new-server/236485/3 "2022-08-18T13:04:18Z")

</div>

well I did now reinstall the Ubuntu 22.04 server with locale en\_GB.utf8 instead of de\_DE.utf8 and did reinstall Discourse and Docker.  
Now the installation did run thru without any error.  
So **Discourse does need an English version of the Ubuntu Linux operating system**!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [September 17, 2022, 1:04pm UTC](https://meta.discourse.org/t/installation-fails-on-new-server/236485/4 "2022-09-17T13:04:56Z")

</div>

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