I want to share this small, simple One-Time Secret (OTS) service I made, which is just a PHP application that allows you to store and share sensitive information for a limited duration. This service is very simple to self-host by yourself, which means you’ll have full control of the data stored.
How It Works
Running the Service
If you want to use the pre-built Docker Image, just run:
In the above example, the service will open the creation of secrets to the public (0.0.0.0
), but you can also limit the IPs from which secrets can be created passing the variable AUTH_IPS
as a comma-separated list like:
docker run -p 80:80 -e AUTH_IPS=1.1.1.1,2.2.2.2 roura/simple-ots
Please note, reading secrets will always be accesible by anyone.
Running on Kubernetes
As an example, find below a Yaml manifest to run this in a Kubernetes cluster:
apiVersion: v1
kind: Pod
metadata:
name: simple-ots
spec:
containers:
- name: simple-ots
image: roura/simple-ots
env:
- name: AUTH_IPS
value: "1.1.1.1,2.2.2.2"
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: simple-ots-service
spec:
type: NodePort
ports:
- port: 80
targetPort: 80
protocol: TCP
selector:
app: simple-ots
Creating and Sharing Secrets
- Access the OTS Service: Visit http://localhost.
- Create a Secret: Enter your secret and set the expiration time (1 Hour, 1 Day, or 1 Week).
- Generate Secret Link: Click “Create Secret” to generate a unique link.
- Share the Link: Copy the link and share it with your intended recipient.
- Accessing the Secret: The recipient can open the link to view the secret, which is automatically deleted from the server when it gets opened.
Contribute on GitHub
I believe in Open Source, even for tiny projects like this. That’s why I’ve open-sourced it on GitHub. You can find the repo here.