{"id":16926123,"url":"https://github.com/databus23/staticdhcpd","last_synced_at":"2026-05-15T18:34:08.107Z","repository":{"id":18037845,"uuid":"21080688","full_name":"databus23/staticdhcpd","owner":"databus23","description":"svn2git clone of http://staticdhcpd.googlecode.com/svn","archived":false,"fork":false,"pushed_at":"2014-12-12T18:18:27.000Z","size":1388,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-25T22:34:52.933Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/databus23.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-21T22:57:06.000Z","updated_at":"2015-04-23T15:34:28.000Z","dependencies_parsed_at":"2022-08-25T13:50:12.939Z","dependency_job_id":null,"html_url":"https://github.com/databus23/staticdhcpd","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databus23%2Fstaticdhcpd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databus23%2Fstaticdhcpd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databus23%2Fstaticdhcpd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databus23%2Fstaticdhcpd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/databus23","download_url":"https://codeload.github.com/databus23/staticdhcpd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244722657,"owners_count":20499153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T20:29:06.143Z","updated_at":"2025-10-10T05:43:06.913Z","avatar_url":"https://github.com/databus23.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Thirty-second upgrade guide for people who hate using diff\n\nUpgrading important pieces of software can be a scary process, and not just\nbecause new versions introduce new behaviours and the possibility of new bugs.\nNo, perhaps the greatest threat (assuming you can trust the project's\nmaintainers to not be clueless and you've done your research on what's changed)\nis that you'll miss copying that magical config file value that made your\nnetwork actually work.\n\nFortunately, staticDHCPd makes that easy: just copy your old conf.py file into\nthe new version and you're good to go. Any omitted options are supplemented by\nsane defaults, new scriptable features are defined passively (you only use what\nyou need), and you can add references to new options when you actually need\nthem. It really couldn't be any friendlier... until it was: starting with 1.6.1,\nif you install the system using setup.py, your old config directory will be left\nintact, meaning that you just have to pull code, run setup, and go.\n\n\n-------------------------------------------------------------------------------\n\n\nInstallation instructions:\n    Run install.sh with privileges that can create content in\n    /etc and /usr/local/bin. Follow the resulting on-screen text to integrate\n    the server with your OS's daemon-management engine.\n    \n    Just remember to set up conf.py and everything should just work. Before\n    installing the server, though, run through the five-minute quickstart\n    described below; it doesn't require that you make any permanent changes to\n    your host.\n\n\n-------------------------------------------------------------------------------\n\n\nFive-minute \"does this really work?\" setup guide for busy administrators\n    Uses sqlite3 or INI files to avoid unnecessary installations\n\n(If you need more information, see the project page at\n http://uguu.ca/puukusoft/staticDHCPd/ or\n http://code.google.com/p/staticdhcpd/)\n\n\nStep 1: Gather resources\n    You need the code, which came with this lovely text file, and a computer\n    on which to run it. Since this is a Unix-formatted file, you've probably\n    already got that, too. You'll also need sqlite3 to manage the DHCP\n    database. Chances are it's already installed, but check anyway. (Also\n    Python 2.5+, but no modern Unix-like system is without that)\n    \n    The last thing you need is enough access to bind to the DHCP ports.\n    Since there's no way you're going to just run this server on a production\n    box without testing it first, you've almost certainly satisfied this\n    requirement, too.\n    \n    So you're done. That was easy.\n    \nStep 2: Set up the DHCP database\n    (This example assumes your network is similar to that of a typical home\n    user; if this is not the case, you will need to adjust things, but you\n    probably wouldn't be playing with a DHCP server if you were a typical home\n    user anyway)\n    \n    The example values below will give the MAC 'aa:bb:cc:dd:ee:ff' the IP\n    '192.168.0.197' and no hostname. You'll notice that non-host-specific\n    parameters are inherited from its subnet-classification, specifically\n    things like lease-time and basic routing parameters. DNS, NTP, and\n    other properties aren't specified in this example, but are in the samples/\n    directory.\n    \n    (The term \"subnet\" is used loosely here: the only thing that matters is that\n    the \"subnet\" and \"serial\" values match for inheritance -- you could put\n    \"floor 3\" in as a \"subnet\" if you wanted to. The term \"subnet\" was chosen\n    because it seemed like the most likely classification system for\n    administrators to use and recognise)\n    \n    INI method:\n        Create a file with the following contents; the name is up to you.\n            \n            [192.168.0.0/24|0]\n            lease-time: 14400\n            gateway: 192.168.0.1\n            subnet-mask: 255.255.255.0\n            broadcast-address: 192.168.0.255\n\n            [aa:bb:cc:dd:ee:ff]\n            ip: 192.168.0.197\n            subnet: 192.168.0.0/24\n            serial: 0\n            \n    SQLite method:\n        Open a terminal and run `sqlite3 dhcp.sqlite3`\n        \n        Copy and paste the contents of samples/sqlite.sql into the prompt.\n        \n        Now that your database is ready to go (SQLite is easy!), add some rules.\n            \n            INSERT INTO subnets (\n                subnet,\n                serial,\n                lease_time,\n                gateway,\n                subnet_mask,\n                broadcast_address,\n                ntp_servers,\n                domain_name_servers,\n                domain_name\n            ) VALUES (\n                '192.168.0.0/24',\n                0,\n                14400,\n                '192.168.0.1',\n                '255.255.255.0',\n                '192.168.0.255',\n                NULL,\n                NULL,\n                NULL\n            );\n            \n            INSERT INTO maps (\n                mac,\n                ip,\n                hostname,\n                subnet,\n                serial\n            ) VALUES (\n                'aa:bb:cc:dd:ee:ff',\n                '192.168.0.197',\n                NULL,\n                '192.168.0.0/24',\n                0\n            );\n            \nStep 3: Edit conf.py\n    Copy 'conf/conf.py.sample' to 'conf/conf.py'.\n    \n    For now, since you'll want to see everything that goes on, set DEBUG to\n    True; 'True' must be capitalized. (In production, DEBUG should be False,\n    since it adds a little bit of overhead and it may fill system logs very\n    quickly)\n    \n    Also set DAEMON to False. If you don't, it'll do daemonsy things, which\n    aren't good for helping to identify configuration problems quickly.\n    \n    Then set LOG_FILE to point at your home directory. We'll be running this\n    test using your privileges so you don't have to create a special role\n    account, to save time. (In production, though, you'll definitely want to\n    lock this thing down, just like every daemon: long-running root processes\n    are bad)\n    \n    Set PID_FILE to point at the same directory as LOG_FILE.\n    \n    Run `id` in a terminal; this will tell you what your uid and gid are; enter\n    these values under UID and GID to restrict staticDHCPd's privileges.\n    \n    Run `ifconfig` and make note of your IPs; set DHCP_SERVER_IP and WEB_IP\n    accordingly. If you only have one IP, enter it in both fields.\n    \n    INI method:\n        After that, set DATABASE_ENGINE to 'INI'; capitalization matters.\n        \n        Lastly, set INI_FILE to point at the file you created in step 2.\n        \n    SQLite method:\n        After that, set DATABASE_ENGINE to 'SQLite'; capitalization matters.\n        \n        Lastly, set SQLITE_FILE to point at the file you created in step 2.\n        \nStep 4: Start the server\n    Run `sudo python staticDHCPd`.\n    \n    You should see a few lines appear, explaining that the server is now\n    running.\n    \n    Tell the device with the MAC given in step 3 to request an address and\n    everything should Just Work(tm).\n    \n    Go to http://\u003cWEB_IP\u003e:30880/ to see what the server's been doing.\n    \nStep 5: Kill the process\n    When satisifed that the system works, hit ^C or send SIGTERM (15) to the\n    process.\n    \n    \nYou now have proof that what you have in your proverbial hands is a functional,\nfully static DHCP server.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabus23%2Fstaticdhcpd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatabus23%2Fstaticdhcpd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabus23%2Fstaticdhcpd/lists"}