Skip to content

6. test‐servers know‐how

Alain Bourgeois edited this page Jul 28, 2026 · 3 revisions

Deprecated - to be updated for https://pivot-test.solidproject.org URL

solidcommunity.net:8443 NSS test-server instance

  • config file : `/home/solid/test-solid/config.json` must be created once.
    root@solidcommunity:/home/solid/test-solid# cat config.json
    {
      "root": "/mnt/volume_lon1_01/test-solidcommunity.net/data",
      "port": "8443",
      "serverUri": "https://solidcommunity.net:8443",
      "webid": true,
      "mount": "/",
      "configPath": "./config",
      "configFile": "./config.json",
      "dbPath": "/mnt/volume_lon1_01/test-solidcommunity.net/.db",
      "sslKey": "/etc/letsencrypt/live/solidcommunity.net/privkey.pem",
      "sslCert": "/etc/letsencrypt/live/solidcommunity.net/fullchain.pem",
      "multiuser": true,
      "corsProxy": "/proxy",
      "redirectHTTPFrom": 80,
      "disablePasswordChecks": false,
      "server": {
        "name": "test solidcommunity.net",
        "description": "An experimental community solid server",
        "logo": ""
      },
      "email": {
        "host": "smtp.sendgrid.net",
        "port": "465",
        "sender": "no-reply@solidcommunity.net",
        "secure": true,
        "auth": {
          "user": "apikey",
          "pass": "XXXXXXXXXX"
        }
      }
    }
    
    
  • config folder : /home/solid/test-solid/config always uses default as test
  • app
  # cd /home/solid/test-solid
  # git clone https://github.com/solid/node-solid-server
  # npm ci
  • new instance
  # pm2 start --name test-solid /home/solid/test-solid/bin/solid -- start
this does not work with node --experimental-modules, you need to 
add --node-args='--experimental-require-module' parameter to pm2
  # pm2 --node-args='--experimental-require-module' start --name test-solid /home/solid/test-solid/bin/solid -- start
or with npm -- run
  # pm2 start --name test-solid npm -- run solid start
  # pm2 save
  • update
  # pm2 restart test-solid
  • storage : data and .db
root@solidcommunity:/mnt/volume_lon1_01/test-solidcommunity.net# ls -a
.  ..  .db  data

CSS test server

CSS server test on solidcommunity.net

Each new major CSS version imply to update the configuration file and the pm2 bash command file.

For minor versions of CSS or upgrade of mashlib, use minor update.

minor updates

- cd /home/solid/test-css
  update `package.json` dependencies
- npm ci
- pm2 ls # to display existing running servers
- pm2 restart css-subdomain
- pm2 restart css-suffix

major update or new installation

  • cd /home/solid/css-config
    root@solidcommunity:/home/solid/css-config# ls -al
    total 64
    drwxr-xr-x 2 root root 4096 Dec  6 17:33 .
    drwxr-xr-x 5 root root 4096 Feb  9  2023 ..
    -rw-r--r-- 1 root root 2862 Feb  9  2023 config-mashlib.json
    -rw-r--r-- 1 root root 3649 Feb  9  2023 https-mashlib-subdomain-file.json
    -rw-r--r-- 1 root root 3646 Feb  9  2023 https-mashlib-suffix-file.json
    -rw-r--r-- 1 root root  419 Feb  9  2023 override-pod-templates-v5.json
    -rw-r--r-- 1 root root  295 Dec  6 15:59 subdomain-3000-v7.sh
    -rw-r--r-- 1 root root  348 Dec  6 17:25 subdomain-3000-v7test.sh
    -rw-r--r-- 1 root root 3725 Feb  9  2023 subdomain-mashlib-v5.json
    -rw-r--r-- 1 root root 4116 Nov 23 18:41 subdomain-mashlib-v7.json
    -rw-r--r-- 1 root root  289 Nov 24 11:06 suffix-3001-v7.sh
    -rw-r--r-- 1 root root  194 Mar  7  2023 suffix-3001.sh
    -rw-r--r-- 1 root root 3722 Feb  9  2023 suffix-mashlib-v5.json
    -rw-r--r-- 1 root root 4117 Nov 24 11:11 suffix-mashlib-v7.json
    

