Expose on Forge
One of its neat features is that you can set it up on your own server so you can control the domain. I wanted to play with this and get it up and running on my Forge server, however I ran into a few challenges, so I'm sharing in case others find it useful.
Before you start, make sure you read Expose's docs.
- Make sure the domain you want to use has wildcard DNS set up
- i.e. An
- Note that Forge only supports a few DNS providers for wildcard certs
- For me this meant I had to move a domain to Digital Ocean.
- i.e. An
- In Forge, create a standard php site and enable wildcard domains
composer require beyondcode/expose
- Publish the config
expose publish, this puts a
- Edit the configuration in
'database' => '/home/forge/.expose/expose.db',
- I’d recommend changing the admin user/password as well
- Link that config to
ln -s /home/forge/.expose/config.php /home/forge/.expose.php
- Create a daemon
/home/forge/yoursite.com/vendor/bin/expose serve yoursite.com
- Set the
Locally, install Expose (
composer global require beyondco/expose), then open the config (in
~/.expose/config.php) and set
http://yoursite.com (note if you are serving this via SSL, change the port as well to
To test, open Terminal, navigate to one of your locally served sites, and type
expose. You could get something that looks like:
Congratulations, you're off and running!