Skip to content

scriptPilot/dokploy-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dokploy Server

👨‍💻 Personal best practice and helper to setup, backup and restore a Dokploy Server.

Prerequisites

Setup

  1. Create a server with IP4, for example with Hetzner, for less than 5€ per month.

  2. Configure the server:

    Connect via SSH, change the initial password and remember the new one:

    ssh root@{server_ip}

    Install Dokploy:

    curl -sSL https://dokploy.com/install.sh | sh

    Exit the SSH connection:

    exit
  3. Configure Dokploy:

    Admin User

    • Open the Dokploy app at http://{server_ip}:3000, create a user and remember the password.

    Notifications

    • At the domain hoster, create an email account for dokploy@{domain.tld}.
    • In Dokploy, use this SMTP account to configure email notifications for all events.

    Web Server

    • At the domain hoster, create a DNS A record for dokploy.{domain.tld} and forward it to the {server_ip}.
    • In Dokploy, use this domain and the email account for the Web Server and Let's Encrypt, activate HTTPS.

    Git

    • Connect to GitHub by creating a dedicated application like Dokploy Server @ Hetzner and grant access rights to it.
  4. Transfer all projects to the new server:

    • Configure the project and related services.
    • Update the DNS A record with the new IP.
    • Test the app with http and https.
    • Test the app with and without www.

Backup

  1. Clone this repository and open it in the code editor.

  2. Create an .env file with the backup settings:

    BACKUP_SERVER_IP=1.2.3.4
    BACKUP_SERVER_PW=secret_password
    LOCAL_BACKUP_DIR=dokploy-backup-folder
  3. Backup the Dokploy folder and all Docker volumes locally:

    make backup

Restore

  1. Extend the .env file with the restore settings:

    RESTORE_SERVER_IP=1.2.3.4
    RESTORE_SERVER_PW=secret_password

    It is not required to install Dokploy on the server before.

  2. Run the restore script:

    make restore
  3. Adjust the configuration:

    • Update the IP address in Web Server > Server > Update Server IP.
    • Restart Traefik in Web Server > Traefik > Reload.
  4. For each project:

    • Recreate Traefik.me domains if they are used.
    • Deploy services manually.
    • Test services.
  5. Update the DNS records to point to the new IP.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published