1. CSS subdomain test server : https://solidcommunity.net:3000

  • configuration file : subdomain-mashlib-v7.json
    root@solidcommunity:/home/solid/css-config# cat subdomain-mashlib-v7.json
    {
      "@context": [
        "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld"
      ],
      "import": [
        "css:config/app/init/default.json",
        "css:config/app/main/default.json",
        "css:config/app/variables/default.json",
        "css:config/http/handler/default.json",
        "css:config/http/middleware/default.json",
        "css:config/http/notifications/all.json",
        "css:config/http/server-factory/https.json",
        "css:config/http/static/default.json",
        "css:config/identity/access/public.json",
        "css:config/identity/email/example.json",
        "css:config/identity/handler/default.json",
        "css:config/identity/oidc/default.json",
        "css:config/identity/ownership/token.json",
        "css:config/identity/pod/static.json",
        "css:config/ldp/authentication/dpop-bearer.json",
        "css:config/ldp/authorization/webacl.json",
        "css:config/ldp/handler/default.json",
        "css:config/ldp/metadata-parser/default.json",
        "css:config/ldp/metadata-writer/default.json",
        "css:config/ldp/modes/default.json",
        "css:config/storage/backend/file.json",
        "css:config/storage/key-value/resource-store.json",
        "css:config/storage/location/pod.json",
        "css:config/storage/middleware/default.json",
        "css:config/util/auxiliary/acl.json",
        "css:config/util/identifiers/subdomain.json",
        "css:config/util/logging/winston.json",
        "css:config/util/representation-conversion/default.json",
        "css:config/util/resource-locker/file.json",
        "css:config/util/variables/default.json"
      ],
      "@graph": [
        {
          "comment": "The settings of your email server.",
          "@type": "Override",
          "overrideInstance": {
            "@id": "urn:solid-server:default:EmailSender"
          },
          "overrideParameters": {
            "@type": "BaseEmailSender",
            "senderName": "no-reply@solidcommunity.net",
            "emailConfig_host": "smtp.sendgrid.net",
            "emailConfig_port": 465,
            "emailConfig_auth_user": "apikey",
            "emailConfig_auth_pass": "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"
          }
        },
        {
          "comment": "The location of the new pod templates folder.",
          "@type": "Override",
          "overrideInstance": {
            "@id": "urn:solid-server:default:PodResourcesGenerator"
          },
          "overrideParameters": {
            "@type": "StaticFolderGenerator",
            "templateFolder": "/home/solid/test-css/templates/pod"
          }
        },
        {
          "comment": "Where the WebID is located in the generated pod, relative to the root.",
          "@type": "Override",
          "overrideInstance": {
            "@id": "urn:solid-server:default:PodCreator"
          },
          "overrideParameters": {
            "@type": "BasePodCreator",
            "relativeWebIdPath": "profile/card#me"
          }
        },
        {
          "comment": [
            "A filesystem-based server with Databrowser as UI.",
            "Derived from config/file-no-setup.json"
          ]
        },
        {
          "comment": "Serve Databrowser as default representation",
          "@id": "urn:solid-server:default:DefaultUiConverter",
          "@type": "ConstantConverter",
          "contentType": "text/html",
          "filePath": "./node_modules/mashlib/dist/databrowser.html",
          "options_container": true,
          "options_document": true,
          "options_minQuality": 1,
          "options_disabledMediaRanges": [
            "image/*",
            "application/pdf"
          ]
        },
        {
          "comment": "Serve Mashlib static files.",
          "@id": "urn:solid-server:default:StaticAssetHandler",
          "@type": "StaticAssetHandler",
          "assets": [
            {
              "@type": "StaticAssetEntry",
              "relativeUrl": "/mash.css",
              "filePath": "./node_modules/mashlib/dist/mash.css"
            },
            {
              "@type": "StaticAssetEntry",
              "relativeUrl": "/mashlib.min.js",
              "filePath": "./node_modules/mashlib/dist/mashlib.min.js"
            },
            {
              "@type": "StaticAssetEntry",
              "relativeUrl": "/mashlib.min.js.map",
              "filePath": "./node_modules/mashlib/dist/mashlib.min.js.map"
            }
          ]
        }
      ]
    }
    
  • bash file for pm2 start
root@solidcommunity:/home/solid/css-config# cat subdomain-3000-v7.sh
npx @solid/community-server -c /home/solid/css-config/subdomain-mashlib-v7.json -f /mnt/volume_lon1_01/test-css-subdomain -p 3000 -b https://solidcommunity.net:3000 --httpsKey /etc/letsencrypt/live/solidcommunity.net/privkey.pem --httpsCert /etc/letsencrypt/live/solidcommunity.net/fullchain.pem
  • pm2 new instance
- cd /home/solid/test-css
- npm ci
- pm2 del css-subdomain
- pm2 start /home/solid/css-config/subdomain-3000-v7.sh --name css-subdomain

