./run.sh <password>
= start app,password
argument is to be used as MySQL root user password- access phpMyAdmin and import the database dump
docker compose down
= stop app
- register a domain on Namecheap
- create an account on DigitalOcean
- create a project and a SSH key on settings
- create a droplet inside the project created previously and select the SSH key created on the previous step as the authentication method
- change DNS provider from Namecheap to DigitalOcean
- access the domain config page at Namecheap and change "nameservers" from "Namecheap BasicDNS" to "Custom DNS" and add DigitalOcean's nameservers (instructions)
- access DigitalOcean, add domain to the droplet and create a wildcard
A record
pointing to*
- NOTE: later you'll revert to use Namecheap but for now using DigitalOcean is necessary to easily issue a SSL certificate
- access the droplet using SSH — example:
ssh [email protected]
- create user and give they root privileges
- install docker on your server
- install docker compose on your server
- enable SSL using Let's Encrpyt
- NOTE: at section 'Step 3 - Issuing a Certificate', instead of using one of the commands provided as example, use instead (source):
sudo certbot certonly --dns-digitalocean --dns-digitalocean-credentials ~/certbot-creds.ini -d simpletables.xyz -d '*.simpletables.xyz'
to acquire a wildcard certificate - NOTE: during step 2 you'll need to create a DigitalOcean token (instructions)
- NOTE: DigitalOcean must be the DNS provider because you're using the certbot-dns-digitalocean plugin, if using any other provider you will get the error Unable to determine base domain for simpletables.xyz
- NOTE: at section 'Step 3 - Issuing a Certificate', instead of using one of the commands provided as example, use instead (source):
- until now you used DigitalOcean as the DNS provider, however Namecheap offers functionalities DigitalOcean doesn't because of that you'll switch to Namecheap
- on DigitalOcean, delete domain
- on Namecheap, remove DigitalOcean's nameservers by choosing 'Namecheap BasicDNS' and adding the following records:
- type: A record, host: @, value: droplet ip
- type: A record, host: *, value: droplet ip
- configure Namecheap to forward emails sent to a custom domain address (e.g.
[email protected]
) to a regular email (e.g.[email protected]
) — at 'REDIRECT EMAIL' section add the following record (source):- alias: admin, forwards to: [email protected]
- to be able to send emails with your custom domain, you must set up a SMTP server — sign up to SMTP2GO with a custom domain email and follow given instructions
- in SMTP2GO, SMTP username must be
simpletables
and have the same password as the one passed torun.sh
script.
- in SMTP2GO, SMTP username must be
- first, you'll need to switch back to DigitalOcean from Namecheap when it's time to renew the SSL certificate otherwise you'll get the error Unable to determine base domain for simpletables.xyz
- access the domain config page at Namecheap and change "nameservers" from "Namecheap BasicDNS" to "Custom DNS" and add DigitalOcean's nameservers (instructions); now on DigitalOcean, add domain to droplet the droplet and create a wildcard
A record
pointing to*
- access the domain config page at Namecheap and change "nameservers" from "Namecheap BasicDNS" to "Custom DNS" and add DigitalOcean's nameservers (instructions); now on DigitalOcean, add domain to droplet the droplet and create a wildcard
- run
sudo certbot renew --dry-run -v
first to check everything will work and thensudo certbot renew
to actually renew certificates that're near their expiration date- if you encounter the error
Error finding domain using the DigitalOcean API: Unable to authenticate you (Did you provide a valid API token?)
it's because the DigitalOcean's personal access token expired and you need to generate a new one and replace it on the file you created atIssue Let's Encrypt certificate
section (if you followed the instructions precisely, file path is~/certbot-creds.ini
)
- if you encounter the error
- restart the droplet for the changes to take effect
- when everything is working, you can switch back to Namecheap - check
Set up a free email
section for instructions