Gemini-PHP is a Gemini server written in PHP by @firstname.lastname@example.org.
It's designed more for teaching than practical use. That's said - it's very simple to get up and running and we're hosting this page on it - it seems to be performing well.
If you have any questions or want to get in touch, you can join our community on Matrix at #gemini-php:glasgow.social
How to install
- Enter the project directory and create a certificate for your server (a self signed certificate is fine, in fact it's encouraged!)
- Combine your private key with the certificate and put in the certs directory
- Create a config file from the sample
- Then edit it with the location of your new certificate - most other options are optional
- Start your server with
- You should be able to visit your new server in any Gemini client (remember to open your firewall if needed - post 1965)
Our favourite Gemini client so far is Lagrange
- The basic index file is located in hosts/default/index.gemini - edit this to get started
- Gemini-PHP supports multiple virtual hosts, just create a directory with the name of the domain you expect to receive requests for, i.e.
Running as a service
To set up the server as a service, create the following file in /etc/systemd/system/gemini-php.service
Note, customise the above to the user you are running gemini-php as (we recommend creating a new user account for this to keep it relatively isolated) as well as the path to the script.
Enable the script with systemctl
Back to index