2. CSS suffix test server https://solidcommunity.net:3001

  • configuration file : suffix-mashlib-v7.json
    root@solidcommunity:/home/solid/css-config# cat suffix-mashlib-v7.json
    {
      "@context": [
        "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld"
      ],
      "import": [
        "css:config/app/init/static-root.json",
        "css:config/app/main/default.json",
        "css:config/app/variables/default.json",
        "css:config/http/handler/default.json",
        "css:config/http/middleware/default.json",
        "css:config/http/notifications/all.json",
        "css:config/http/server-factory/https.json",
        "css:config/http/static/default.json",
        "css:config/identity/access/public.json",
        "css:config/identity/email/example.json",
        "css:config/identity/handler/default.json",
        "css:config/identity/oidc/default.json",
        "css:config/identity/ownership/token.json",
        "css:config/identity/pod/static.json",
        "css:config/ldp/authentication/dpop-bearer.json",
        "css:config/ldp/authorization/webacl.json",
        "css:config/ldp/handler/default.json",
        "css:config/ldp/metadata-parser/default.json",
        "css:config/ldp/metadata-writer/default.json",
        "css:config/ldp/modes/default.json",
        "css:config/storage/backend/file.json",
        "css:config/storage/key-value/resource-store.json",
        "css:config/storage/location/pod.json",
        "css:config/storage/middleware/default.json",
        "css:config/util/auxiliary/acl.json",
        "css:config/util/identifiers/suffix.json",
        "css:config/util/logging/winston.json",
        "css:config/util/representation-conversion/default.json",
        "css:config/util/resource-locker/file.json",
        "css:config/util/variables/default.json"
      ],
      "@graph": [
        {
          "comment": "The settings of your email server.",
          "@type": "Override",
          "overrideInstance": {
            "@id": "urn:solid-server:default:EmailSender"
          },
          "overrideParameters": {
            "@type": "BaseEmailSender",
            "senderName": "no-reply@solidcommunity.net",
            "emailConfig_host": "smtp.sendgrid.net",
            "emailConfig_port": 465,
            "emailConfig_auth_user": "apikey",
            "emailConfig_auth_pass": "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"
          }
        },
        {
          "comment": "The location of the new pod templates folder.",
          "@type": "Override",
          "overrideInstance": {
            "@id": "urn:solid-server:default:PodResourcesGenerator"
          },
          "overrideParameters": {
            "@type": "StaticFolderGenerator",
            "templateFolder": "/home/solid/test-css/templates/pod"
          }
        },
        {
          "comment": "Where the WebID is located in the generated pod, relative to the root.",
          "@type": "Override",
          "overrideInstance": {
            "@id": "urn:solid-server:default:PodCreator"
          },
          "overrideParameters": {
            "@type": "BasePodCreator",
            "relativeWebIdPath": "profile/card#me"
          }
        },
        {
          "comment": [
            "A filesystem-based server with Databrowser as UI.",
            "Derived from config/file-no-setup.json"
          ]
        },
        {
          "comment": "Serve Databrowser as default representation",
          "@id": "urn:solid-server:default:DefaultUiConverter",
          "@type": "ConstantConverter",
          "contentType": "text/html",
          "filePath": "./node_modules/mashlib/dist/databrowser.html",
          "options_container": true,
          "options_document": true,
          "options_minQuality": 1,
          "options_disabledMediaRanges": [
            "image/*",
            "application/pdf"
          ]
        },
        {
          "comment": "Serve Mashlib static files.",
          "@id": "urn:solid-server:default:StaticAssetHandler",
          "@type": "StaticAssetHandler",
          "assets": [
            {
              "@type": "StaticAssetEntry",
              "relativeUrl": "/mash.css",
              "filePath": "./node_modules/mashlib/dist/mash.css"
            },
            {
              "@type": "StaticAssetEntry",
              "relativeUrl": "/mashlib.min.js",
              "filePath": "./node_modules/mashlib/dist/mashlib.min.js"
            },
            {
              "@type": "StaticAssetEntry",
              "relativeUrl": "/mashlib.min.js.map",
              "filePath": "./node_modules/mashlib/dist/mashlib.min.js.map"
            }
          ]
        }
      ]
    }
    
  • bash file for pm2 start command
root@solidcommunity:/home/solid/css-config# cat suffix-3001-v7.sh
npx @solid/community-server -c /home/solid/css-config/suffix-mashlib-v7.json -f /mnt/volume_lon1_01/test-css-suffix -p 3001 -b https://solidcommunity.net:3001 --httpsKey /etc/letsencrypt/live/solidcommunity.net/privkey.pem --httpsCert /etc/letsencrypt/live/solidcommunity.net/fullchain.pem
  • pm2 new instance
- cd /home/solid/test-css
- npm ci
- pm2 del css-suffix
- pm2 start /home/solid/css-config/suffix-3001-v7.sh --name css-suffix

Clone this wiki locally