Skip to content

First test installation ​

This procedure installs Save2ERP on a Windows computer, with Docker, for a first local test (https://localhost:5000). It takes about thirty minutes.

For testing only

The certificate created here is only trusted by this computer. For a shared server, see Production installation.

Before you start ​

  • Docker Desktop and Node.js (for the npx command in step 2) installed on the computer.
  • The files provided by Swiss Computing: docker-compose.yml, license.lic, .env (or the .env.example template, to be completed, see Configuring the server) and the test manifest.
  • Access to the Docker image: either an access token for the image registry, or the image file (save2erp-<version>.tar.gz).

All commands are run in PowerShell, from the installation folder.

1. Prepare the folder ​

Create a folder, for example C:\save2erp, and copy docker-compose.yml, license.lic and .env into it. Then:

powershell
cd C:\save2erp
dir -Force

The command must list the three files (-Force also shows .env).

2. Create the HTTPS certificate ​

Word only accepts an HTTPS address with a certificate trusted by Windows, even on localhost. Microsoft's tool for Office add-ins creates this certificate and installs its authority in Windows:

powershell
npx office-addin-dev-certs install --days 365

If npx asks to install the package, answer y. Windows then asks to install the "Developer CA for Microsoft Office Add-ins" authority: answer Yes.

3. Copy the certificate into the folder ​

powershell
New-Item -ItemType Directory -Force dev\certificates
Copy-Item $env:USERPROFILE\.office-addin-dev-certs\localhost.* dev\certificates\
dir dev\certificates

The dev\certificates folder must contain localhost.crt and localhost.key.

4. Declare the certificate in docker-compose.yml ​

Open docker-compose.yml and add this line to the volumes: list of the save2erp service, with the same indentation as the neighboring lines:

yaml
      - ./dev/certificates:/app/dev/certificates:ro

5. Get the image ​

With an access token for the registry:

powershell
docker login ghcr.io -u <user name provided by Swiss Computing>

At the Password: prompt, paste the token (nothing is shown while typing), then press Enter. Docker answers Login Succeeded.

With the image file:

powershell
docker load -i save2erp-<version>.tar.gz

6. Start Save2ERP ​

powershell
docker compose up -d

7. Check the logs ​

powershell
docker compose logs -f

The logs must show, among other things:

  • Licence : … with the customer name, the number of users and the end date;
  • one line per system declared in .env, with its environment;
  • Certificat HTTPS : …, valable jusqu'au … (the HTTPS certificate and its expiry date);
  • Server HTTPS started on port 5000.

Leave the log display with Ctrl+C: the container keeps running. If you get the error "Fichier du certificat HTTPS illisible" (HTTPS certificate file unreadable), check steps 3 and 4, then run docker compose up -d again.

Open the diagnostic page https://localhost:5000/test in Edge or Chrome. It must open without a certificate warning. You can test the connection to the target system there (see Troubleshooting).

9. Add the add-in to Word ​

For a test on a single computer, Word can load the add-in from a shared folder containing the manifest:

  1. Put the manifest in a shared network folder.
  2. In Word: File › Options › Trust Center › Trust Center Settings › Trusted Add-in Catalogs.
  3. Enter the network path of the folder in "Catalog Url", click Add catalog, check Show in Menu, then OK.
  4. Restart Word, then Add-ins › More Add-ins › Shared Folder › Save2ERP › Add.

The "Save to SAP" button appears in the ribbon. For all users, deploy the add-in from Microsoft 365 instead (see Deploying in Microsoft 365).

Useful commands ​

ActionCommand
Startdocker compose up -d
Stopdocker compose down
Show the logsdocker compose logs -f
Change the configurationedit .env, then docker compose restart
Renew the licensereplace license.lic, then docker compose restart

Reset the computer ​

powershell
docker compose down -v
docker rmi ghcr.io/swiss-computing/save2erp:<version>
docker logout ghcr.io
Remove-Item -Recurse -Force dev\certificates
npx office-addin-dev-certs uninstall

down -v also deletes the volumes: the license user register and the logs. The last command removes the certificate authority from the computer.