Silex is zero-config to start and can be extended with flexible configuration options.
Zero config was inspired by 11ty and it means that Silex can run without any command line parameters or configuration files.
TL;DR:
Method | Best for... | Works offline | Includes all plugins | Command line utility | GrapesJS plugins | 11ty plugins | 11ty build | Notes |
---|---|---|---|---|---|---|---|---|
Online (v3.silex.me) | General use, no setup required | No | Yes | No | ❌ Not yet (follow progress) | Yes | ✅ Included | Recommended for most users. |
Docker | Local development, self-hosting | Yes | Yes | No | ✅ Yes (follow progress) | Yes | ❌ Must be handled manually | Recommended for local use and hosting. |
Caprover one-click | Easy deployment on a Caprover instance | Yes | No | No | ❌ No | ❌ No | ❌ Must be handled manually | Simple setup for self-hosting, but lacks plugins and 11ty build. |
npx @silexlabs/silex | Command-line usage, testing | Yes | No | ✅ Yes | No | No | ❌ Must be handled manually | Minimal setup, missing some plugins. |
npm install @silexlabs/silex | Integration in a Node.js project | Yes | No | No | No | Yes | ❌ Must be handled manually | Useful for mono-site use without the dashboard. |
Run from source | Development, contributing to Silex | Yes | Yes | ✅ Yes | Yes | Yes | ❌ Must be handled manually | Required for contributing code. |
Silex Desktop App (v2) | ❌ Do not use (outdated version) | Yes | No | No | No | No | No | Old version, will be updated. Follow this feature request for updates. |
Concerning local installation / self hosting:
npm install @silexlabs/silex
or npx @silexlabs/silex
is not recommended but it should work, even on windows. Note that the npm package is a bare version without some plugins, so you may want to install the missing plugins, as explained in the docs. This is recommended if you want to integrate silex in a nodejs project or if you want a silex without the dashboard (mono-site) and without the CMS featuresilexlabs/silex-platform
as it has all the same plugins as v3.silex.meYou may be interested in this project: Silex edition with a dashboard for multi-sites and other useful options. It is used for v3.silex.me free instance.
If you are planing to contribute code to Silex, you will need to run Silex from source, please check this guide about how to contribute
Requirements
Silex is available as a one click app for Caprover
This is convenient as you can go further by also self hosting GitLab and a CMS such as WordPres, as they are available as one click apps too.
OS | Supported | Tester |
---|---|---|
Linux (Fedora) | ✓ | @lexoyo |
Windows | ? | |
MacOS | ? | |
Other | ? |
Requirements
Use Silex official docker image
$ docker run -p 6805:6805 silexlabs/silex
Then open http://localhost:6805
The default options can be overriden with environment variables using the -e
option in docker run, see the list of all available options
$ docker run -p 8080:8080 -e PORT=8080 silexlabs/silex
In order to add plugins and configure Silex with config files (client and server), check the section "Start with a custom config file" bellow.
OS | Supported | Tester |
---|---|---|
Linux (Fedora) | ✓ | @lexoyo |
Windows | ? | |
MacOs | ? | |
Other | ? |
Requirements
Install and launch Silex from the command line with the following command:
npx @silexlabs/silex
Then open http://localhost:6805
The CLI supports a number of options, allowing you to customize Silex's behavior, see the list of options here
To use these options, simply append them to the command line when launching Silex. For example:
npx @silexlabs/silex --port=8000 --debug=true
This would start Silex, listening on port 8000, with debug mode enabled.
If you want to install Silex globally with npm, you can do so with the following command:
npm install -g @silexlabs/silex
This command tells npm to install the package '@silexlabs/silex' globally (-g
flag), which means you can use it from any directory on your machine.
After installing Silex globally, you can launch it from anywhere with:
silex
Just like when using npx, you can also pass command-line options when launching Silex:
silex --port=8000 --debug=true
This will start Silex, listening on port 8000, with debug mode enabled.
Or you can use the environment variables of your OS too set the options
$ PORT=8080 npx @silexlabs/silex
Which is equivalent to this with Silex globally installed (npm install -g @silexlabs/silex
)
$ PORT=8080 silex
You can configure Silex using environment variables and command-line options. All available options can be found in the docs about options. Also you can read more about Silex configuration here
There are config files (same as plugins) in the examples/
folder of Silex repository. To start Silex locally with these config:
docker run -p 6805:6805 \
-v $(pwd)/examples/client-config-transformers.js:/app/examples/client-config-transformers.js \
-v $(pwd)/examples/server-config-plugins.js:/app/examples/server-config-plugins.js \
-e SILEX_CLIENT_CONFIG=/path/to/client-config.js \
-e SILEX_SERVER_CONFIG=/path/to/server-config.js \
silexlabs/silex
Or with npx
$ SILEX_CLIENT_CONFIG=/path/to/client-config.js SILEX_SERVER_CONFIG=/path/to/server-config.js npx @silexlabs/silex