Self-Hosting Domain Locker
I have documented and open sourced Domain Locker for free. You can find the source on GitHub, at lissy93/domain-locker.
⚠️ Important Disclaimer
The self-hosted edition comes with no warranty. There are no guarantees for functionality and maintaining, securing and managing the infrastructure will be your responsibility. The developer cannot be held liable for any damages or losses caused by the use of the self-hosted edition. It is not intended to be publicly exposed, unless secured it behind a firewall, with correct access controls implemented.
Prerequisites
In order to self-host Domain Locker, you will need a server. This can be anything from a low-powered SBC like a Raspberry Pi to a dedicated VPS.
Domain Locker is intended to be run with Docker, so you will need to have Docker and Docker Compose installed on your server. You may also need a domain name and a valid SSL certificate for that domain.
Deployment
curl -fsSL https://install.domain-locker.com | bash
- Domain Locker is intended to be run in a container, so you'll need Docker installed on your host system.
- We have a Docker image published to
lissy93/domain-locker
. You'll also need a Postgres database, such as thepostgres:15-alpine
container. - The database is setup with
db/setup-postgres.sh
which applies theschema.sql
. - The database is configured with environmental vairbales for
DL_PG_HOST
,DL_PG_PORT
,DL_PG_USER
,DL_PG_PASSWORD
andDL_PG_NAME
- When starting the container, bind
PORT
to3000
. Then specify the Postgres environmental variables from above. - As an example, you can view our
docker-compose.yml
file.
Support
See: Support: Self-Hosted
Developing
See: Developing Docs
Managing the Container
See our Domain Locker Docker Guide
Architecture
Self-hosted architecture is pretty simple; you have the pre-built app, served with Deno in one container, which then connects to Postgres in another container. The app includes some API endpoints which can be called to keep data updated, monitor domains and trigger notifications (via webhooks), so you might want a third container to manage crons to call these endpoints periodically.
How this differs from the managed instance?
This differs slightly from the managed instance, as self-hosted is designed to be standalone, and run in an easy docker-compose without being reliant upon external services.
Whereas the managed instance has dependencies on third-parties, which must be configured. You can switch the version at anytime, using the DL_ENV_TYPE
environmental variable, which is set to selfHosted
by default. (but note that you will need to configure the third-party platforms and services if you switch to managed). Either way, you can find the docs for all the services used here.
Publishing a Public Instance
While you're free to do as you please on private self-hosted instances, if you intend to deploy a public instance of Domain Locker, there are some etiquette guidelines that we'd appreciate you try and follow.
Do
- ✅ Fork the repo (instead of copying it, or using our repo directly)
- ✅ Keep the original MIT license, and credit the original authors
- ✅ Take responsibility for securing your instance and protecting user data
- ✅ Make it clear to your users that your version is an independent fork and not affiliated with the original project
- ✅ Consider contributing back improvements, fixes, or features that could benefit the upstream project
- ✅ Have fun, and use Domain Locker for something cool!
Don't
- ❌ Don't charge for your service if you have deployed the code as-is (aka without substantial changes)
- ❌ Don't use our hosted APIs (they may be subject to change, rate limiting and auth)- run your own
- ❌ Don't expect unpaid support from the original authors for your own instance
- ❌ Don't misrepresent your fork as the official Domain Locker—your branding and domain should reflect that it's an independent instance
- ❌ Don't modify and redistribute under a more restrictive license—the MIT license ensures continued freedom to modify and share
- ❌ Don't use any of Domain Locker's code for illegal or unethical purposes
- ❌ And, pretty please - don't sue us
Initializing
We're just getting everything ready for you. This shouldn't take a moment...