One-click and CapRover deployment¶
Deploy Silex on a CapRover server, either with the one-click app or from source.
Overview¶
CapRover is a developer-friendly platform for self-hosting Docker apps on your own server. It handles SSL, logs, and persistent volumes through a web dashboard. Support for more platforms is on the roadmap.
There are two ways to run Silex on CapRover:
- Deploy from source (recommended for the latest version). The repository has a
captain-definitionat its root that builds the image from the rootDockerfile. This always tracks the current code. - One-click app (quickest, but frozen). The CapRover one-click catalog has a
silex-platformapp. It pulls a frozen Docker image that does not track the monorepo. Use it for a fast trial, but prefer deploy-from-source for an up-to-date instance.
Deploy from source (recommended)¶
Install the CapRover CLI and deploy the cloned repository:
npm install -g caprover
git clone --recurse-submodules https://github.com/silexlabs/Silex.git
cd Silex
caprover deploy
The CLI uses the root captain-definition, which builds the root Dockerfile. In the CapRover dashboard, set the environment variables on the app, enable HTTPS, and add a persistent volume.
One-click app (frozen image)¶
- Open your CapRover dashboard at
https://captain.your-domain.com - Go to Apps → Create an app → One-Click Apps
- Search for silex and select silex-platform
- Fill in the configuration fields
- Click Deploy
CapRover pulls the image, configures the app, and sets up SSL automatically.
The one-click image is frozen and does not receive monorepo updates. For new features and fixes, deploy from source instead.
Environment variables¶
| Variable | Example | Purpose |
|---|---|---|
SILEX_SESSION_SECRET |
(random 32+ chars) | Session encryption key, generate a new one per deployment |
SILEX_URL |
https://silex.example.com | Public URL users visit |
SILEX_PORT |
6805 | Internal port |
STORAGE_CONNECTORS |
gitlab | Storage backend: fs, gitlab, ftp (comma-separated, no spaces) |
HOSTING_CONNECTORS |
gitlab,download | Publishing backend: fs, gitlab, ftp, download (comma-separated, no spaces) |
Generate the session secret:
GitLab integration¶
STORAGE_CONNECTORS=gitlab
HOSTING_CONNECTORS=gitlab,download
GITLAB_CLIENT_ID=your-oauth-app-id
GITLAB_CLIENT_SECRET=your-oauth-app-secret
GITLAB_DOMAIN=gitlab.com
You can connect up to two GitLab instances by adding GITLAB2_* variables and appending gitlab2 to the connector lists, for example gitlab.com as primary and a self-hosted GitLab or Framagit as secondary. See Storage connectors for OAuth setup.
Full self-hosted stack¶
You can host the whole stack on CapRover, each available as an app: Silex for design, GitLab for storage and publishing, and WordPress (or another CMS) as a data source for dynamic content. Connect them through the environment variables above.
YunoHost (coming soon)¶
YunoHost support is planned but not yet available. Vote for it on the roadmap.
Other platforms¶
Support for more one-click platforms (Dokku, Coolify, Sandstorm, and others) is being discussed on the roadmap. Vote and comment to help prioritize.
Data persistence¶
Add a persistent volume in CapRover for the storage and hosting paths (set them with SILEX_FS_ROOT and SILEX_FS_HOSTING_ROOT). Data persists across app restarts and updates. Back it up regularly through the dashboard.
SSL/HTTPS¶
CapRover provisions and renews SSL certificates via Let's Encrypt. Enable HTTPS on the app, then set SILEX_URL to your HTTPS domain:
Troubleshooting¶
App fails to start¶
Check the logs in the CapRover dashboard (app detail page → Logs). Common issues:
SILEX_SESSION_SECRETmissing or too short- Port already in use (choose a different port)
- Storage volume permissions (the platform usually handles this)
Cannot upload large files¶
See also¶
- Docker setup
- Running from source with Node.js
- Server configuration — server config API