A temporary website hosting service, usable programmatically.
- Clone this git repository.
git clone https://github.com/Fraetor/tmpweb.net.git
- Create a venv (optional, but highly recommended)
python3 -m venv venv
source venv/bin/activate
- Install the dependencies:
pip install -r requirements.txt
- Configure NGINX to act as a proxy to the gunicorn server. See nginx.conf and tmpweb.net.conf for example configurations.
- Configure
src/config.toml
. - Copy static files into hosting directory:
python3 install.py
- Reload NGINX
nginx -s reload
- Recent Python 3 (>= 3.11 due to tomllib usage)
- gunicorn
- NGINX web server
Once NGINX is configured correctly, simply run ./run-tmpweb.sh
.
To delete all expired sites pass a DELETE request from a loopback address.
I'd recommend adding this to the crontab:
# Run tmpweb.net application server on startup.
@reboot cd /var/www/tmpweb/tmpweb.net ; ./run-tmpweb.sh
# Delete expired websites for tmpweb.net.
0 */6 * * * curl -X DELETE http://127.0.0.1:8000
- Add tests.
- Improve front page, including adding terms of use.
- Migrate to shared infrastructure.
- Add better installation instructions.
This software is available under the MIT Licence.